summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-06-05 11:25:50 +0200
committerSimon Rettberg2015-06-05 11:25:50 +0200
commit693392fe6c0022e7ec5060192ee322c7753b0d90 (patch)
tree855245927778c6b069714909929684d1da7d449f
parentCleanup thrift shandling stuff (diff)
downloadmaster-sync-shared-693392fe6c0022e7ec5060192ee322c7753b0d90.tar.gz
master-sync-shared-693392fe6c0022e7ec5060192ee322c7753b0d90.tar.xz
master-sync-shared-693392fe6c0022e7ec5060192ee322c7753b0d90.zip
Changes for Dozmod v1.1
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/org/openslx/filetransfer/ClassTest.java4
-rw-r--r--src/main/java/org/openslx/filetransfer/Downloader.java29
-rw-r--r--src/main/java/org/openslx/filetransfer/IncomingEvent.java4
-rw-r--r--src/main/java/org/openslx/filetransfer/Listener.java158
-rw-r--r--src/main/java/org/openslx/filetransfer/Transfer.java113
-rw-r--r--src/main/java/org/openslx/filetransfer/UploadStatusCallback.java10
-rw-r--r--src/main/java/org/openslx/filetransfer/Uploader.java44
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java60
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java504
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java48
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java504
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java635
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java504
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java1350
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java45
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java504
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java15606
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java280
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java737
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java388
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java588
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java486
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java54
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java504
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java788
-rw-r--r--src/main/java/org/openslx/sat/thrift/iface/Image.java1388
-rw-r--r--src/main/java/org/openslx/sat/thrift/iface/Lecture.java1188
-rw-r--r--src/main/java/org/openslx/sat/thrift/iface/Person.java1350
-rw-r--r--src/main/java/org/openslx/sat/thrift/iface/Server.java55510
-rw-r--r--src/main/java/org/openslx/sat/thrift/iface/User.java588
-rw-r--r--src/main/java/org/openslx/sat/thrift/version/Version.java2
-rw-r--r--src/main/java/org/openslx/thrifthelper/ThriftHandler.java27
-rw-r--r--src/main/java/org/openslx/util/TimeoutReference.java49
-rw-r--r--src/main/thrift/bwlp.thrift242
-rw-r--r--src/main/thrift/imagemaster.thrift162
-rw-r--r--src/main/thrift/sat.thrift104
-rwxr-xr-xthrift-compile.sh16
38 files changed, 530 insertions, 84045 deletions
diff --git a/pom.xml b/pom.xml
index a8bbaba..a097104 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
<groupId>org.openslx.bwlp</groupId>
<artifactId>master-sync-shared</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>master-sync-shared</name>
diff --git a/src/main/java/org/openslx/filetransfer/ClassTest.java b/src/main/java/org/openslx/filetransfer/ClassTest.java
index 92269bb..37b37c0 100644
--- a/src/main/java/org/openslx/filetransfer/ClassTest.java
+++ b/src/main/java/org/openslx/filetransfer/ClassTest.java
@@ -141,7 +141,7 @@ public class ClassTest
// Implementing IncomingEvent for testing case.
static class Test implements IncomingEvent
{
- public void incomingUploader( Uploader uploader ) throws IOException
+ public void incomingDownloadRequest( Uploader uploader ) throws IOException
{
if ( uploader.getToken() == null ) {
System.out.println( "Incoming uploader: could not get token!" );
@@ -153,7 +153,7 @@ public class ClassTest
System.out.println( "Incomgin uploader OK" );
}
- public void incomingDownloader( Downloader downloader ) throws IOException
+ public void incomingUploadRequest( Downloader downloader ) throws IOException
{
if ( downloader.getToken() == null ) {
System.out.println( "Incoming downloader: could not get token!" );
diff --git a/src/main/java/org/openslx/filetransfer/Downloader.java b/src/main/java/org/openslx/filetransfer/Downloader.java
index 00c6f69..20a50e6 100644
--- a/src/main/java/org/openslx/filetransfer/Downloader.java
+++ b/src/main/java/org/openslx/filetransfer/Downloader.java
@@ -4,9 +4,9 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
+import java.net.Socket;
import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSocket;
import org.apache.log4j.Logger;
@@ -38,11 +38,20 @@ public class Downloader extends Transfer
* @param socket established connection to peer which requested an upload.
* @throws IOException
*/
- protected Downloader( SSLSocket socket ) throws IOException
+ protected Downloader( Socket socket ) throws IOException
{
super( socket, log );
}
+ /**
+ * Initiate the download. This method does not return until the file transfer finished.
+ *
+ * @param destinationFile destination file name to download to
+ * @param rangeCallback this object's .get() method is called whenever the downloader needs to
+ * know which part of the file to request next. This method should return null if no
+ * more parts are needed, which in turn let's this method return true
+ * @return true on success, false otherwise
+ */
public boolean download( final String destinationFile, final WantRangeCallback callback )
{
RandomAccessFile file = null;
@@ -69,14 +78,20 @@ public class Downloader extends Transfer
};
return download( cb, callback );
} finally {
- if ( file != null )
- try {
- file.close();
- } catch ( IOException e ) {
- }
+ Transfer.safeClose( file );
}
}
+ /**
+ * Initiate the download. This method does not return until the file transfer finished.
+ *
+ * @param dataCallback this object's .dataReceived() method is called whenever a chunk of data is
+ * received
+ * @param rangeCallback this object's .get() method is called whenever the downloader needs to
+ * know which part of the file to request next. This method should return null if no
+ * more parts are needed, which in turn let's this method return true
+ * @return true on success, false otherwise
+ */
public boolean download( DataReceivedCallback dataCallback, WantRangeCallback rangeCallback )
{
if ( shouldGetToken() ) {
diff --git a/src/main/java/org/openslx/filetransfer/IncomingEvent.java b/src/main/java/org/openslx/filetransfer/IncomingEvent.java
index fc5dc63..d72ecdd 100644
--- a/src/main/java/org/openslx/filetransfer/IncomingEvent.java
+++ b/src/main/java/org/openslx/filetransfer/IncomingEvent.java
@@ -11,7 +11,7 @@ import java.io.IOException;
*/
public interface IncomingEvent
{
- void incomingUploader( Uploader uploader ) throws IOException;
+ void incomingDownloadRequest( Uploader uploader ) throws IOException;
- void incomingDownloader( Downloader downloader ) throws IOException;
+ void incomingUploadRequest( Downloader downloader ) throws IOException;
}
diff --git a/src/main/java/org/openslx/filetransfer/Listener.java b/src/main/java/org/openslx/filetransfer/Listener.java
index 699c61d..e4e99e9 100644
--- a/src/main/java/org/openslx/filetransfer/Listener.java
+++ b/src/main/java/org/openslx/filetransfer/Listener.java
@@ -1,29 +1,35 @@
package org.openslx.filetransfer;
import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;
-import javax.net.ssl.SSLSocket;
import org.apache.log4j.Logger;
-public class Listener extends Thread
+public class Listener
{
- private IncomingEvent incomingEvent;
- private SSLContext context;
- private int port;
- final private int U = 85; // hex - code 'U' = 85.
- final private int D = 68; // hex - code 'D' = 68.
+ private final IncomingEvent incomingEvent;
+ private final SSLContext context;
+ private final int port;
+ private ServerSocket listenSocket = null;
+ private Thread acceptThread = null;
+ private static final byte U = 85; // hex - code 'U' = 85.
+ private static final byte D = 68; // hex - code 'D' = 68.
private static Logger log = Logger.getLogger( Listener.class );
/***********************************************************************/
/**
- * Constructor for class Listener, which gets an instance of IncomingEvent.
+ * File transfer listener. This is the active side, opening a port and
+ * waiting for incoming connections.
*
- * @param e
+ * @param e the event handler for incoming connections
+ * @param context the SSL context used for encryption; if null, unencrypted connections will be
+ * used
+ * @param port port to listen on
*/
public Listener( IncomingEvent e, SSLContext context, int port )
{
@@ -38,48 +44,74 @@ public class Listener extends Thread
* connection, and start Downloader or Uploader.
*
*/
- private void listen()
+ private boolean listen()
{
- SSLServerSocket welcomeSocket = null;
try {
- SSLServerSocketFactory sslServerSocketFactory = context.getServerSocketFactory();
- welcomeSocket = (SSLServerSocket)sslServerSocketFactory.createServerSocket( this.port );
+ if ( this.context == null ) {
+ listenSocket = new ServerSocket( this.port );
+ } else {
+ SSLServerSocketFactory sslServerSocketFactory = context.getServerSocketFactory();
+ listenSocket = sslServerSocketFactory.createServerSocket( this.port );
+ }
+ } catch ( Exception e ) {
+ log.error( "Cannot listen on port " + this.port );
+ return false;
+ }
+ return true;
+ }
- while ( !isInterrupted() ) {
- SSLSocket connectionSocket = (SSLSocket)welcomeSocket.accept();
- connectionSocket.setSoTimeout( 2000 ); // 2 second timeout enough? Maybe even use a small thread pool for handling accepted connections
+ private void run()
+ {
+ final Listener instance = this;
+ acceptThread = new Thread() {
+ @Override
+ public void run()
+ {
+ try {
+ while ( !isInterrupted() ) {
+ Socket connectionSocket = null;
+ try {
+ connectionSocket = listenSocket.accept();
+ connectionSocket.setSoTimeout( 2000 ); // 2 second timeout enough? Maybe even use a small thread pool for handling accepted connections
- byte[] b = new byte[ 1 ];
- int length = connectionSocket.getInputStream().read( b );
+ byte[] b = new byte[ 1 ];
+ int length = connectionSocket.getInputStream().read( b );
- log.debug( "Length (Listener): " + length );
+ connectionSocket.setSoTimeout( 10000 );
- if ( b[0] == U ) {
- log.debug( "recognized U --> starting Downloader" );
- // --> start Downloader(socket).
- Downloader d = new Downloader( connectionSocket );
- incomingEvent.incomingDownloader( d );
- }
- else if ( b[0] == D ) {
- log.debug( "recognized D --> starting Uploader" );
- // --> start Uploader(socket).
- Uploader u = new Uploader( connectionSocket );
- incomingEvent.incomingUploader( u );
- }
- else {
- log.debug( "Got invalid option ... close connection" );
- connectionSocket.close();
+ log.debug( "Length (Listener): " + length );
+
+ if ( b[0] == U ) {
+ log.debug( "recognized U --> starting Downloader" );
+ // --> start Downloader(socket).
+ Downloader d = new Downloader( connectionSocket );
+ incomingEvent.incomingUploadRequest( d );
+ }
+ else if ( b[0] == D ) {
+ log.debug( "recognized D --> starting Uploader" );
+ // --> start Uploader(socket).
+ Uploader u = new Uploader( connectionSocket );
+ incomingEvent.incomingDownloadRequest( u );
+ }
+ else {
+ log.debug( "Got invalid option ... close connection" );
+ connectionSocket.close();
+ }
+ } catch ( IOException e ) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ } finally {
+ synchronized ( instance ) {
+ Transfer.safeClose( listenSocket );
+ listenSocket = null;
+ }
}
}
- } catch ( Exception e ) {
- e.printStackTrace(); // same as writing to System.err.println(e.toString).
- } finally {
- try {
- welcomeSocket.close();
- } catch ( IOException e ) {
- // Nothing we can do
- }
- }
+ };
+ acceptThread.start();
+ log.info( "Starting to accept " + ( this.context == null ? "UNENCRYPTED" : "encrypted" ) + " connections on port " + this.port );
}
public int getPort()
@@ -87,14 +119,36 @@ public class Listener extends Thread
return this.port;
}
- @Override
- public void run()
+ /**
+ * Check whether this listener is running.
+ *
+ * @return true if this instance is currently listening for connections and runs the accept loop.
+ */
+ public synchronized boolean isRunning()
{
- try {
- this.listen();
- } catch ( Exception e ) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ return acceptThread != null && acceptThread.isAlive() && listenSocket != null && !listenSocket.isClosed();
+ }
+
+ /**
+ * Check whether this listener was started.
+ *
+ * @return true if this instance was started before, but might have been stopped already.
+ */
+ public synchronized boolean wasStarted()
+ {
+ return acceptThread != null;
+ }
+
+ /**
+ * Start this listener.
+ *
+ * @return true if the port could be openened and the accepting thread was started
+ */
+ public synchronized boolean start()
+ {
+ if ( !this.listen() )
+ return false;
+ this.run();
+ return true;
}
}
diff --git a/src/main/java/org/openslx/filetransfer/Transfer.java b/src/main/java/org/openslx/filetransfer/Transfer.java
index 3f2fdde..3e278c8 100644
--- a/src/main/java/org/openslx/filetransfer/Transfer.java
+++ b/src/main/java/org/openslx/filetransfer/Transfer.java
@@ -1,23 +1,23 @@
package org.openslx.filetransfer;
+import java.io.Closeable;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
+import java.net.Socket;
import java.net.SocketTimeoutException;
-import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import org.apache.log4j.Logger;
public abstract class Transfer
{
- protected final SSLSocket transferSocket;
+ protected final Socket transferSocket;
protected final DataOutputStream outStream;
protected final DataInputStream dataFromServer;
protected String ERROR = null;
@@ -30,7 +30,7 @@ public abstract class Transfer
*
* @param host Remote Host
* @param port Remote Port
- * @param context SSL Context for encryption
+ * @param context SSL Context for encryption, null if plain
* @param log Logger to use
* @throws IOException
*/
@@ -38,10 +38,13 @@ public abstract class Transfer
{
this.log = log;
// create socket.
- SSLSocketFactory sslSocketFactory = context.getSocketFactory();
-
- transferSocket = (SSLSocket)sslSocketFactory.createSocket();
- transferSocket.setSoTimeout( 5000 ); // set socket timeout.
+ if ( context == null ) {
+ transferSocket = new Socket();
+ } else {
+ SSLSocketFactory sslSocketFactory = context.getSocketFactory();
+ transferSocket = sslSocketFactory.createSocket();
+ }
+ transferSocket.setSoTimeout( 10000 ); // set socket timeout.
transferSocket.connect( new InetSocketAddress( host, port ) );
outStream = new DataOutputStream( transferSocket.getOutputStream() );
@@ -56,7 +59,7 @@ public abstract class Transfer
* @param log Logger to use
* @throws IOException
*/
- protected Transfer( SSLSocket socket, Logger log ) throws IOException
+ protected Transfer( Socket socket, Logger log ) throws IOException
{
this.log = log;
transferSocket = socket;
@@ -122,7 +125,7 @@ public abstract class Transfer
protected boolean sendEndOfMeta()
{
try {
- outStream.writeByte( 0 );
+ outStream.writeShort( 0 );
} catch ( SocketTimeoutException e ) {
log.error( "Error sending end of meta - socket timeout" );
return false;
@@ -146,39 +149,10 @@ public abstract class Transfer
Map<String, String> entries = new HashMap<>();
try {
while ( true ) {
- byte[] incoming = new byte[ 255 ];
-
- // First get length.
- int retLengthByte;
- retLengthByte = dataFromServer.read( incoming, 0, 1 );
- // If .read() didn't return 1, it was not able to read first byte.
- if ( retLengthByte != 1 ) {
- log.debug( " retLenthByte was not 1! retLengthByte = " + retLengthByte );
- this.close( "Error occured while reading Metadata." );
- return null;
- }
+ String data = dataFromServer.readUTF();
- int length = incoming[0] & 0xFF;
- log.debug( "length (downloader): " + length );
-
- if ( length == 0 )
- break;
-
- /*
- * Read the next available bytes and split by '=' for
- * getting TOKEN or RANGE.
- */
- int hasRead = 0;
- while ( hasRead < length ) {
- int ret = dataFromServer.read( incoming, hasRead, length - hasRead );
- if ( ret == -1 ) {
- this.close( "Error occured while reading Metadata." );
- return null;
- }
- hasRead += ret;
- }
-
- String data = new String( incoming, 0, length, StandardCharsets.UTF_8 );
+ if ( data == null || data.length() == 0 )
+ break; // End of meta data
String[] splitted = data.split( "=", 2 );
if ( splitted.length != 2 ) {
@@ -208,12 +182,12 @@ public abstract class Transfer
private void sendKeyValuePair( String key, String value ) throws IOException
{
- byte[] data = ( key + "=" + value ).getBytes( StandardCharsets.UTF_8 );
+ if ( outStream == null )
+ return;
try {
- outStream.writeByte( data.length );
- outStream.write( data );
- } catch ( SocketTimeoutException e ) {
- log.warn( "Socket timeout when sending KVP with key " + key );
+ outStream.writeUTF( key + "=" + value );
+ } catch ( Exception e ) {
+ this.close( e.getClass().getSimpleName() + " when sending KVP with key " + key );
}
}
@@ -222,20 +196,21 @@ public abstract class Transfer
* Method for closing connection, if download has finished.
*
*/
- public void close( String error )
+ public void close( String error, UploadStatusCallback callback, boolean sendToPeer )
{
- if ( error != null )
+ if ( error != null ) {
+ if ( sendToPeer )
+ sendErrorCode( error );
+ if ( callback != null )
+ callback.uploadError( error );
log.info( error );
- try {
- if ( transferSocket != null )
- this.transferSocket.close();
- if ( dataFromServer != null )
- dataFromServer.close();
- if ( outStream != null )
- outStream.close();
- } catch ( IOException e ) {
- e.printStackTrace();
}
+ safeClose( dataFromServer, outStream, transferSocket );
+ }
+
+ public void close( String error )
+ {
+ close( error, null, false );
}
/**
@@ -295,6 +270,28 @@ public abstract class Transfer
}
/**
+ * Close given stream, socket, anything closeable.
+ * Never throws any exception, if it's not closeable there's
+ * not much else we can do.
+ *
+ * @param list one or more closeables. Pass one, many, or an array
+ */
+ static protected void safeClose( Closeable... list )
+ {
+ if ( list == null )
+ return;
+ for ( Closeable c : list ) {
+ if ( c == null )
+ continue;
+ try {
+ c.close();
+ } catch ( Throwable t ) {
+ // Silcence...
+ }
+ }
+ }
+
+ /**
* High level access to key-value-pairs.
*/
class MetaData
diff --git a/src/main/java/org/openslx/filetransfer/UploadStatusCallback.java b/src/main/java/org/openslx/filetransfer/UploadStatusCallback.java
new file mode 100644
index 0000000..72f8f61
--- /dev/null
+++ b/src/main/java/org/openslx/filetransfer/UploadStatusCallback.java
@@ -0,0 +1,10 @@
+package org.openslx.filetransfer;
+
+public interface UploadStatusCallback
+{
+
+ public void uploadError( String message );
+
+ public void uploadProgress( long bytesSent );
+
+}
diff --git a/src/main/java/org/openslx/filetransfer/Uploader.java b/src/main/java/org/openslx/filetransfer/Uploader.java
index 87845fa..748b1e2 100644
--- a/src/main/java/org/openslx/filetransfer/Uploader.java
+++ b/src/main/java/org/openslx/filetransfer/Uploader.java
@@ -4,9 +4,9 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
+import java.net.Socket;
import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSocket;
import org.apache.log4j.Logger;
@@ -39,7 +39,7 @@ public class Uploader extends Transfer
*
* @throws IOException
*/
- public Uploader( SSLSocket socket ) throws IOException
+ public Uploader( Socket socket ) throws IOException
{
super( socket, log );
}
@@ -52,6 +52,12 @@ public class Uploader extends Transfer
*/
public boolean upload( String filename )
{
+ return upload( filename, null );
+ }
+
+ @SuppressWarnings( "resource" )
+ public boolean upload( String filename, UploadStatusCallback callback )
+ {
if ( shouldGetToken() ) {
log.error( "You didn't call getToken yet!" );
return false;
@@ -61,14 +67,14 @@ public class Uploader extends Transfer
try {
file = new RandomAccessFile( new File( filename ), "r" );
} catch ( FileNotFoundException e ) {
- log.error( "Could not open " + filename + " for reading." );
+ this.close( "Could not open given file for reading.", callback, true );
return false;
}
for ( ;; ) { // Loop as long as remote peer is requesting chunks from this file
// Read meta data of remote peer - either new range, or it's telling us it's done
MetaData meta = readMetaData();
if ( meta == null ) {
- log.error( "Did not get meta data from remote peer." );
+ this.close( "Did not get meta data from remote peer.", callback, true );
return false;
}
if ( meta.isDone() ) // Download complete?
@@ -76,37 +82,35 @@ public class Uploader extends Transfer
// Not complete, so there must be another range request
FileRange requestedRange = meta.getRange();
if ( requestedRange == null ) {
- log.error( "Remote peer did not include RANGE in meta data." );
- sendErrorCode( "no (valid) range in request" );
+ this.close( "Peer did not include RANGE in meta data.", callback, true );
return false;
}
// Range inside file?
try {
if ( requestedRange.endOffset > file.length() ) {
- log.error( "Requested range is larger than file size, aborting." );
- sendErrorCode( "range out of file bounds" );
+ this.close( "Requested range is larger than file size, aborting.", callback, true );
return false;
}
} catch ( IOException e ) {
- log.error( "Could not get current length of file " + filename );
+ this.close( "Could not get current length of file " + filename, callback, false );
return false;
}
// Seek to requested chunk
try {
file.seek( requestedRange.startOffset );
} catch ( IOException e ) {
- log.error( "Could not seek to start of requested range in " + filename + " (" + requestedRange.startOffset + ")" );
+ this.close( "Could not seek to start of requested range in given file (" + requestedRange.startOffset + ")", callback, true );
return false;
}
// Send confirmation of range we're about to send
try {
long ptr = file.getFilePointer();
if ( !sendRange( ptr, ptr + requestedRange.getLength() ) || !sendEndOfMeta() ) {
- log.error( "Could not send range confirmation" );
+ this.close( "Could not send range confirmation" );
return false;
}
} catch ( IOException e ) {
- log.error( "Could not determine current position in file " + filename );
+ this.close( "Could not determine current position in file " + filename );
return false;
}
// Finally send requested chunk
@@ -118,30 +122,26 @@ public class Uploader extends Transfer
try {
ret = file.read( data, 0, Math.min( length - hasRead, data.length ) );
} catch ( IOException e ) {
- log.error( "Error reading from file " + filename );
+ this.close( "Error reading from file ", callback, true );
return false;
}
if ( ret == -1 ) {
- this.close( "Error occured in Uploader.sendFile(),"
- + " while reading from File to send." );
+ this.close( "Error occured in Uploader.sendFile() while reading from File to send.", callback, true );
return false;
}
hasRead += ret;
try {
outStream.write( data, 0, ret );
} catch ( IOException e ) {
- log.error( "Sending payload failed" );
+ this.close( "Sending payload failed" );
return false;
}
+ if ( callback != null )
+ callback.uploadProgress( ret );
}
}
} finally {
- if ( file != null ) {
- try {
- file.close();
- } catch ( IOException e ) {
- }
- }
+ Transfer.safeClose( file );
}
return true;
}
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java
deleted file mode 100644
index 965ddd2..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-public enum AuthenticationError implements org.apache.thrift.TEnum {
- GENERIC_ERROR(0),
- INVALID_CREDENTIALS(1),
- ACCOUNT_SUSPENDED(2),
- INVALID_ORGANIZATION(3),
- INVALID_KEY(4),
- CHALLENGE_FAILED(5),
- BANNED_NETWORK(6);
-
- private final int value;
-
- private AuthenticationError(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static AuthenticationError findByValue(int value) {
- switch (value) {
- case 0:
- return GENERIC_ERROR;
- case 1:
- return INVALID_CREDENTIALS;
- case 2:
- return ACCOUNT_SUSPENDED;
- case 3:
- return INVALID_ORGANIZATION;
- case 4:
- return INVALID_KEY;
- case 5:
- return CHALLENGE_FAILED;
- case 6:
- return BANNED_NETWORK;
- default:
- return null;
- }
- }
-}
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java
deleted file mode 100644
index 5efc66c..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException");
-
- private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AuthenticationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AuthenticationExceptionTupleSchemeFactory());
- }
-
- /**
- *
- * @see AuthenticationError
- */
- public AuthenticationError number; // required
- public String message; // 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 {
- /**
- *
- * @see AuthenticationError
- */
- NUMBER((short)1, "number"),
- MESSAGE((short)2, "message");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NUMBER
- return NUMBER;
- case 2: // MESSAGE
- return MESSAGE;
- 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthenticationError.class)));
- tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(AuthenticationException.class, metaDataMap);
- }
-
- public AuthenticationException() {
- }
-
- public AuthenticationException(
- AuthenticationError number,
- String message)
- {
- this();
- this.number = number;
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public AuthenticationException(AuthenticationException other) {
- if (other.isSetNumber()) {
- this.number = other.number;
- }
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public AuthenticationException deepCopy() {
- return new AuthenticationException(this);
- }
-
- @Override
- public void clear() {
- this.number = null;
- this.message = null;
- }
-
- /**
- *
- * @see AuthenticationError
- */
- public AuthenticationError getNumber() {
- return this.number;
- }
-
- /**
- *
- * @see AuthenticationError
- */
- public AuthenticationException setNumber(AuthenticationError number) {
- this.number = number;
- return this;
- }
-
- public void unsetNumber() {
- this.number = null;
- }
-
- /** Returns true if field number is set (has been assigned a value) and false otherwise */
- public boolean isSetNumber() {
- return this.number != null;
- }
-
- public void setNumberIsSet(boolean value) {
- if (!value) {
- this.number = null;
- }
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public AuthenticationException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NUMBER:
- if (value == null) {
- unsetNumber();
- } else {
- setNumber((AuthenticationError)value);
- }
- break;
-
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NUMBER:
- return getNumber();
-
- case MESSAGE:
- return getMessage();
-
- }
- 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 NUMBER:
- return isSetNumber();
- case MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof AuthenticationException)
- return this.equals((AuthenticationException)that);
- return false;
- }
-
- public boolean equals(AuthenticationException that) {
- if (that == null)
- return false;
-
- boolean this_present_number = true && this.isSetNumber();
- boolean that_present_number = true && that.isSetNumber();
- if (this_present_number || that_present_number) {
- if (!(this_present_number && that_present_number))
- return false;
- if (!this.number.equals(that.number))
- return false;
- }
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(AuthenticationException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNumber()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("AuthenticationException(");
- boolean first = true;
-
- sb.append("number:");
- if (this.number == null) {
- sb.append("null");
- } else {
- sb.append(this.number);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- 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 AuthenticationExceptionStandardSchemeFactory implements SchemeFactory {
- public AuthenticationExceptionStandardScheme getScheme() {
- return new AuthenticationExceptionStandardScheme();
- }
- }
-
- private static class AuthenticationExceptionStandardScheme extends StandardScheme<AuthenticationException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, AuthenticationException 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: // NUMBER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.number = AuthenticationError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, AuthenticationException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.number != null) {
- oprot.writeFieldBegin(NUMBER_FIELD_DESC);
- oprot.writeI32(struct.number.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class AuthenticationExceptionTupleSchemeFactory implements SchemeFactory {
- public AuthenticationExceptionTupleScheme getScheme() {
- return new AuthenticationExceptionTupleScheme();
- }
- }
-
- private static class AuthenticationExceptionTupleScheme extends TupleScheme<AuthenticationException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNumber()) {
- optionals.set(0);
- }
- if (struct.isSetMessage()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetNumber()) {
- oprot.writeI32(struct.number.getValue());
- }
- if (struct.isSetMessage()) {
- oprot.writeString(struct.message);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AuthenticationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.number = AuthenticationError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- }
- if (incoming.get(1)) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java
deleted file mode 100644
index a49ad92..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-public enum AuthorizationError implements org.apache.thrift.TEnum {
- GENERIC_ERROR(0),
- NOT_AUTHENTICATED(1),
- NO_PERMISSION(2);
-
- private final int value;
-
- private AuthorizationError(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static AuthorizationError findByValue(int value) {
- switch (value) {
- case 0:
- return GENERIC_ERROR;
- case 1:
- return NOT_AUTHENTICATED;
- case 2:
- return NO_PERMISSION;
- default:
- return null;
- }
- }
-}
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java
deleted file mode 100644
index 5f798ac..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException");
-
- private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AuthorizationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory());
- }
-
- /**
- *
- * @see AuthorizationError
- */
- public AuthorizationError number; // required
- public String message; // 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 {
- /**
- *
- * @see AuthorizationError
- */
- NUMBER((short)1, "number"),
- MESSAGE((short)2, "message");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NUMBER
- return NUMBER;
- case 2: // MESSAGE
- return MESSAGE;
- 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthorizationError.class)));
- tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(AuthorizationException.class, metaDataMap);
- }
-
- public AuthorizationException() {
- }
-
- public AuthorizationException(
- AuthorizationError number,
- String message)
- {
- this();
- this.number = number;
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public AuthorizationException(AuthorizationException other) {
- if (other.isSetNumber()) {
- this.number = other.number;
- }
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public AuthorizationException deepCopy() {
- return new AuthorizationException(this);
- }
-
- @Override
- public void clear() {
- this.number = null;
- this.message = null;
- }
-
- /**
- *
- * @see AuthorizationError
- */
- public AuthorizationError getNumber() {
- return this.number;
- }
-
- /**
- *
- * @see AuthorizationError
- */
- public AuthorizationException setNumber(AuthorizationError number) {
- this.number = number;
- return this;
- }
-
- public void unsetNumber() {
- this.number = null;
- }
-
- /** Returns true if field number is set (has been assigned a value) and false otherwise */
- public boolean isSetNumber() {
- return this.number != null;
- }
-
- public void setNumberIsSet(boolean value) {
- if (!value) {
- this.number = null;
- }
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public AuthorizationException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NUMBER:
- if (value == null) {
- unsetNumber();
- } else {
- setNumber((AuthorizationError)value);
- }
- break;
-
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NUMBER:
- return getNumber();
-
- case MESSAGE:
- return getMessage();
-
- }
- 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 NUMBER:
- return isSetNumber();
- case MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof AuthorizationException)
- return this.equals((AuthorizationException)that);
- return false;
- }
-
- public boolean equals(AuthorizationException that) {
- if (that == null)
- return false;
-
- boolean this_present_number = true && this.isSetNumber();
- boolean that_present_number = true && that.isSetNumber();
- if (this_present_number || that_present_number) {
- if (!(this_present_number && that_present_number))
- return false;
- if (!this.number.equals(that.number))
- return false;
- }
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(AuthorizationException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNumber()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("AuthorizationException(");
- boolean first = true;
-
- sb.append("number:");
- if (this.number == null) {
- sb.append("null");
- } else {
- sb.append(this.number);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- 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 AuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
- public AuthorizationExceptionStandardScheme getScheme() {
- return new AuthorizationExceptionStandardScheme();
- }
- }
-
- private static class AuthorizationExceptionStandardScheme extends StandardScheme<AuthorizationException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException 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: // NUMBER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.number = AuthorizationError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, AuthorizationException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.number != null) {
- oprot.writeFieldBegin(NUMBER_FIELD_DESC);
- oprot.writeI32(struct.number.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
- public AuthorizationExceptionTupleScheme getScheme() {
- return new AuthorizationExceptionTupleScheme();
- }
- }
-
- private static class AuthorizationExceptionTupleScheme extends TupleScheme<AuthorizationException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNumber()) {
- optionals.set(0);
- }
- if (struct.isSetMessage()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetNumber()) {
- oprot.writeI32(struct.number.getValue());
- }
- if (struct.isSetMessage()) {
- oprot.writeString(struct.message);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.number = AuthorizationError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- }
- if (incoming.get(1)) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java
deleted file mode 100644
index 2dda1f7..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java
+++ /dev/null
@@ -1,635 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DownloadData implements org.apache.thrift.TBase<DownloadData, DownloadData._Fields>, java.io.Serializable, Cloneable, Comparable<DownloadData> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DownloadData");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField CRC_SUMS_FIELD_DESC = new org.apache.thrift.protocol.TField("crcSums", org.apache.thrift.protocol.TType.LIST, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DownloadDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DownloadDataTupleSchemeFactory());
- }
-
- public String token; // required
- public int port; // required
- public List<Integer> crcSums; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token"),
- PORT((short)2, "port"),
- CRC_SUMS((short)3, "crcSums");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- case 2: // PORT
- return PORT;
- case 3: // CRC_SUMS
- return CRC_SUMS;
- 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 __PORT_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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.CRC_SUMS, new org.apache.thrift.meta_data.FieldMetaData("crcSums", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DownloadData.class, metaDataMap);
- }
-
- public DownloadData() {
- }
-
- public DownloadData(
- String token,
- int port,
- List<Integer> crcSums)
- {
- this();
- this.token = token;
- this.port = port;
- setPortIsSet(true);
- this.crcSums = crcSums;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public DownloadData(DownloadData other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetToken()) {
- this.token = other.token;
- }
- this.port = other.port;
- if (other.isSetCrcSums()) {
- List<Integer> __this__crcSums = new ArrayList<Integer>(other.crcSums);
- this.crcSums = __this__crcSums;
- }
- }
-
- public DownloadData deepCopy() {
- return new DownloadData(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- setPortIsSet(false);
- this.port = 0;
- this.crcSums = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public DownloadData setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public int getPort() {
- return this.port;
- }
-
- public DownloadData setPort(int port) {
- this.port = port;
- setPortIsSet(true);
- return this;
- }
-
- public void unsetPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
- }
-
- /** Returns true if field port is set (has been assigned a value) and false otherwise */
- public boolean isSetPort() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
- }
-
- public void setPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
- }
-
- public int getCrcSumsSize() {
- return (this.crcSums == null) ? 0 : this.crcSums.size();
- }
-
- public java.util.Iterator<Integer> getCrcSumsIterator() {
- return (this.crcSums == null) ? null : this.crcSums.iterator();
- }
-
- public void addToCrcSums(int elem) {
- if (this.crcSums == null) {
- this.crcSums = new ArrayList<Integer>();
- }
- this.crcSums.add(elem);
- }
-
- public List<Integer> getCrcSums() {
- return this.crcSums;
- }
-
- public DownloadData setCrcSums(List<Integer> crcSums) {
- this.crcSums = crcSums;
- return this;
- }
-
- public void unsetCrcSums() {
- this.crcSums = null;
- }
-
- /** Returns true if field crcSums is set (has been assigned a value) and false otherwise */
- public boolean isSetCrcSums() {
- return this.crcSums != null;
- }
-
- public void setCrcSumsIsSet(boolean value) {
- if (!value) {
- this.crcSums = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case PORT:
- if (value == null) {
- unsetPort();
- } else {
- setPort((Integer)value);
- }
- break;
-
- case CRC_SUMS:
- if (value == null) {
- unsetCrcSums();
- } else {
- setCrcSums((List<Integer>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- case PORT:
- return Integer.valueOf(getPort());
-
- case CRC_SUMS:
- return getCrcSums();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- case PORT:
- return isSetPort();
- case CRC_SUMS:
- return isSetCrcSums();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof DownloadData)
- return this.equals((DownloadData)that);
- return false;
- }
-
- public boolean equals(DownloadData that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_port = true;
- boolean that_present_port = true;
- if (this_present_port || that_present_port) {
- if (!(this_present_port && that_present_port))
- return false;
- if (this.port != that.port)
- return false;
- }
-
- boolean this_present_crcSums = true && this.isSetCrcSums();
- boolean that_present_crcSums = true && that.isSetCrcSums();
- if (this_present_crcSums || that_present_crcSums) {
- if (!(this_present_crcSums && that_present_crcSums))
- return false;
- if (!this.crcSums.equals(that.crcSums))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(DownloadData other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCrcSums()).compareTo(other.isSetCrcSums());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCrcSums()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.crcSums, other.crcSums);
- 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("DownloadData(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("port:");
- sb.append(this.port);
- first = false;
- if (!first) sb.append(", ");
- sb.append("crcSums:");
- if (this.crcSums == null) {
- sb.append("null");
- } else {
- sb.append(this.crcSums);
- }
- 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 DownloadDataStandardSchemeFactory implements SchemeFactory {
- public DownloadDataStandardScheme getScheme() {
- return new DownloadDataStandardScheme();
- }
- }
-
- private static class DownloadDataStandardScheme extends StandardScheme<DownloadData> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, DownloadData struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.port = iprot.readI32();
- struct.setPortIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CRC_SUMS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.crcSums = new ArrayList<Integer>(_list8.size);
- for (int _i9 = 0; _i9 < _list8.size; ++_i9)
- {
- int _elem10;
- _elem10 = iprot.readI32();
- struct.crcSums.add(_elem10);
- }
- iprot.readListEnd();
- }
- struct.setCrcSumsIsSet(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, DownloadData struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(PORT_FIELD_DESC);
- oprot.writeI32(struct.port);
- oprot.writeFieldEnd();
- if (struct.crcSums != null) {
- oprot.writeFieldBegin(CRC_SUMS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.crcSums.size()));
- for (int _iter11 : struct.crcSums)
- {
- oprot.writeI32(_iter11);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class DownloadDataTupleSchemeFactory implements SchemeFactory {
- public DownloadDataTupleScheme getScheme() {
- return new DownloadDataTupleScheme();
- }
- }
-
- private static class DownloadDataTupleScheme extends TupleScheme<DownloadData> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, DownloadData struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- if (struct.isSetPort()) {
- optionals.set(1);
- }
- if (struct.isSetCrcSums()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetPort()) {
- oprot.writeI32(struct.port);
- }
- if (struct.isSetCrcSums()) {
- {
- oprot.writeI32(struct.crcSums.size());
- for (int _iter12 : struct.crcSums)
- {
- oprot.writeI32(_iter12);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, DownloadData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(1)) {
- struct.port = iprot.readI32();
- struct.setPortIsSet(true);
- }
- if (incoming.get(2)) {
- {
- org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.crcSums = new ArrayList<Integer>(_list13.size);
- for (int _i14 = 0; _i14 < _list13.size; ++_i14)
- {
- int _elem15;
- _elem15 = iprot.readI32();
- struct.crcSums.add(_elem15);
- }
- }
- struct.setCrcSumsIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java
deleted file mode 100644
index 46404b9..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DownloadException extends TException implements org.apache.thrift.TBase<DownloadException, DownloadException._Fields>, java.io.Serializable, Cloneable, Comparable<DownloadException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DownloadException");
-
- private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DownloadExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DownloadExceptionTupleSchemeFactory());
- }
-
- /**
- *
- * @see UploadError
- */
- public UploadError number; // required
- public String message; // 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 {
- /**
- *
- * @see UploadError
- */
- NUMBER((short)1, "number"),
- MESSAGE((short)2, "message");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NUMBER
- return NUMBER;
- case 2: // MESSAGE
- return MESSAGE;
- 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, UploadError.class)));
- tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(DownloadException.class, metaDataMap);
- }
-
- public DownloadException() {
- }
-
- public DownloadException(
- UploadError number,
- String message)
- {
- this();
- this.number = number;
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public DownloadException(DownloadException other) {
- if (other.isSetNumber()) {
- this.number = other.number;
- }
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public DownloadException deepCopy() {
- return new DownloadException(this);
- }
-
- @Override
- public void clear() {
- this.number = null;
- this.message = null;
- }
-
- /**
- *
- * @see UploadError
- */
- public UploadError getNumber() {
- return this.number;
- }
-
- /**
- *
- * @see UploadError
- */
- public DownloadException setNumber(UploadError number) {
- this.number = number;
- return this;
- }
-
- public void unsetNumber() {
- this.number = null;
- }
-
- /** Returns true if field number is set (has been assigned a value) and false otherwise */
- public boolean isSetNumber() {
- return this.number != null;
- }
-
- public void setNumberIsSet(boolean value) {
- if (!value) {
- this.number = null;
- }
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public DownloadException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NUMBER:
- if (value == null) {
- unsetNumber();
- } else {
- setNumber((UploadError)value);
- }
- break;
-
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NUMBER:
- return getNumber();
-
- case MESSAGE:
- return getMessage();
-
- }
- 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 NUMBER:
- return isSetNumber();
- case MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof DownloadException)
- return this.equals((DownloadException)that);
- return false;
- }
-
- public boolean equals(DownloadException that) {
- if (that == null)
- return false;
-
- boolean this_present_number = true && this.isSetNumber();
- boolean that_present_number = true && that.isSetNumber();
- if (this_present_number || that_present_number) {
- if (!(this_present_number && that_present_number))
- return false;
- if (!this.number.equals(that.number))
- return false;
- }
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(DownloadException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNumber()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("DownloadException(");
- boolean first = true;
-
- sb.append("number:");
- if (this.number == null) {
- sb.append("null");
- } else {
- sb.append(this.number);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- 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 DownloadExceptionStandardSchemeFactory implements SchemeFactory {
- public DownloadExceptionStandardScheme getScheme() {
- return new DownloadExceptionStandardScheme();
- }
- }
-
- private static class DownloadExceptionStandardScheme extends StandardScheme<DownloadException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, DownloadException 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: // NUMBER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.number = UploadError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, DownloadException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.number != null) {
- oprot.writeFieldBegin(NUMBER_FIELD_DESC);
- oprot.writeI32(struct.number.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class DownloadExceptionTupleSchemeFactory implements SchemeFactory {
- public DownloadExceptionTupleScheme getScheme() {
- return new DownloadExceptionTupleScheme();
- }
- }
-
- private static class DownloadExceptionTupleScheme extends TupleScheme<DownloadException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, DownloadException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNumber()) {
- optionals.set(0);
- }
- if (struct.isSetMessage()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetNumber()) {
- oprot.writeI32(struct.number.getValue());
- }
- if (struct.isSetMessage()) {
- oprot.writeString(struct.message);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, DownloadException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.number = UploadError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- }
- if (incoming.get(1)) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java
deleted file mode 100644
index aeeb15b..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java
+++ /dev/null
@@ -1,1350 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ImageData implements org.apache.thrift.TBase<ImageData, ImageData._Fields>, java.io.Serializable, Cloneable, Comparable<ImageData> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageData");
-
- 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 REVISION_FIELD_DESC = new org.apache.thrift.protocol.TField("revision", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)4);
- private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.I64, (short)5);
- private static final org.apache.thrift.protocol.TField OWNER_LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerLogin", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField OPERATING_SYSTEM_FIELD_DESC = new org.apache.thrift.protocol.TField("operatingSystem", org.apache.thrift.protocol.TType.I32, (short)7);
- private static final org.apache.thrift.protocol.TField IS_VALID_FIELD_DESC = new org.apache.thrift.protocol.TField("isValid", org.apache.thrift.protocol.TType.BOOL, (short)8);
- private static final org.apache.thrift.protocol.TField IS_DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField("isDeleted", org.apache.thrift.protocol.TType.BOOL, (short)9);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)11);
- private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)12);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImageDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImageDataTupleSchemeFactory());
- }
-
- public String uuid; // required
- public int revision; // required
- public String title; // required
- public long createTime; // required
- public long updateTime; // required
- public String ownerLogin; // required
- public int operatingSystem; // required
- public boolean isValid; // required
- public boolean isDeleted; // required
- public String description; // required
- public long fileSize; // 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"),
- REVISION((short)2, "revision"),
- TITLE((short)3, "title"),
- CREATE_TIME((short)4, "createTime"),
- UPDATE_TIME((short)5, "updateTime"),
- OWNER_LOGIN((short)6, "ownerLogin"),
- OPERATING_SYSTEM((short)7, "operatingSystem"),
- IS_VALID((short)8, "isValid"),
- IS_DELETED((short)9, "isDeleted"),
- DESCRIPTION((short)11, "description"),
- FILE_SIZE((short)12, "fileSize");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // UUID
- return UUID;
- case 2: // REVISION
- return REVISION;
- case 3: // TITLE
- return TITLE;
- case 4: // CREATE_TIME
- return CREATE_TIME;
- case 5: // UPDATE_TIME
- return UPDATE_TIME;
- case 6: // OWNER_LOGIN
- return OWNER_LOGIN;
- case 7: // OPERATING_SYSTEM
- return OPERATING_SYSTEM;
- case 8: // IS_VALID
- return IS_VALID;
- case 9: // IS_DELETED
- return IS_DELETED;
- case 11: // DESCRIPTION
- return DESCRIPTION;
- case 12: // FILE_SIZE
- return FILE_SIZE;
- 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 __REVISION_ISSET_ID = 0;
- private static final int __CREATETIME_ISSET_ID = 1;
- private static final int __UPDATETIME_ISSET_ID = 2;
- private static final int __OPERATINGSYSTEM_ISSET_ID = 3;
- private static final int __ISVALID_ISSET_ID = 4;
- private static final int __ISDELETED_ISSET_ID = 5;
- private static final int __FILESIZE_ISSET_ID = 6;
- 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.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.REVISION, new org.apache.thrift.meta_data.FieldMetaData("revision", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
- tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
- tmpMap.put(_Fields.OWNER_LOGIN, new org.apache.thrift.meta_data.FieldMetaData("ownerLogin", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OPERATING_SYSTEM, new org.apache.thrift.meta_data.FieldMetaData("operatingSystem", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.IS_VALID, new org.apache.thrift.meta_data.FieldMetaData("isValid", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IS_DELETED, new org.apache.thrift.meta_data.FieldMetaData("isDeleted", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageData.class, metaDataMap);
- }
-
- public ImageData() {
- }
-
- public ImageData(
- String uuid,
- int revision,
- String title,
- long createTime,
- long updateTime,
- String ownerLogin,
- int operatingSystem,
- boolean isValid,
- boolean isDeleted,
- String description,
- long fileSize)
- {
- this();
- this.uuid = uuid;
- this.revision = revision;
- setRevisionIsSet(true);
- this.title = title;
- this.createTime = createTime;
- setCreateTimeIsSet(true);
- this.updateTime = updateTime;
- setUpdateTimeIsSet(true);
- this.ownerLogin = ownerLogin;
- this.operatingSystem = operatingSystem;
- setOperatingSystemIsSet(true);
- this.isValid = isValid;
- setIsValidIsSet(true);
- this.isDeleted = isDeleted;
- setIsDeletedIsSet(true);
- this.description = description;
- this.fileSize = fileSize;
- setFileSizeIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ImageData(ImageData other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetUuid()) {
- this.uuid = other.uuid;
- }
- this.revision = other.revision;
- if (other.isSetTitle()) {
- this.title = other.title;
- }
- this.createTime = other.createTime;
- this.updateTime = other.updateTime;
- if (other.isSetOwnerLogin()) {
- this.ownerLogin = other.ownerLogin;
- }
- this.operatingSystem = other.operatingSystem;
- this.isValid = other.isValid;
- this.isDeleted = other.isDeleted;
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- this.fileSize = other.fileSize;
- }
-
- public ImageData deepCopy() {
- return new ImageData(this);
- }
-
- @Override
- public void clear() {
- this.uuid = null;
- setRevisionIsSet(false);
- this.revision = 0;
- this.title = null;
- setCreateTimeIsSet(false);
- this.createTime = 0;
- setUpdateTimeIsSet(false);
- this.updateTime = 0;
- this.ownerLogin = null;
- setOperatingSystemIsSet(false);
- this.operatingSystem = 0;
- setIsValidIsSet(false);
- this.isValid = false;
- setIsDeletedIsSet(false);
- this.isDeleted = false;
- this.description = null;
- setFileSizeIsSet(false);
- this.fileSize = 0;
- }
-
- public String getUuid() {
- return this.uuid;
- }
-
- public ImageData 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 int getRevision() {
- return this.revision;
- }
-
- public ImageData setRevision(int revision) {
- this.revision = revision;
- setRevisionIsSet(true);
- return this;
- }
-
- public void unsetRevision() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVISION_ISSET_ID);
- }
-
- /** Returns true if field revision is set (has been assigned a value) and false otherwise */
- public boolean isSetRevision() {
- return EncodingUtils.testBit(__isset_bitfield, __REVISION_ISSET_ID);
- }
-
- public void setRevisionIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVISION_ISSET_ID, value);
- }
-
- public String getTitle() {
- return this.title;
- }
-
- public ImageData setTitle(String title) {
- this.title = title;
- return this;
- }
-
- public void unsetTitle() {
- this.title = null;
- }
-
- /** Returns true if field title is set (has been assigned a value) and false otherwise */
- public boolean isSetTitle() {
- return this.title != null;
- }
-
- public void setTitleIsSet(boolean value) {
- if (!value) {
- this.title = null;
- }
- }
-
- public long getCreateTime() {
- return this.createTime;
- }
-
- public ImageData setCreateTime(long createTime) {
- this.createTime = createTime;
- setCreateTimeIsSet(true);
- return this;
- }
-
- public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
- }
-
- /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
- public boolean isSetCreateTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
- }
-
- public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
- }
-
- public long getUpdateTime() {
- return this.updateTime;
- }
-
- public ImageData setUpdateTime(long updateTime) {
- this.updateTime = updateTime;
- setUpdateTimeIsSet(true);
- return this;
- }
-
- public void unsetUpdateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
- }
-
- /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdateTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
- }
-
- public void setUpdateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
- }
-
- public String getOwnerLogin() {
- return this.ownerLogin;
- }
-
- public ImageData setOwnerLogin(String ownerLogin) {
- this.ownerLogin = ownerLogin;
- return this;
- }
-
- public void unsetOwnerLogin() {
- this.ownerLogin = null;
- }
-
- /** Returns true if field ownerLogin is set (has been assigned a value) and false otherwise */
- public boolean isSetOwnerLogin() {
- return this.ownerLogin != null;
- }
-
- public void setOwnerLoginIsSet(boolean value) {
- if (!value) {
- this.ownerLogin = null;
- }
- }
-
- public int getOperatingSystem() {
- return this.operatingSystem;
- }
-
- public ImageData setOperatingSystem(int operatingSystem) {
- this.operatingSystem = operatingSystem;
- setOperatingSystemIsSet(true);
- return this;
- }
-
- public void unsetOperatingSystem() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID);
- }
-
- /** Returns true if field operatingSystem is set (has been assigned a value) and false otherwise */
- public boolean isSetOperatingSystem() {
- return EncodingUtils.testBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID);
- }
-
- public void setOperatingSystemIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID, value);
- }
-
- public boolean isIsValid() {
- return this.isValid;
- }
-
- public ImageData setIsValid(boolean isValid) {
- this.isValid = isValid;
- setIsValidIsSet(true);
- return this;
- }
-
- public void unsetIsValid() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
- }
-
- /** Returns true if field isValid is set (has been assigned a value) and false otherwise */
- public boolean isSetIsValid() {
- return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
- }
-
- public void setIsValidIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
- }
-
- public boolean isIsDeleted() {
- return this.isDeleted;
- }
-
- public ImageData setIsDeleted(boolean isDeleted) {
- this.isDeleted = isDeleted;
- setIsDeletedIsSet(true);
- return this;
- }
-
- public void unsetIsDeleted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDELETED_ISSET_ID);
- }
-
- /** Returns true if field isDeleted is set (has been assigned a value) and false otherwise */
- public boolean isSetIsDeleted() {
- return EncodingUtils.testBit(__isset_bitfield, __ISDELETED_ISSET_ID);
- }
-
- public void setIsDeletedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDELETED_ISSET_ID, value);
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public ImageData setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public long getFileSize() {
- return this.fileSize;
- }
-
- public ImageData setFileSize(long fileSize) {
- this.fileSize = fileSize;
- setFileSizeIsSet(true);
- return this;
- }
-
- public void unsetFileSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
- }
-
- /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
- public boolean isSetFileSize() {
- return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
- }
-
- public void setFileSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case UUID:
- if (value == null) {
- unsetUuid();
- } else {
- setUuid((String)value);
- }
- break;
-
- case REVISION:
- if (value == null) {
- unsetRevision();
- } else {
- setRevision((Integer)value);
- }
- break;
-
- case TITLE:
- if (value == null) {
- unsetTitle();
- } else {
- setTitle((String)value);
- }
- break;
-
- case CREATE_TIME:
- if (value == null) {
- unsetCreateTime();
- } else {
- setCreateTime((Long)value);
- }
- break;
-
- case UPDATE_TIME:
- if (value == null) {
- unsetUpdateTime();
- } else {
- setUpdateTime((Long)value);
- }
- break;
-
- case OWNER_LOGIN:
- if (value == null) {
- unsetOwnerLogin();
- } else {
- setOwnerLogin((String)value);
- }
- break;
-
- case OPERATING_SYSTEM:
- if (value == null) {
- unsetOperatingSystem();
- } else {
- setOperatingSystem((Integer)value);
- }
- break;
-
- case IS_VALID:
- if (value == null) {
- unsetIsValid();
- } else {
- setIsValid((Boolean)value);
- }
- break;
-
- case IS_DELETED:
- if (value == null) {
- unsetIsDeleted();
- } else {
- setIsDeleted((Boolean)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case FILE_SIZE:
- if (value == null) {
- unsetFileSize();
- } else {
- setFileSize((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case UUID:
- return getUuid();
-
- case REVISION:
- return Integer.valueOf(getRevision());
-
- case TITLE:
- return getTitle();
-
- case CREATE_TIME:
- return Long.valueOf(getCreateTime());
-
- case UPDATE_TIME:
- return Long.valueOf(getUpdateTime());
-
- case OWNER_LOGIN:
- return getOwnerLogin();
-
- case OPERATING_SYSTEM:
- return Integer.valueOf(getOperatingSystem());
-
- case IS_VALID:
- return Boolean.valueOf(isIsValid());
-
- case IS_DELETED:
- return Boolean.valueOf(isIsDeleted());
-
- case DESCRIPTION:
- return getDescription();
-
- case FILE_SIZE:
- return Long.valueOf(getFileSize());
-
- }
- 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 REVISION:
- return isSetRevision();
- case TITLE:
- return isSetTitle();
- case CREATE_TIME:
- return isSetCreateTime();
- case UPDATE_TIME:
- return isSetUpdateTime();
- case OWNER_LOGIN:
- return isSetOwnerLogin();
- case OPERATING_SYSTEM:
- return isSetOperatingSystem();
- case IS_VALID:
- return isSetIsValid();
- case IS_DELETED:
- return isSetIsDeleted();
- case DESCRIPTION:
- return isSetDescription();
- case FILE_SIZE:
- return isSetFileSize();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ImageData)
- return this.equals((ImageData)that);
- return false;
- }
-
- public boolean equals(ImageData 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_revision = true;
- boolean that_present_revision = true;
- if (this_present_revision || that_present_revision) {
- if (!(this_present_revision && that_present_revision))
- return false;
- if (this.revision != that.revision)
- return false;
- }
-
- boolean this_present_title = true && this.isSetTitle();
- boolean that_present_title = true && that.isSetTitle();
- if (this_present_title || that_present_title) {
- if (!(this_present_title && that_present_title))
- return false;
- if (!this.title.equals(that.title))
- return false;
- }
-
- boolean this_present_createTime = true;
- boolean that_present_createTime = true;
- if (this_present_createTime || that_present_createTime) {
- if (!(this_present_createTime && that_present_createTime))
- return false;
- if (this.createTime != that.createTime)
- return false;
- }
-
- boolean this_present_updateTime = true;
- boolean that_present_updateTime = true;
- if (this_present_updateTime || that_present_updateTime) {
- if (!(this_present_updateTime && that_present_updateTime))
- return false;
- if (this.updateTime != that.updateTime)
- return false;
- }
-
- boolean this_present_ownerLogin = true && this.isSetOwnerLogin();
- boolean that_present_ownerLogin = true && that.isSetOwnerLogin();
- if (this_present_ownerLogin || that_present_ownerLogin) {
- if (!(this_present_ownerLogin && that_present_ownerLogin))
- return false;
- if (!this.ownerLogin.equals(that.ownerLogin))
- return false;
- }
-
- boolean this_present_operatingSystem = true;
- boolean that_present_operatingSystem = true;
- if (this_present_operatingSystem || that_present_operatingSystem) {
- if (!(this_present_operatingSystem && that_present_operatingSystem))
- return false;
- if (this.operatingSystem != that.operatingSystem)
- return false;
- }
-
- boolean this_present_isValid = true;
- boolean that_present_isValid = true;
- if (this_present_isValid || that_present_isValid) {
- if (!(this_present_isValid && that_present_isValid))
- return false;
- if (this.isValid != that.isValid)
- return false;
- }
-
- boolean this_present_isDeleted = true;
- boolean that_present_isDeleted = true;
- if (this_present_isDeleted || that_present_isDeleted) {
- if (!(this_present_isDeleted && that_present_isDeleted))
- return false;
- if (this.isDeleted != that.isDeleted)
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_fileSize = true;
- boolean that_present_fileSize = true;
- if (this_present_fileSize || that_present_fileSize) {
- if (!(this_present_fileSize && that_present_fileSize))
- return false;
- if (this.fileSize != that.fileSize)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ImageData 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(isSetRevision()).compareTo(other.isSetRevision());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRevision()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revision, other.revision);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTitle()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, other.title);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreateTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdateTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOwnerLogin()).compareTo(other.isSetOwnerLogin());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOwnerLogin()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerLogin, other.ownerLogin);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOperatingSystem()).compareTo(other.isSetOperatingSystem());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOperatingSystem()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatingSystem, other.operatingSystem);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsValid()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, other.isValid);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsDeleted()).compareTo(other.isSetIsDeleted());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsDeleted()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDeleted, other.isDeleted);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFileSize()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("ImageData(");
- 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("revision:");
- sb.append(this.revision);
- first = false;
- if (!first) sb.append(", ");
- sb.append("title:");
- if (this.title == null) {
- sb.append("null");
- } else {
- sb.append(this.title);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("createTime:");
- sb.append(this.createTime);
- first = false;
- if (!first) sb.append(", ");
- sb.append("updateTime:");
- sb.append(this.updateTime);
- first = false;
- if (!first) sb.append(", ");
- sb.append("ownerLogin:");
- if (this.ownerLogin == null) {
- sb.append("null");
- } else {
- sb.append(this.ownerLogin);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("operatingSystem:");
- sb.append(this.operatingSystem);
- first = false;
- if (!first) sb.append(", ");
- sb.append("isValid:");
- sb.append(this.isValid);
- first = false;
- if (!first) sb.append(", ");
- sb.append("isDeleted:");
- sb.append(this.isDeleted);
- first = false;
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("fileSize:");
- sb.append(this.fileSize);
- 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 ImageDataStandardSchemeFactory implements SchemeFactory {
- public ImageDataStandardScheme getScheme() {
- return new ImageDataStandardScheme();
- }
- }
-
- private static class ImageDataStandardScheme extends StandardScheme<ImageData> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ImageData 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: // REVISION
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.revision = iprot.readI32();
- struct.setRevisionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TITLE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.title = iprot.readString();
- struct.setTitleIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // CREATE_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.createTime = iprot.readI64();
- struct.setCreateTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // UPDATE_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.updateTime = iprot.readI64();
- struct.setUpdateTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // OWNER_LOGIN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.ownerLogin = iprot.readString();
- struct.setOwnerLoginIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // OPERATING_SYSTEM
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.operatingSystem = iprot.readI32();
- struct.setOperatingSystemIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // IS_VALID
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isValid = iprot.readBool();
- struct.setIsValidIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // IS_DELETED
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isDeleted = iprot.readBool();
- struct.setIsDeletedIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 12: // FILE_SIZE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.fileSize = iprot.readI64();
- struct.setFileSizeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- 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, ImageData 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();
- }
- oprot.writeFieldBegin(REVISION_FIELD_DESC);
- oprot.writeI32(struct.revision);
- oprot.writeFieldEnd();
- if (struct.title != null) {
- oprot.writeFieldBegin(TITLE_FIELD_DESC);
- oprot.writeString(struct.title);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
- oprot.writeI64(struct.createTime);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC);
- oprot.writeI64(struct.updateTime);
- oprot.writeFieldEnd();
- if (struct.ownerLogin != null) {
- oprot.writeFieldBegin(OWNER_LOGIN_FIELD_DESC);
- oprot.writeString(struct.ownerLogin);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(OPERATING_SYSTEM_FIELD_DESC);
- oprot.writeI32(struct.operatingSystem);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
- oprot.writeBool(struct.isValid);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IS_DELETED_FIELD_DESC);
- oprot.writeBool(struct.isDeleted);
- oprot.writeFieldEnd();
- if (struct.description != null) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
- oprot.writeI64(struct.fileSize);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ImageDataTupleSchemeFactory implements SchemeFactory {
- public ImageDataTupleScheme getScheme() {
- return new ImageDataTupleScheme();
- }
- }
-
- private static class ImageDataTupleScheme extends TupleScheme<ImageData> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ImageData struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUuid()) {
- optionals.set(0);
- }
- if (struct.isSetRevision()) {
- optionals.set(1);
- }
- if (struct.isSetTitle()) {
- optionals.set(2);
- }
- if (struct.isSetCreateTime()) {
- optionals.set(3);
- }
- if (struct.isSetUpdateTime()) {
- optionals.set(4);
- }
- if (struct.isSetOwnerLogin()) {
- optionals.set(5);
- }
- if (struct.isSetOperatingSystem()) {
- optionals.set(6);
- }
- if (struct.isSetIsValid()) {
- optionals.set(7);
- }
- if (struct.isSetIsDeleted()) {
- optionals.set(8);
- }
- if (struct.isSetDescription()) {
- optionals.set(9);
- }
- if (struct.isSetFileSize()) {
- optionals.set(10);
- }
- oprot.writeBitSet(optionals, 11);
- if (struct.isSetUuid()) {
- oprot.writeString(struct.uuid);
- }
- if (struct.isSetRevision()) {
- oprot.writeI32(struct.revision);
- }
- if (struct.isSetTitle()) {
- oprot.writeString(struct.title);
- }
- if (struct.isSetCreateTime()) {
- oprot.writeI64(struct.createTime);
- }
- if (struct.isSetUpdateTime()) {
- oprot.writeI64(struct.updateTime);
- }
- if (struct.isSetOwnerLogin()) {
- oprot.writeString(struct.ownerLogin);
- }
- if (struct.isSetOperatingSystem()) {
- oprot.writeI32(struct.operatingSystem);
- }
- if (struct.isSetIsValid()) {
- oprot.writeBool(struct.isValid);
- }
- if (struct.isSetIsDeleted()) {
- oprot.writeBool(struct.isDeleted);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetFileSize()) {
- oprot.writeI64(struct.fileSize);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ImageData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(11);
- if (incoming.get(0)) {
- struct.uuid = iprot.readString();
- struct.setUuidIsSet(true);
- }
- if (incoming.get(1)) {
- struct.revision = iprot.readI32();
- struct.setRevisionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.title = iprot.readString();
- struct.setTitleIsSet(true);
- }
- if (incoming.get(3)) {
- struct.createTime = iprot.readI64();
- struct.setCreateTimeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.updateTime = iprot.readI64();
- struct.setUpdateTimeIsSet(true);
- }
- if (incoming.get(5)) {
- struct.ownerLogin = iprot.readString();
- struct.setOwnerLoginIsSet(true);
- }
- if (incoming.get(6)) {
- struct.operatingSystem = iprot.readI32();
- struct.setOperatingSystemIsSet(true);
- }
- if (incoming.get(7)) {
- struct.isValid = iprot.readBool();
- struct.setIsValidIsSet(true);
- }
- if (incoming.get(8)) {
- struct.isDeleted = iprot.readBool();
- struct.setIsDeletedIsSet(true);
- }
- if (incoming.get(9)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(10)) {
- struct.fileSize = iprot.readI64();
- struct.setFileSizeIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java
deleted file mode 100644
index fdd7b81..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-public enum ImageDataError implements org.apache.thrift.TEnum {
- INVALID_DATA(0),
- UNKNOWN_IMAGE(1);
-
- private final int value;
-
- private ImageDataError(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static ImageDataError findByValue(int value) {
- switch (value) {
- case 0:
- return INVALID_DATA;
- case 1:
- return UNKNOWN_IMAGE;
- default:
- return null;
- }
- }
-}
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java
deleted file mode 100644
index a5ac923..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ImageDataException extends TException implements org.apache.thrift.TBase<ImageDataException, ImageDataException._Fields>, java.io.Serializable, Cloneable, Comparable<ImageDataException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageDataException");
-
- private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImageDataExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImageDataExceptionTupleSchemeFactory());
- }
-
- /**
- *
- * @see ImageDataError
- */
- public ImageDataError number; // required
- public String message; // 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 {
- /**
- *
- * @see ImageDataError
- */
- NUMBER((short)1, "number"),
- MESSAGE((short)2, "message");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NUMBER
- return NUMBER;
- case 2: // MESSAGE
- return MESSAGE;
- 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ImageDataError.class)));
- tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(ImageDataException.class, metaDataMap);
- }
-
- public ImageDataException() {
- }
-
- public ImageDataException(
- ImageDataError number,
- String message)
- {
- this();
- this.number = number;
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ImageDataException(ImageDataException other) {
- if (other.isSetNumber()) {
- this.number = other.number;
- }
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public ImageDataException deepCopy() {
- return new ImageDataException(this);
- }
-
- @Override
- public void clear() {
- this.number = null;
- this.message = null;
- }
-
- /**
- *
- * @see ImageDataError
- */
- public ImageDataError getNumber() {
- return this.number;
- }
-
- /**
- *
- * @see ImageDataError
- */
- public ImageDataException setNumber(ImageDataError number) {
- this.number = number;
- return this;
- }
-
- public void unsetNumber() {
- this.number = null;
- }
-
- /** Returns true if field number is set (has been assigned a value) and false otherwise */
- public boolean isSetNumber() {
- return this.number != null;
- }
-
- public void setNumberIsSet(boolean value) {
- if (!value) {
- this.number = null;
- }
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public ImageDataException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NUMBER:
- if (value == null) {
- unsetNumber();
- } else {
- setNumber((ImageDataError)value);
- }
- break;
-
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NUMBER:
- return getNumber();
-
- case MESSAGE:
- return getMessage();
-
- }
- 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 NUMBER:
- return isSetNumber();
- case MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ImageDataException)
- return this.equals((ImageDataException)that);
- return false;
- }
-
- public boolean equals(ImageDataException that) {
- if (that == null)
- return false;
-
- boolean this_present_number = true && this.isSetNumber();
- boolean that_present_number = true && that.isSetNumber();
- if (this_present_number || that_present_number) {
- if (!(this_present_number && that_present_number))
- return false;
- if (!this.number.equals(that.number))
- return false;
- }
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ImageDataException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNumber()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("ImageDataException(");
- boolean first = true;
-
- sb.append("number:");
- if (this.number == null) {
- sb.append("null");
- } else {
- sb.append(this.number);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- 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 ImageDataExceptionStandardSchemeFactory implements SchemeFactory {
- public ImageDataExceptionStandardScheme getScheme() {
- return new ImageDataExceptionStandardScheme();
- }
- }
-
- private static class ImageDataExceptionStandardScheme extends StandardScheme<ImageDataException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ImageDataException 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: // NUMBER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.number = ImageDataError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, ImageDataException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.number != null) {
- oprot.writeFieldBegin(NUMBER_FIELD_DESC);
- oprot.writeI32(struct.number.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ImageDataExceptionTupleSchemeFactory implements SchemeFactory {
- public ImageDataExceptionTupleScheme getScheme() {
- return new ImageDataExceptionTupleScheme();
- }
- }
-
- private static class ImageDataExceptionTupleScheme extends TupleScheme<ImageDataException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ImageDataException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNumber()) {
- optionals.set(0);
- }
- if (struct.isSetMessage()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetNumber()) {
- oprot.writeI32(struct.number.getValue());
- }
- if (struct.isSetMessage()) {
- oprot.writeString(struct.message);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ImageDataException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.number = ImageDataError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- }
- if (incoming.get(1)) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java
deleted file mode 100644
index 82ff930..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java
+++ /dev/null
@@ -1,15606 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ImageServer {
-
- public interface Iface {
-
- public boolean ping() throws org.apache.thrift.TException;
-
- public SessionData authenticate(String login, String password) throws AuthenticationException, org.apache.thrift.TException;
-
- public List<OrganizationData> getOrganizations() throws org.apache.thrift.TException;
-
- public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws AuthorizationException, org.apache.thrift.TException;
-
- public List<ImageData> getPublicImages(String sessionId, int page) throws AuthorizationException, org.apache.thrift.TException;
-
- public UserInfo getUserFromToken(String token) throws InvalidTokenException, org.apache.thrift.TException;
-
- public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException;
-
- public ByteBuffer startServerAuthentication(String organization) throws AuthenticationException, org.apache.thrift.TException;
-
- public ServerSessionData serverAuthenticate(String organizationId, ByteBuffer challengeResponse) throws AuthenticationException, org.apache.thrift.TException;
-
- public UploadData submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums) throws AuthorizationException, ImageDataException, UploadException, org.apache.thrift.TException;
-
- public DownloadData getImage(String serverSessionId, String uuid) throws AuthorizationException, ImageDataException, org.apache.thrift.TException;
-
- public boolean publishUser(String serverSessionId, UserInfo user) throws AuthorizationException, org.apache.thrift.TException;
-
- public boolean registerSatellite(String organizationId, String address, String modulus, String exponent) throws org.apache.thrift.TException;
-
- public boolean updateSatelliteAddress(String serverSessionId, String address) throws org.apache.thrift.TException;
-
- public ServerSessionData addSession(String localPassword, UserInfo userInfo) throws org.apache.thrift.TException;
-
- }
-
- public interface AsyncIface {
-
- public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void startServerAuthentication(String organization, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImage(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void publishUser(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void addSession(String localPassword, UserInfo userInfo, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public boolean ping() throws org.apache.thrift.TException
- {
- send_ping();
- return recv_ping();
- }
-
- public void send_ping() throws org.apache.thrift.TException
- {
- ping_args args = new ping_args();
- sendBase("ping", args);
- }
-
- public boolean recv_ping() throws org.apache.thrift.TException
- {
- ping_result result = new ping_result();
- receiveBase(result, "ping");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result");
- }
-
- public SessionData authenticate(String login, String password) throws AuthenticationException, org.apache.thrift.TException
- {
- send_authenticate(login, password);
- return recv_authenticate();
- }
-
- public void send_authenticate(String login, String password) throws org.apache.thrift.TException
- {
- authenticate_args args = new authenticate_args();
- args.setLogin(login);
- args.setPassword(password);
- sendBase("authenticate", args);
- }
-
- public SessionData recv_authenticate() throws AuthenticationException, org.apache.thrift.TException
- {
- authenticate_result result = new authenticate_result();
- receiveBase(result, "authenticate");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result");
- }
-
- public List<OrganizationData> getOrganizations() throws org.apache.thrift.TException
- {
- send_getOrganizations();
- return recv_getOrganizations();
- }
-
- public void send_getOrganizations() throws org.apache.thrift.TException
- {
- getOrganizations_args args = new getOrganizations_args();
- sendBase("getOrganizations", args);
- }
-
- public List<OrganizationData> recv_getOrganizations() throws org.apache.thrift.TException
- {
- getOrganizations_result result = new getOrganizations_result();
- receiveBase(result, "getOrganizations");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOrganizations failed: unknown result");
- }
-
- public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws AuthorizationException, org.apache.thrift.TException
- {
- send_findUser(sessionId, organizationId, searchTerm);
- return recv_findUser();
- }
-
- public void send_findUser(String sessionId, String organizationId, String searchTerm) throws org.apache.thrift.TException
- {
- findUser_args args = new findUser_args();
- args.setSessionId(sessionId);
- args.setOrganizationId(organizationId);
- args.setSearchTerm(searchTerm);
- sendBase("findUser", args);
- }
-
- public List<UserInfo> recv_findUser() throws AuthorizationException, org.apache.thrift.TException
- {
- findUser_result result = new findUser_result();
- receiveBase(result, "findUser");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findUser failed: unknown result");
- }
-
- public List<ImageData> getPublicImages(String sessionId, int page) throws AuthorizationException, org.apache.thrift.TException
- {
- send_getPublicImages(sessionId, page);
- return recv_getPublicImages();
- }
-
- public void send_getPublicImages(String sessionId, int page) throws org.apache.thrift.TException
- {
- getPublicImages_args args = new getPublicImages_args();
- args.setSessionId(sessionId);
- args.setPage(page);
- sendBase("getPublicImages", args);
- }
-
- public List<ImageData> recv_getPublicImages() throws AuthorizationException, org.apache.thrift.TException
- {
- getPublicImages_result result = new getPublicImages_result();
- receiveBase(result, "getPublicImages");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPublicImages failed: unknown result");
- }
-
- public UserInfo getUserFromToken(String token) throws InvalidTokenException, org.apache.thrift.TException
- {
- send_getUserFromToken(token);
- return recv_getUserFromToken();
- }
-
- public void send_getUserFromToken(String token) throws org.apache.thrift.TException
- {
- getUserFromToken_args args = new getUserFromToken_args();
- args.setToken(token);
- sendBase("getUserFromToken", args);
- }
-
- public UserInfo recv_getUserFromToken() throws InvalidTokenException, org.apache.thrift.TException
- {
- getUserFromToken_result result = new getUserFromToken_result();
- receiveBase(result, "getUserFromToken");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserFromToken failed: unknown result");
- }
-
- public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
- {
- send_isServerAuthenticated(serverSessionId);
- return recv_isServerAuthenticated();
- }
-
- public void send_isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
- {
- isServerAuthenticated_args args = new isServerAuthenticated_args();
- args.setServerSessionId(serverSessionId);
- sendBase("isServerAuthenticated", args);
- }
-
- public boolean recv_isServerAuthenticated() throws org.apache.thrift.TException
- {
- isServerAuthenticated_result result = new isServerAuthenticated_result();
- receiveBase(result, "isServerAuthenticated");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isServerAuthenticated failed: unknown result");
- }
-
- public ByteBuffer startServerAuthentication(String organization) throws AuthenticationException, org.apache.thrift.TException
- {
- send_startServerAuthentication(organization);
- return recv_startServerAuthentication();
- }
-
- public void send_startServerAuthentication(String organization) throws org.apache.thrift.TException
- {
- startServerAuthentication_args args = new startServerAuthentication_args();
- args.setOrganization(organization);
- sendBase("startServerAuthentication", args);
- }
-
- public ByteBuffer recv_startServerAuthentication() throws AuthenticationException, org.apache.thrift.TException
- {
- startServerAuthentication_result result = new startServerAuthentication_result();
- receiveBase(result, "startServerAuthentication");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startServerAuthentication failed: unknown result");
- }
-
- public ServerSessionData serverAuthenticate(String organizationId, ByteBuffer challengeResponse) throws AuthenticationException, org.apache.thrift.TException
- {
- send_serverAuthenticate(organizationId, challengeResponse);
- return recv_serverAuthenticate();
- }
-
- public void send_serverAuthenticate(String organizationId, ByteBuffer challengeResponse) throws org.apache.thrift.TException
- {
- serverAuthenticate_args args = new serverAuthenticate_args();
- args.setOrganizationId(organizationId);
- args.setChallengeResponse(challengeResponse);
- sendBase("serverAuthenticate", args);
- }
-
- public ServerSessionData recv_serverAuthenticate() throws AuthenticationException, org.apache.thrift.TException
- {
- serverAuthenticate_result result = new serverAuthenticate_result();
- receiveBase(result, "serverAuthenticate");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "serverAuthenticate failed: unknown result");
- }
-
- public UploadData submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums) throws AuthorizationException, ImageDataException, UploadException, org.apache.thrift.TException
- {
- send_submitImage(serverSessionId, imageDescription, crcSums);
- return recv_submitImage();
- }
-
- public void send_submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums) throws org.apache.thrift.TException
- {
- submitImage_args args = new submitImage_args();
- args.setServerSessionId(serverSessionId);
- args.setImageDescription(imageDescription);
- args.setCrcSums(crcSums);
- sendBase("submitImage", args);
- }
-
- public UploadData recv_submitImage() throws AuthorizationException, ImageDataException, UploadException, org.apache.thrift.TException
- {
- submitImage_result result = new submitImage_result();
- receiveBase(result, "submitImage");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- if (result.failure2 != null) {
- throw result.failure2;
- }
- if (result.failure3 != null) {
- throw result.failure3;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitImage failed: unknown result");
- }
-
- public DownloadData getImage(String serverSessionId, String uuid) throws AuthorizationException, ImageDataException, org.apache.thrift.TException
- {
- send_getImage(serverSessionId, uuid);
- return recv_getImage();
- }
-
- public void send_getImage(String serverSessionId, String uuid) throws org.apache.thrift.TException
- {
- getImage_args args = new getImage_args();
- args.setServerSessionId(serverSessionId);
- args.setUuid(uuid);
- sendBase("getImage", args);
- }
-
- public DownloadData recv_getImage() throws AuthorizationException, ImageDataException, org.apache.thrift.TException
- {
- getImage_result result = new getImage_result();
- receiveBase(result, "getImage");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- if (result.failure2 != null) {
- throw result.failure2;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImage failed: unknown result");
- }
-
- public boolean publishUser(String serverSessionId, UserInfo user) throws AuthorizationException, org.apache.thrift.TException
- {
- send_publishUser(serverSessionId, user);
- return recv_publishUser();
- }
-
- public void send_publishUser(String serverSessionId, UserInfo user) throws org.apache.thrift.TException
- {
- publishUser_args args = new publishUser_args();
- args.setServerSessionId(serverSessionId);
- args.setUser(user);
- sendBase("publishUser", args);
- }
-
- public boolean recv_publishUser() throws AuthorizationException, org.apache.thrift.TException
- {
- publishUser_result result = new publishUser_result();
- receiveBase(result, "publishUser");
- if (result.isSetSuccess()) {
- return result.success;
- }
- if (result.failure != null) {
- throw result.failure;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "publishUser failed: unknown result");
- }
-
- public boolean registerSatellite(String organizationId, String address, String modulus, String exponent) throws org.apache.thrift.TException
- {
- send_registerSatellite(organizationId, address, modulus, exponent);
- return recv_registerSatellite();
- }
-
- public void send_registerSatellite(String organizationId, String address, String modulus, String exponent) throws org.apache.thrift.TException
- {
- registerSatellite_args args = new registerSatellite_args();
- args.setOrganizationId(organizationId);
- args.setAddress(address);
- args.setModulus(modulus);
- args.setExponent(exponent);
- sendBase("registerSatellite", args);
- }
-
- public boolean recv_registerSatellite() throws org.apache.thrift.TException
- {
- registerSatellite_result result = new registerSatellite_result();
- receiveBase(result, "registerSatellite");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerSatellite failed: unknown result");
- }
-
- public boolean updateSatelliteAddress(String serverSessionId, String address) throws org.apache.thrift.TException
- {
- send_updateSatelliteAddress(serverSessionId, address);
- return recv_updateSatelliteAddress();
- }
-
- public void send_updateSatelliteAddress(String serverSessionId, String address) throws org.apache.thrift.TException
- {
- updateSatelliteAddress_args args = new updateSatelliteAddress_args();
- args.setServerSessionId(serverSessionId);
- args.setAddress(address);
- sendBase("updateSatelliteAddress", args);
- }
-
- public boolean recv_updateSatelliteAddress() throws org.apache.thrift.TException
- {
- updateSatelliteAddress_result result = new updateSatelliteAddress_result();
- receiveBase(result, "updateSatelliteAddress");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateSatelliteAddress failed: unknown result");
- }
-
- public ServerSessionData addSession(String localPassword, UserInfo userInfo) throws org.apache.thrift.TException
- {
- send_addSession(localPassword, userInfo);
- return recv_addSession();
- }
-
- public void send_addSession(String localPassword, UserInfo userInfo) throws org.apache.thrift.TException
- {
- addSession_args args = new addSession_args();
- args.setLocalPassword(localPassword);
- args.setUserInfo(userInfo);
- sendBase("addSession", args);
- }
-
- public ServerSessionData recv_addSession() throws org.apache.thrift.TException
- {
- addSession_result result = new addSession_result();
- receiveBase(result, "addSession");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSession failed: unknown result");
- }
-
- }
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
- public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {
- public ping_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0));
- ping_args args = new ping_args();
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_ping();
- }
- }
-
- public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- authenticate_call method_call = new authenticate_call(login, password, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String login;
- private String password;
- public authenticate_call(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.login = login;
- this.password = password;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
- authenticate_args args = new authenticate_args();
- args.setLogin(login);
- args.setPassword(password);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public SessionData getResult() throws AuthenticationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_authenticate();
- }
- }
-
- public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getOrganizations_call method_call = new getOrganizations_call(resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getOrganizations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getOrganizations_args args = new getOrganizations_args();
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<OrganizationData> 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_getOrganizations();
- }
- }
-
- public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- findUser_call method_call = new findUser_call(sessionId, organizationId, searchTerm, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class findUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
- private String organizationId;
- private String searchTerm;
- public findUser_call(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.sessionId = sessionId;
- this.organizationId = organizationId;
- this.searchTerm = searchTerm;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("findUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- findUser_args args = new findUser_args();
- args.setSessionId(sessionId);
- args.setOrganizationId(organizationId);
- args.setSearchTerm(searchTerm);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<UserInfo> getResult() throws AuthorizationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_findUser();
- }
- }
-
- public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getPublicImages_call method_call = new getPublicImages_call(sessionId, page, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getPublicImages_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
- private int page;
- public getPublicImages_call(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.sessionId = sessionId;
- this.page = page;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPublicImages", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getPublicImages_args args = new getPublicImages_args();
- args.setSessionId(sessionId);
- args.setPage(page);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<ImageData> getResult() throws AuthorizationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_getPublicImages();
- }
- }
-
- public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getUserFromToken_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserFromToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getUserFromToken_args args = new getUserFromToken_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public UserInfo getResult() throws InvalidTokenException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_getUserFromToken();
- }
- }
-
- public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- isServerAuthenticated_call method_call = new isServerAuthenticated_call(serverSessionId, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class isServerAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- public isServerAuthenticated_call(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.serverSessionId = serverSessionId;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isServerAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0));
- isServerAuthenticated_args args = new isServerAuthenticated_args();
- args.setServerSessionId(serverSessionId);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_isServerAuthenticated();
- }
- }
-
- public void startServerAuthentication(String organization, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- startServerAuthentication_call method_call = new startServerAuthentication_call(organization, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class startServerAuthentication_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String organization;
- public startServerAuthentication_call(String organization, 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.organization = organization;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startServerAuthentication", org.apache.thrift.protocol.TMessageType.CALL, 0));
- startServerAuthentication_args args = new startServerAuthentication_args();
- args.setOrganization(organization);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public ByteBuffer getResult() throws AuthenticationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_startServerAuthentication();
- }
- }
-
- public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- serverAuthenticate_call method_call = new serverAuthenticate_call(organizationId, challengeResponse, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class serverAuthenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String organizationId;
- private ByteBuffer challengeResponse;
- public serverAuthenticate_call(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.organizationId = organizationId;
- this.challengeResponse = challengeResponse;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("serverAuthenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
- serverAuthenticate_args args = new serverAuthenticate_args();
- args.setOrganizationId(organizationId);
- args.setChallengeResponse(challengeResponse);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public ServerSessionData getResult() throws AuthenticationException, org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_serverAuthenticate();
- }
- }
-
- public void submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- submitImage_call method_call = new submitImage_call(serverSessionId, imageDescription, crcSums, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class submitImage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- private ImageData imageDescription;
- private List<Integer> crcSums;
- public submitImage_call(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.serverSessionId = serverSessionId;
- this.imageDescription = imageDescription;
- this.crcSums = crcSums;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
- submitImage_args args = new submitImage_args();
- args.setServerSessionId(serverSessionId);
- args.setImageDescription(imageDescription);
- args.setCrcSums(crcSums);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public UploadData 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!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_submitImage();
- }
- }
-
- public void getImage(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImage_call method_call = new getImage_call(serverSessionId, uuid, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- private String uuid;
- public getImage_call(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.serverSessionId = serverSessionId;
- this.uuid = uuid;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImage_args args = new getImage_args();
- args.setServerSessionId(serverSessionId);
- args.setUuid(uuid);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public DownloadData 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!");
- }
- 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_getImage();
- }
- }
-
- public void publishUser(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- publishUser_call method_call = new publishUser_call(serverSessionId, user, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class publishUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- private UserInfo user;
- public publishUser_call(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.serverSessionId = serverSessionId;
- this.user = user;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("publishUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- publishUser_args args = new publishUser_args();
- args.setServerSessionId(serverSessionId);
- args.setUser(user);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public boolean getResult() throws AuthorizationException, 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_publishUser();
- }
- }
-
- public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- registerSatellite_call method_call = new registerSatellite_call(organizationId, address, modulus, exponent, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class registerSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String organizationId;
- private String address;
- private String modulus;
- private String exponent;
- public registerSatellite_call(String organizationId, String address, String modulus, String exponent, 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.organizationId = organizationId;
- this.address = address;
- this.modulus = modulus;
- this.exponent = exponent;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
- registerSatellite_args args = new registerSatellite_args();
- args.setOrganizationId(organizationId);
- args.setAddress(address);
- args.setModulus(modulus);
- args.setExponent(exponent);
- 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_registerSatellite();
- }
- }
-
- public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- updateSatelliteAddress_call method_call = new updateSatelliteAddress_call(serverSessionId, address, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class updateSatelliteAddress_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- private String address;
- public updateSatelliteAddress_call(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.serverSessionId = serverSessionId;
- this.address = address;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSatelliteAddress", org.apache.thrift.protocol.TMessageType.CALL, 0));
- updateSatelliteAddress_args args = new updateSatelliteAddress_args();
- args.setServerSessionId(serverSessionId);
- args.setAddress(address);
- 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_updateSatelliteAddress();
- }
- }
-
- public void addSession(String localPassword, UserInfo userInfo, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- addSession_call method_call = new addSession_call(localPassword, userInfo, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class addSession_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String localPassword;
- private UserInfo userInfo;
- public addSession_call(String localPassword, UserInfo userInfo, 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.localPassword = localPassword;
- this.userInfo = userInfo;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
- addSession_args args = new addSession_args();
- args.setLocalPassword(localPassword);
- args.setUserInfo(userInfo);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public ServerSessionData 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_addSession();
- }
- }
-
- }
-
- public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
-
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- processMap.put("ping", new ping());
- processMap.put("authenticate", new authenticate());
- processMap.put("getOrganizations", new getOrganizations());
- processMap.put("findUser", new findUser());
- processMap.put("getPublicImages", new getPublicImages());
- processMap.put("getUserFromToken", new getUserFromToken());
- processMap.put("isServerAuthenticated", new isServerAuthenticated());
- processMap.put("startServerAuthentication", new startServerAuthentication());
- processMap.put("serverAuthenticate", new serverAuthenticate());
- processMap.put("submitImage", new submitImage());
- processMap.put("getImage", new getImage());
- processMap.put("publishUser", new publishUser());
- processMap.put("registerSatellite", new registerSatellite());
- processMap.put("updateSatelliteAddress", new updateSatelliteAddress());
- processMap.put("addSession", new addSession());
- return processMap;
- }
-
- public static class ping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, ping_args> {
- public ping() {
- super("ping");
- }
-
- public ping_args getEmptyArgsInstance() {
- return new ping_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException {
- ping_result result = new ping_result();
- result.success = iface.ping();
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class authenticate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, authenticate_args> {
- public authenticate() {
- super("authenticate");
- }
-
- public authenticate_args getEmptyArgsInstance() {
- return new authenticate_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.thrift.TException {
- authenticate_result result = new authenticate_result();
- try {
- result.success = iface.authenticate(args.login, args.password);
- } catch (AuthenticationException failure) {
- result.failure = failure;
- }
- return result;
- }
- }
-
- public static class getOrganizations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOrganizations_args> {
- public getOrganizations() {
- super("getOrganizations");
- }
-
- public getOrganizations_args getEmptyArgsInstance() {
- return new getOrganizations_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getOrganizations_result getResult(I iface, getOrganizations_args args) throws org.apache.thrift.TException {
- getOrganizations_result result = new getOrganizations_result();
- result.success = iface.getOrganizations();
- return result;
- }
- }
-
- public static class findUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, findUser_args> {
- public findUser() {
- super("findUser");
- }
-
- public findUser_args getEmptyArgsInstance() {
- return new findUser_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public findUser_result getResult(I iface, findUser_args args) throws org.apache.thrift.TException {
- findUser_result result = new findUser_result();
- try {
- result.success = iface.findUser(args.sessionId, args.organizationId, args.searchTerm);
- } catch (AuthorizationException failure) {
- result.failure = failure;
- }
- return result;
- }
- }
-
- public static class getPublicImages<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPublicImages_args> {
- public getPublicImages() {
- super("getPublicImages");
- }
-
- public getPublicImages_args getEmptyArgsInstance() {
- return new getPublicImages_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getPublicImages_result getResult(I iface, getPublicImages_args args) throws org.apache.thrift.TException {
- getPublicImages_result result = new getPublicImages_result();
- try {
- result.success = iface.getPublicImages(args.sessionId, args.page);
- } catch (AuthorizationException failure) {
- result.failure = failure;
- }
- return result;
- }
- }
-
- public static class getUserFromToken<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserFromToken_args> {
- public getUserFromToken() {
- super("getUserFromToken");
- }
-
- public getUserFromToken_args getEmptyArgsInstance() {
- return new getUserFromToken_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getUserFromToken_result getResult(I iface, getUserFromToken_args args) throws org.apache.thrift.TException {
- getUserFromToken_result result = new getUserFromToken_result();
- try {
- result.success = iface.getUserFromToken(args.token);
- } catch (InvalidTokenException failure) {
- result.failure = failure;
- }
- return result;
- }
- }
-
- public static class isServerAuthenticated<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isServerAuthenticated_args> {
- public isServerAuthenticated() {
- super("isServerAuthenticated");
- }
-
- public isServerAuthenticated_args getEmptyArgsInstance() {
- return new isServerAuthenticated_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public isServerAuthenticated_result getResult(I iface, isServerAuthenticated_args args) throws org.apache.thrift.TException {
- isServerAuthenticated_result result = new isServerAuthenticated_result();
- result.success = iface.isServerAuthenticated(args.serverSessionId);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class startServerAuthentication<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startServerAuthentication_args> {
- public startServerAuthentication() {
- super("startServerAuthentication");
- }
-
- public startServerAuthentication_args getEmptyArgsInstance() {
- return new startServerAuthentication_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public startServerAuthentication_result getResult(I iface, startServerAuthentication_args args) throws org.apache.thrift.TException {
- startServerAuthentication_result result = new startServerAuthentication_result();
- try {
- result.success = iface.startServerAuthentication(args.organization);
- } catch (AuthenticationException failure) {
- result.failure = failure;
- }
- return result;
- }
- }
-
- public static class serverAuthenticate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, serverAuthenticate_args> {
- public serverAuthenticate() {
- super("serverAuthenticate");
- }
-
- public serverAuthenticate_args getEmptyArgsInstance() {
- return new serverAuthenticate_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public serverAuthenticate_result getResult(I iface, serverAuthenticate_args args) throws org.apache.thrift.TException {
- serverAuthenticate_result result = new serverAuthenticate_result();
- try {
- result.success = iface.serverAuthenticate(args.organizationId, args.challengeResponse);
- } catch (AuthenticationException failure) {
- result.failure = failure;
- }
- return result;
- }
- }
-
- public static class submitImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitImage_args> {
- public submitImage() {
- super("submitImage");
- }
-
- public submitImage_args getEmptyArgsInstance() {
- return new submitImage_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public submitImage_result getResult(I iface, submitImage_args args) throws org.apache.thrift.TException {
- submitImage_result result = new submitImage_result();
- try {
- result.success = iface.submitImage(args.serverSessionId, args.imageDescription, args.crcSums);
- } catch (AuthorizationException failure) {
- result.failure = failure;
- } catch (ImageDataException failure2) {
- result.failure2 = failure2;
- } catch (UploadException failure3) {
- result.failure3 = failure3;
- }
- return result;
- }
- }
-
- public static class getImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImage_args> {
- public getImage() {
- super("getImage");
- }
-
- public getImage_args getEmptyArgsInstance() {
- return new getImage_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImage_result getResult(I iface, getImage_args args) throws org.apache.thrift.TException {
- getImage_result result = new getImage_result();
- try {
- result.success = iface.getImage(args.serverSessionId, args.uuid);
- } catch (AuthorizationException failure) {
- result.failure = failure;
- } catch (ImageDataException failure2) {
- result.failure2 = failure2;
- }
- return result;
- }
- }
-
- public static class publishUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, publishUser_args> {
- public publishUser() {
- super("publishUser");
- }
-
- public publishUser_args getEmptyArgsInstance() {
- return new publishUser_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public publishUser_result getResult(I iface, publishUser_args args) throws org.apache.thrift.TException {
- publishUser_result result = new publishUser_result();
- try {
- result.success = iface.publishUser(args.serverSessionId, args.user);
- result.setSuccessIsSet(true);
- } catch (AuthorizationException failure) {
- result.failure = failure;
- }
- return result;
- }
- }
-
- public static class registerSatellite<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerSatellite_args> {
- public registerSatellite() {
- super("registerSatellite");
- }
-
- public registerSatellite_args getEmptyArgsInstance() {
- return new registerSatellite_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public registerSatellite_result getResult(I iface, registerSatellite_args args) throws org.apache.thrift.TException {
- registerSatellite_result result = new registerSatellite_result();
- result.success = iface.registerSatellite(args.organizationId, args.address, args.modulus, args.exponent);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class updateSatelliteAddress<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSatelliteAddress_args> {
- public updateSatelliteAddress() {
- super("updateSatelliteAddress");
- }
-
- public updateSatelliteAddress_args getEmptyArgsInstance() {
- return new updateSatelliteAddress_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public updateSatelliteAddress_result getResult(I iface, updateSatelliteAddress_args args) throws org.apache.thrift.TException {
- updateSatelliteAddress_result result = new updateSatelliteAddress_result();
- result.success = iface.updateSatelliteAddress(args.serverSessionId, args.address);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class addSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSession_args> {
- public addSession() {
- super("addSession");
- }
-
- public addSession_args getEmptyArgsInstance() {
- return new addSession_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public addSession_result getResult(I iface, addSession_args args) throws org.apache.thrift.TException {
- addSession_result result = new addSession_result();
- result.success = iface.addSession(args.localPassword, args.userInfo);
- return result;
- }
- }
-
- }
-
- public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
- public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
- }
-
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- processMap.put("ping", new ping());
- processMap.put("authenticate", new authenticate());
- processMap.put("getOrganizations", new getOrganizations());
- processMap.put("findUser", new findUser());
- processMap.put("getPublicImages", new getPublicImages());
- processMap.put("getUserFromToken", new getUserFromToken());
- processMap.put("isServerAuthenticated", new isServerAuthenticated());
- processMap.put("startServerAuthentication", new startServerAuthentication());
- processMap.put("serverAuthenticate", new serverAuthenticate());
- processMap.put("submitImage", new submitImage());
- processMap.put("getImage", new getImage());
- processMap.put("publishUser", new publishUser());
- processMap.put("registerSatellite", new registerSatellite());
- processMap.put("updateSatelliteAddress", new updateSatelliteAddress());
- processMap.put("addSession", new addSession());
- return processMap;
- }
-
- public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, Boolean> {
- public ping() {
- super("ping");
- }
-
- public ping_args getEmptyArgsInstance() {
- return new ping_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- ping_result result = new ping_result();
- result.success = o;
- result.setSuccessIsSet(true);
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- ping_result result = new ping_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.ping(resultHandler);
- }
- }
-
- public static class authenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, authenticate_args, SessionData> {
- public authenticate() {
- super("authenticate");
- }
-
- public authenticate_args getEmptyArgsInstance() {
- return new authenticate_args();
- }
-
- public AsyncMethodCallback<SessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<SessionData>() {
- public void onComplete(SessionData o) {
- authenticate_result result = new authenticate_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- authenticate_result result = new authenticate_result();
- if (e instanceof AuthenticationException) {
- result.failure = (AuthenticationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws TException {
- iface.authenticate(args.login, args.password,resultHandler);
- }
- }
-
- public static class getOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOrganizations_args, List<OrganizationData>> {
- public getOrganizations() {
- super("getOrganizations");
- }
-
- public getOrganizations_args getEmptyArgsInstance() {
- return new getOrganizations_args();
- }
-
- public AsyncMethodCallback<List<OrganizationData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<OrganizationData>>() {
- public void onComplete(List<OrganizationData> o) {
- getOrganizations_result result = new getOrganizations_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getOrganizations_result result = new getOrganizations_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<OrganizationData>> resultHandler) throws TException {
- iface.getOrganizations(resultHandler);
- }
- }
-
- public static class findUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUser_args, List<UserInfo>> {
- public findUser() {
- super("findUser");
- }
-
- public findUser_args getEmptyArgsInstance() {
- return new findUser_args();
- }
-
- public AsyncMethodCallback<List<UserInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<UserInfo>>() {
- public void onComplete(List<UserInfo> o) {
- findUser_result result = new findUser_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- findUser_result result = new findUser_result();
- if (e instanceof AuthorizationException) {
- result.failure = (AuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, findUser_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException {
- iface.findUser(args.sessionId, args.organizationId, args.searchTerm,resultHandler);
- }
- }
-
- public static class getPublicImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPublicImages_args, List<ImageData>> {
- public getPublicImages() {
- super("getPublicImages");
- }
-
- public getPublicImages_args getEmptyArgsInstance() {
- return new getPublicImages_args();
- }
-
- public AsyncMethodCallback<List<ImageData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<ImageData>>() {
- public void onComplete(List<ImageData> o) {
- getPublicImages_result result = new getPublicImages_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getPublicImages_result result = new getPublicImages_result();
- if (e instanceof AuthorizationException) {
- result.failure = (AuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageData>> resultHandler) throws TException {
- iface.getPublicImages(args.sessionId, args.page,resultHandler);
- }
- }
-
- public static class getUserFromToken<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserFromToken_args, UserInfo> {
- public getUserFromToken() {
- super("getUserFromToken");
- }
-
- public getUserFromToken_args getEmptyArgsInstance() {
- return new getUserFromToken_args();
- }
-
- public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<UserInfo>() {
- public void onComplete(UserInfo o) {
- getUserFromToken_result result = new getUserFromToken_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getUserFromToken_result result = new getUserFromToken_result();
- if (e instanceof InvalidTokenException) {
- result.failure = (InvalidTokenException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException {
- iface.getUserFromToken(args.token,resultHandler);
- }
- }
-
- public static class isServerAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isServerAuthenticated_args, Boolean> {
- public isServerAuthenticated() {
- super("isServerAuthenticated");
- }
-
- public isServerAuthenticated_args getEmptyArgsInstance() {
- return new isServerAuthenticated_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- isServerAuthenticated_result result = new isServerAuthenticated_result();
- result.success = o;
- result.setSuccessIsSet(true);
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- isServerAuthenticated_result result = new isServerAuthenticated_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, isServerAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.isServerAuthenticated(args.serverSessionId,resultHandler);
- }
- }
-
- public static class startServerAuthentication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startServerAuthentication_args, ByteBuffer> {
- public startServerAuthentication() {
- super("startServerAuthentication");
- }
-
- public startServerAuthentication_args getEmptyArgsInstance() {
- return new startServerAuthentication_args();
- }
-
- public AsyncMethodCallback<ByteBuffer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ByteBuffer>() {
- public void onComplete(ByteBuffer o) {
- startServerAuthentication_result result = new startServerAuthentication_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- startServerAuthentication_result result = new startServerAuthentication_result();
- if (e instanceof AuthenticationException) {
- result.failure = (AuthenticationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, startServerAuthentication_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
- iface.startServerAuthentication(args.organization,resultHandler);
- }
- }
-
- public static class serverAuthenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, serverAuthenticate_args, ServerSessionData> {
- public serverAuthenticate() {
- super("serverAuthenticate");
- }
-
- public serverAuthenticate_args getEmptyArgsInstance() {
- return new serverAuthenticate_args();
- }
-
- public AsyncMethodCallback<ServerSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ServerSessionData>() {
- public void onComplete(ServerSessionData o) {
- serverAuthenticate_result result = new serverAuthenticate_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- serverAuthenticate_result result = new serverAuthenticate_result();
- if (e instanceof AuthenticationException) {
- result.failure = (AuthenticationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, serverAuthenticate_args args, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws TException {
- iface.serverAuthenticate(args.organizationId, args.challengeResponse,resultHandler);
- }
- }
-
- public static class submitImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitImage_args, UploadData> {
- public submitImage() {
- super("submitImage");
- }
-
- public submitImage_args getEmptyArgsInstance() {
- return new submitImage_args();
- }
-
- public AsyncMethodCallback<UploadData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<UploadData>() {
- public void onComplete(UploadData o) {
- submitImage_result result = new submitImage_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- submitImage_result result = new submitImage_result();
- if (e instanceof AuthorizationException) {
- result.failure = (AuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof ImageDataException) {
- result.failure2 = (ImageDataException) e;
- result.setFailure2IsSet(true);
- msg = result;
- }
- else if (e instanceof UploadException) {
- result.failure3 = (UploadException) e;
- result.setFailure3IsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback<UploadData> resultHandler) throws TException {
- iface.submitImage(args.serverSessionId, args.imageDescription, args.crcSums,resultHandler);
- }
- }
-
- public static class getImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImage_args, DownloadData> {
- public getImage() {
- super("getImage");
- }
-
- public getImage_args getEmptyArgsInstance() {
- return new getImage_args();
- }
-
- public AsyncMethodCallback<DownloadData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<DownloadData>() {
- public void onComplete(DownloadData o) {
- getImage_result result = new getImage_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImage_result result = new getImage_result();
- if (e instanceof AuthorizationException) {
- result.failure = (AuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof ImageDataException) {
- result.failure2 = (ImageDataException) e;
- 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, getImage_args args, org.apache.thrift.async.AsyncMethodCallback<DownloadData> resultHandler) throws TException {
- iface.getImage(args.serverSessionId, args.uuid,resultHandler);
- }
- }
-
- public static class publishUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, publishUser_args, Boolean> {
- public publishUser() {
- super("publishUser");
- }
-
- public publishUser_args getEmptyArgsInstance() {
- return new publishUser_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- publishUser_result result = new publishUser_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;
- publishUser_result result = new publishUser_result();
- if (e instanceof AuthorizationException) {
- result.failure = (AuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, publishUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.publishUser(args.serverSessionId, args.user,resultHandler);
- }
- }
-
- public static class registerSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerSatellite_args, Boolean> {
- public registerSatellite() {
- super("registerSatellite");
- }
-
- public registerSatellite_args getEmptyArgsInstance() {
- return new registerSatellite_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- registerSatellite_result result = new registerSatellite_result();
- result.success = o;
- result.setSuccessIsSet(true);
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- registerSatellite_result result = new registerSatellite_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, registerSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.registerSatellite(args.organizationId, args.address, args.modulus, args.exponent,resultHandler);
- }
- }
-
- public static class updateSatelliteAddress<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateSatelliteAddress_args, Boolean> {
- public updateSatelliteAddress() {
- super("updateSatelliteAddress");
- }
-
- public updateSatelliteAddress_args getEmptyArgsInstance() {
- return new updateSatelliteAddress_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateSatelliteAddress_result result = new updateSatelliteAddress_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;
- updateSatelliteAddress_result result = new updateSatelliteAddress_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, updateSatelliteAddress_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateSatelliteAddress(args.serverSessionId, args.address,resultHandler);
- }
- }
-
- public static class addSession<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addSession_args, ServerSessionData> {
- public addSession() {
- super("addSession");
- }
-
- public addSession_args getEmptyArgsInstance() {
- return new addSession_args();
- }
-
- public AsyncMethodCallback<ServerSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ServerSessionData>() {
- public void onComplete(ServerSessionData o) {
- addSession_result result = new addSession_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- addSession_result result = new addSession_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, addSession_args args, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws TException {
- iface.addSession(args.localPassword, args.userInfo,resultHandler);
- }
- }
-
- }
-
- public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap);
- }
-
- public ping_args() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ping_args(ping_args other) {
- }
-
- public ping_args deepCopy() {
- return new ping_args(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ping_args)
- return this.equals((ping_args)that);
- return false;
- }
-
- public boolean equals(ping_args that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ping_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ping_args(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class ping_argsStandardSchemeFactory implements SchemeFactory {
- public ping_argsStandardScheme getScheme() {
- return new ping_argsStandardScheme();
- }
- }
-
- private static class ping_argsStandardScheme extends StandardScheme<ping_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ping_argsTupleSchemeFactory implements SchemeFactory {
- public ping_argsTupleScheme getScheme() {
- return new ping_argsTupleScheme();
- }
- }
-
- private static class ping_argsTupleScheme extends TupleScheme<ping_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
- }
-
- public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap);
- }
-
- public ping_result() {
- }
-
- public ping_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ping_result(ping_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public ping_result deepCopy() {
- return new ping_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public ping_result setSuccess(boolean success) {
- this.success = success;
- setSuccessIsSet(true);
- return this;
- }
-
- public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Boolean)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return 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 ping_result)
- return this.equals((ping_result)that);
- return false;
- }
-
- public boolean equals(ping_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ping_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ping_result(");
- boolean first = true;
-
- sb.append("success:");
- sb.append(this.success);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class ping_resultStandardSchemeFactory implements SchemeFactory {
- public ping_resultStandardScheme getScheme() {
- return new ping_resultStandardScheme();
- }
- }
-
- private static class ping_resultStandardScheme extends StandardScheme<ping_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ping_resultTupleSchemeFactory implements SchemeFactory {
- public ping_resultTupleScheme getScheme() {
- return new ping_resultTupleScheme();
- }
- }
-
- private static class ping_resultTupleScheme extends TupleScheme<ping_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeBool(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class authenticate_args implements org.apache.thrift.TBase<authenticate_args, authenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_args");
-
- private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new authenticate_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new authenticate_argsTupleSchemeFactory());
- }
-
- public String login; // required
- public String password; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- LOGIN((short)1, "login"),
- PASSWORD((short)2, "password");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // LOGIN
- return LOGIN;
- case 2: // PASSWORD
- return PASSWORD;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_args.class, metaDataMap);
- }
-
- public authenticate_args() {
- }
-
- public authenticate_args(
- String login,
- String password)
- {
- this();
- this.login = login;
- this.password = password;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public authenticate_args(authenticate_args other) {
- if (other.isSetLogin()) {
- this.login = other.login;
- }
- if (other.isSetPassword()) {
- this.password = other.password;
- }
- }
-
- public authenticate_args deepCopy() {
- return new authenticate_args(this);
- }
-
- @Override
- public void clear() {
- this.login = null;
- this.password = null;
- }
-
- public String getLogin() {
- return this.login;
- }
-
- public authenticate_args setLogin(String login) {
- this.login = login;
- return this;
- }
-
- public void unsetLogin() {
- this.login = null;
- }
-
- /** Returns true if field login is set (has been assigned a value) and false otherwise */
- public boolean isSetLogin() {
- return this.login != null;
- }
-
- public void setLoginIsSet(boolean value) {
- if (!value) {
- this.login = null;
- }
- }
-
- public String getPassword() {
- return this.password;
- }
-
- public authenticate_args setPassword(String password) {
- this.password = password;
- return this;
- }
-
- public void unsetPassword() {
- this.password = null;
- }
-
- /** Returns true if field password is set (has been assigned a value) and false otherwise */
- public boolean isSetPassword() {
- return this.password != null;
- }
-
- public void setPasswordIsSet(boolean value) {
- if (!value) {
- this.password = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LOGIN:
- if (value == null) {
- unsetLogin();
- } else {
- setLogin((String)value);
- }
- break;
-
- case PASSWORD:
- if (value == null) {
- unsetPassword();
- } else {
- setPassword((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LOGIN:
- return getLogin();
-
- case PASSWORD:
- return getPassword();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case LOGIN:
- return isSetLogin();
- case PASSWORD:
- return isSetPassword();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof authenticate_args)
- return this.equals((authenticate_args)that);
- return false;
- }
-
- public boolean equals(authenticate_args that) {
- if (that == null)
- return false;
-
- boolean this_present_login = true && this.isSetLogin();
- boolean that_present_login = true && that.isSetLogin();
- if (this_present_login || that_present_login) {
- if (!(this_present_login && that_present_login))
- return false;
- if (!this.login.equals(that.login))
- return false;
- }
-
- boolean this_present_password = true && this.isSetPassword();
- boolean that_present_password = true && that.isSetPassword();
- if (this_present_password || that_present_password) {
- if (!(this_present_password && that_present_password))
- return false;
- if (!this.password.equals(that.password))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(authenticate_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetLogin()).compareTo(other.isSetLogin());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLogin()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.login, other.login);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPassword()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("authenticate_args(");
- boolean first = true;
-
- sb.append("login:");
- if (this.login == null) {
- sb.append("null");
- } else {
- sb.append(this.login);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("password:");
- if (this.password == null) {
- sb.append("null");
- } else {
- sb.append(this.password);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class authenticate_argsStandardSchemeFactory implements SchemeFactory {
- public authenticate_argsStandardScheme getScheme() {
- return new authenticate_argsStandardScheme();
- }
- }
-
- private static class authenticate_argsStandardScheme extends StandardScheme<authenticate_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // LOGIN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.login = iprot.readString();
- struct.setLoginIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PASSWORD
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.login != null) {
- oprot.writeFieldBegin(LOGIN_FIELD_DESC);
- oprot.writeString(struct.login);
- oprot.writeFieldEnd();
- }
- if (struct.password != null) {
- oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
- oprot.writeString(struct.password);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class authenticate_argsTupleSchemeFactory implements SchemeFactory {
- public authenticate_argsTupleScheme getScheme() {
- return new authenticate_argsTupleScheme();
- }
- }
-
- private static class authenticate_argsTupleScheme extends TupleScheme<authenticate_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetLogin()) {
- optionals.set(0);
- }
- if (struct.isSetPassword()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetLogin()) {
- oprot.writeString(struct.login);
- }
- if (struct.isSetPassword()) {
- oprot.writeString(struct.password);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.login = iprot.readString();
- struct.setLoginIsSet(true);
- }
- if (incoming.get(1)) {
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- }
- }
- }
-
- }
-
- public static class authenticate_result implements org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new authenticate_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new authenticate_resultTupleSchemeFactory());
- }
-
- public SessionData success; // required
- public AuthenticationException failure; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- FAILURE((short)1, "failure");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionData.class)));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_result.class, metaDataMap);
- }
-
- public authenticate_result() {
- }
-
- public authenticate_result(
- SessionData success,
- AuthenticationException failure)
- {
- this();
- this.success = success;
- this.failure = failure;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public authenticate_result(authenticate_result other) {
- if (other.isSetSuccess()) {
- this.success = new SessionData(other.success);
- }
- if (other.isSetFailure()) {
- this.failure = new AuthenticationException(other.failure);
- }
- }
-
- public authenticate_result deepCopy() {
- return new authenticate_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.failure = null;
- }
-
- public SessionData getSuccess() {
- return this.success;
- }
-
- public authenticate_result setSuccess(SessionData success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public AuthenticationException getFailure() {
- return this.failure;
- }
-
- public authenticate_result setFailure(AuthenticationException failure) {
- this.failure = failure;
- return this;
- }
-
- public void unsetFailure() {
- this.failure = null;
- }
-
- /** Returns true if field failure is set (has been assigned a value) and false otherwise */
- public boolean isSetFailure() {
- return this.failure != null;
- }
-
- public void setFailureIsSet(boolean value) {
- if (!value) {
- this.failure = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((SessionData)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((AuthenticationException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case FAILURE:
- return getFailure();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof authenticate_result)
- return this.equals((authenticate_result)that);
- return false;
- }
-
- public boolean equals(authenticate_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(authenticate_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("authenticate_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class authenticate_resultStandardSchemeFactory implements SchemeFactory {
- public authenticate_resultStandardScheme getScheme() {
- return new authenticate_resultStandardScheme();
- }
- }
-
- private static class authenticate_resultStandardScheme extends StandardScheme<authenticate_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new SessionData();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // FAILURE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.failure = new AuthenticationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class authenticate_resultTupleSchemeFactory implements SchemeFactory {
- public authenticate_resultTupleScheme getScheme() {
- return new authenticate_resultTupleScheme();
- }
- }
-
- private static class authenticate_resultTupleScheme extends TupleScheme<authenticate_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.success = new SessionData();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.failure = new AuthenticationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- }
- }
- }
-
- }
-
- public static class getOrganizations_args implements org.apache.thrift.TBase<getOrganizations_args, getOrganizations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_args");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOrganizations_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOrganizations_argsTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_args.class, metaDataMap);
- }
-
- public getOrganizations_args() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getOrganizations_args(getOrganizations_args other) {
- }
-
- public getOrganizations_args deepCopy() {
- return new getOrganizations_args(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getOrganizations_args)
- return this.equals((getOrganizations_args)that);
- return false;
- }
-
- public boolean equals(getOrganizations_args that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getOrganizations_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOrganizations_args(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getOrganizations_argsStandardSchemeFactory implements SchemeFactory {
- public getOrganizations_argsStandardScheme getScheme() {
- return new getOrganizations_argsStandardScheme();
- }
- }
-
- private static class getOrganizations_argsStandardScheme extends StandardScheme<getOrganizations_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getOrganizations_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getOrganizations_argsTupleSchemeFactory implements SchemeFactory {
- public getOrganizations_argsTupleScheme getScheme() {
- return new getOrganizations_argsTupleScheme();
- }
- }
-
- private static class getOrganizations_argsTupleScheme extends TupleScheme<getOrganizations_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
- }
-
- public static class getOrganizations_result implements org.apache.thrift.TBase<getOrganizations_result, getOrganizations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOrganizations_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOrganizations_resultTupleSchemeFactory());
- }
-
- public List<OrganizationData> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OrganizationData.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_result.class, metaDataMap);
- }
-
- public getOrganizations_result() {
- }
-
- public getOrganizations_result(
- List<OrganizationData> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getOrganizations_result(getOrganizations_result other) {
- if (other.isSetSuccess()) {
- List<OrganizationData> __this__success = new ArrayList<OrganizationData>(other.success.size());
- for (OrganizationData other_element : other.success) {
- __this__success.add(new OrganizationData(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getOrganizations_result deepCopy() {
- return new getOrganizations_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<OrganizationData> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(OrganizationData elem) {
- if (this.success == null) {
- this.success = new ArrayList<OrganizationData>();
- }
- this.success.add(elem);
- }
-
- public List<OrganizationData> getSuccess() {
- return this.success;
- }
-
- public getOrganizations_result setSuccess(List<OrganizationData> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<OrganizationData>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getOrganizations_result)
- return this.equals((getOrganizations_result)that);
- return false;
- }
-
- public boolean equals(getOrganizations_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getOrganizations_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOrganizations_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getOrganizations_resultStandardSchemeFactory implements SchemeFactory {
- public getOrganizations_resultStandardScheme getScheme() {
- return new getOrganizations_resultStandardScheme();
- }
- }
-
- private static class getOrganizations_resultStandardScheme extends StandardScheme<getOrganizations_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.success = new ArrayList<OrganizationData>(_list16.size);
- for (int _i17 = 0; _i17 < _list16.size; ++_i17)
- {
- OrganizationData _elem18;
- _elem18 = new OrganizationData();
- _elem18.read(iprot);
- struct.success.add(_elem18);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getOrganizations_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (OrganizationData _iter19 : struct.success)
- {
- _iter19.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getOrganizations_resultTupleSchemeFactory implements SchemeFactory {
- public getOrganizations_resultTupleScheme getScheme() {
- return new getOrganizations_resultTupleScheme();
- }
- }
-
- private static class getOrganizations_resultTupleScheme extends TupleScheme<getOrganizations_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (OrganizationData _iter20 : struct.success)
- {
- _iter20.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<OrganizationData>(_list21.size);
- for (int _i22 = 0; _i22 < _list21.size; ++_i22)
- {
- OrganizationData _elem23;
- _elem23 = new OrganizationData();
- _elem23.read(iprot);
- struct.success.add(_elem23);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class findUser_args implements org.apache.thrift.TBase<findUser_args, findUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_args");
-
- private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField SEARCH_TERM_FIELD_DESC = new org.apache.thrift.protocol.TField("searchTerm", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new findUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new findUser_argsTupleSchemeFactory());
- }
-
- public String sessionId; // required
- public String organizationId; // required
- public String searchTerm; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SESSION_ID((short)1, "sessionId"),
- ORGANIZATION_ID((short)2, "organizationId"),
- SEARCH_TERM((short)3, "searchTerm");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SESSION_ID
- return SESSION_ID;
- case 2: // ORGANIZATION_ID
- return ORGANIZATION_ID;
- case 3: // SEARCH_TERM
- return SEARCH_TERM;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID")));
- tmpMap.put(_Fields.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SEARCH_TERM, new org.apache.thrift.meta_data.FieldMetaData("searchTerm", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUser_args.class, metaDataMap);
- }
-
- public findUser_args() {
- }
-
- public findUser_args(
- String sessionId,
- String organizationId,
- String searchTerm)
- {
- this();
- this.sessionId = sessionId;
- this.organizationId = organizationId;
- this.searchTerm = searchTerm;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public findUser_args(findUser_args other) {
- if (other.isSetSessionId()) {
- this.sessionId = other.sessionId;
- }
- if (other.isSetOrganizationId()) {
- this.organizationId = other.organizationId;
- }
- if (other.isSetSearchTerm()) {
- this.searchTerm = other.searchTerm;
- }
- }
-
- public findUser_args deepCopy() {
- return new findUser_args(this);
- }
-
- @Override
- public void clear() {
- this.sessionId = null;
- this.organizationId = null;
- this.searchTerm = null;
- }
-
- public String getSessionId() {
- return this.sessionId;
- }
-
- public findUser_args setSessionId(String sessionId) {
- this.sessionId = sessionId;
- return this;
- }
-
- public void unsetSessionId() {
- this.sessionId = null;
- }
-
- /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
- public boolean isSetSessionId() {
- return this.sessionId != null;
- }
-
- public void setSessionIdIsSet(boolean value) {
- if (!value) {
- this.sessionId = null;
- }
- }
-
- public String getOrganizationId() {
- return this.organizationId;
- }
-
- public findUser_args setOrganizationId(String organizationId) {
- this.organizationId = organizationId;
- return this;
- }
-
- public void unsetOrganizationId() {
- this.organizationId = null;
- }
-
- /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
- public boolean isSetOrganizationId() {
- return this.organizationId != null;
- }
-
- public void setOrganizationIdIsSet(boolean value) {
- if (!value) {
- this.organizationId = null;
- }
- }
-
- public String getSearchTerm() {
- return this.searchTerm;
- }
-
- public findUser_args setSearchTerm(String searchTerm) {
- this.searchTerm = searchTerm;
- return this;
- }
-
- public void unsetSearchTerm() {
- this.searchTerm = null;
- }
-
- /** Returns true if field searchTerm is set (has been assigned a value) and false otherwise */
- public boolean isSetSearchTerm() {
- return this.searchTerm != null;
- }
-
- public void setSearchTermIsSet(boolean value) {
- if (!value) {
- this.searchTerm = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SESSION_ID:
- if (value == null) {
- unsetSessionId();
- } else {
- setSessionId((String)value);
- }
- break;
-
- case ORGANIZATION_ID:
- if (value == null) {
- unsetOrganizationId();
- } else {
- setOrganizationId((String)value);
- }
- break;
-
- case SEARCH_TERM:
- if (value == null) {
- unsetSearchTerm();
- } else {
- setSearchTerm((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SESSION_ID:
- return getSessionId();
-
- case ORGANIZATION_ID:
- return getOrganizationId();
-
- case SEARCH_TERM:
- return getSearchTerm();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SESSION_ID:
- return isSetSessionId();
- case ORGANIZATION_ID:
- return isSetOrganizationId();
- case SEARCH_TERM:
- return isSetSearchTerm();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof findUser_args)
- return this.equals((findUser_args)that);
- return false;
- }
-
- public boolean equals(findUser_args that) {
- if (that == null)
- return false;
-
- boolean this_present_sessionId = true && this.isSetSessionId();
- boolean that_present_sessionId = true && that.isSetSessionId();
- if (this_present_sessionId || that_present_sessionId) {
- if (!(this_present_sessionId && that_present_sessionId))
- return false;
- if (!this.sessionId.equals(that.sessionId))
- return false;
- }
-
- boolean this_present_organizationId = true && this.isSetOrganizationId();
- boolean that_present_organizationId = true && that.isSetOrganizationId();
- if (this_present_organizationId || that_present_organizationId) {
- if (!(this_present_organizationId && that_present_organizationId))
- return false;
- if (!this.organizationId.equals(that.organizationId))
- return false;
- }
-
- boolean this_present_searchTerm = true && this.isSetSearchTerm();
- boolean that_present_searchTerm = true && that.isSetSearchTerm();
- if (this_present_searchTerm || that_present_searchTerm) {
- if (!(this_present_searchTerm && that_present_searchTerm))
- return false;
- if (!this.searchTerm.equals(that.searchTerm))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(findUser_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOrganizationId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSearchTerm()).compareTo(other.isSetSearchTerm());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSearchTerm()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchTerm, other.searchTerm);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("findUser_args(");
- boolean first = true;
-
- sb.append("sessionId:");
- if (this.sessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.sessionId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("organizationId:");
- if (this.organizationId == null) {
- sb.append("null");
- } else {
- sb.append(this.organizationId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("searchTerm:");
- if (this.searchTerm == null) {
- sb.append("null");
- } else {
- sb.append(this.searchTerm);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class findUser_argsStandardSchemeFactory implements SchemeFactory {
- public findUser_argsStandardScheme getScheme() {
- return new findUser_argsStandardScheme();
- }
- }
-
- private static class findUser_argsStandardScheme extends StandardScheme<findUser_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ORGANIZATION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // SEARCH_TERM
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.searchTerm = iprot.readString();
- struct.setSearchTermIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, findUser_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.sessionId != null) {
- oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.sessionId);
- oprot.writeFieldEnd();
- }
- if (struct.organizationId != null) {
- oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
- oprot.writeString(struct.organizationId);
- oprot.writeFieldEnd();
- }
- if (struct.searchTerm != null) {
- oprot.writeFieldBegin(SEARCH_TERM_FIELD_DESC);
- oprot.writeString(struct.searchTerm);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class findUser_argsTupleSchemeFactory implements SchemeFactory {
- public findUser_argsTupleScheme getScheme() {
- return new findUser_argsTupleScheme();
- }
- }
-
- private static class findUser_argsTupleScheme extends TupleScheme<findUser_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSessionId()) {
- optionals.set(0);
- }
- if (struct.isSetOrganizationId()) {
- optionals.set(1);
- }
- if (struct.isSetSearchTerm()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetSessionId()) {
- oprot.writeString(struct.sessionId);
- }
- if (struct.isSetOrganizationId()) {
- oprot.writeString(struct.organizationId);
- }
- if (struct.isSetSearchTerm()) {
- oprot.writeString(struct.searchTerm);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- }
- if (incoming.get(2)) {
- struct.searchTerm = iprot.readString();
- struct.setSearchTermIsSet(true);
- }
- }
- }
-
- }
-
- public static class findUser_result implements org.apache.thrift.TBase<findUser_result, findUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new findUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new findUser_resultTupleSchemeFactory());
- }
-
- public List<UserInfo> success; // required
- public AuthorizationException failure; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- FAILURE((short)1, "failure");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class))));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUser_result.class, metaDataMap);
- }
-
- public findUser_result() {
- }
-
- public findUser_result(
- List<UserInfo> success,
- AuthorizationException failure)
- {
- this();
- this.success = success;
- this.failure = failure;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public findUser_result(findUser_result other) {
- if (other.isSetSuccess()) {
- List<UserInfo> __this__success = new ArrayList<UserInfo>(other.success.size());
- for (UserInfo other_element : other.success) {
- __this__success.add(new UserInfo(other_element));
- }
- this.success = __this__success;
- }
- if (other.isSetFailure()) {
- this.failure = new AuthorizationException(other.failure);
- }
- }
-
- public findUser_result deepCopy() {
- return new findUser_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.failure = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<UserInfo> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(UserInfo elem) {
- if (this.success == null) {
- this.success = new ArrayList<UserInfo>();
- }
- this.success.add(elem);
- }
-
- public List<UserInfo> getSuccess() {
- return this.success;
- }
-
- public findUser_result setSuccess(List<UserInfo> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public AuthorizationException getFailure() {
- return this.failure;
- }
-
- public findUser_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 void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<UserInfo>)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((AuthorizationException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case FAILURE:
- return getFailure();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof findUser_result)
- return this.equals((findUser_result)that);
- return false;
- }
-
- public boolean equals(findUser_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(findUser_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("findUser_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class findUser_resultStandardSchemeFactory implements SchemeFactory {
- public findUser_resultStandardScheme getScheme() {
- return new findUser_resultStandardScheme();
- }
- }
-
- private static class findUser_resultStandardScheme extends StandardScheme<findUser_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
- struct.success = new ArrayList<UserInfo>(_list24.size);
- for (int _i25 = 0; _i25 < _list24.size; ++_i25)
- {
- UserInfo _elem26;
- _elem26 = new UserInfo();
- _elem26.read(iprot);
- struct.success.add(_elem26);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // FAILURE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.failure = new AuthorizationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, findUser_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (UserInfo _iter27 : struct.success)
- {
- _iter27.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class findUser_resultTupleSchemeFactory implements SchemeFactory {
- public findUser_resultTupleScheme getScheme() {
- return new findUser_resultTupleScheme();
- }
- }
-
- private static class findUser_resultTupleScheme extends TupleScheme<findUser_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, findUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (UserInfo _iter28 : struct.success)
- {
- _iter28.write(oprot);
- }
- }
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, findUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<UserInfo>(_list29.size);
- for (int _i30 = 0; _i30 < _list29.size; ++_i30)
- {
- UserInfo _elem31;
- _elem31 = new UserInfo();
- _elem31.read(iprot);
- struct.success.add(_elem31);
- }
- }
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.failure = new AuthorizationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPublicImages_args implements org.apache.thrift.TBase<getPublicImages_args, getPublicImages_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_args");
-
- private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPublicImages_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPublicImages_argsTupleSchemeFactory());
- }
-
- public String sessionId; // required
- public int page; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SESSION_ID((short)1, "sessionId"),
- PAGE((short)2, "page");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SESSION_ID
- return SESSION_ID;
- case 2: // PAGE
- return PAGE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __PAGE_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID")));
- tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPublicImages_args.class, metaDataMap);
- }
-
- public getPublicImages_args() {
- }
-
- public getPublicImages_args(
- String sessionId,
- int page)
- {
- this();
- this.sessionId = sessionId;
- this.page = page;
- setPageIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPublicImages_args(getPublicImages_args other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetSessionId()) {
- this.sessionId = other.sessionId;
- }
- this.page = other.page;
- }
-
- public getPublicImages_args deepCopy() {
- return new getPublicImages_args(this);
- }
-
- @Override
- public void clear() {
- this.sessionId = null;
- setPageIsSet(false);
- this.page = 0;
- }
-
- public String getSessionId() {
- return this.sessionId;
- }
-
- public getPublicImages_args setSessionId(String sessionId) {
- this.sessionId = sessionId;
- return this;
- }
-
- public void unsetSessionId() {
- this.sessionId = null;
- }
-
- /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
- public boolean isSetSessionId() {
- return this.sessionId != null;
- }
-
- public void setSessionIdIsSet(boolean value) {
- if (!value) {
- this.sessionId = null;
- }
- }
-
- public int getPage() {
- return this.page;
- }
-
- public getPublicImages_args setPage(int page) {
- this.page = page;
- setPageIsSet(true);
- return this;
- }
-
- public void unsetPage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
- }
-
- /** Returns true if field page is set (has been assigned a value) and false otherwise */
- public boolean isSetPage() {
- return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
- }
-
- public void setPageIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SESSION_ID:
- if (value == null) {
- unsetSessionId();
- } else {
- setSessionId((String)value);
- }
- break;
-
- case PAGE:
- if (value == null) {
- unsetPage();
- } else {
- setPage((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SESSION_ID:
- return getSessionId();
-
- case PAGE:
- return Integer.valueOf(getPage());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SESSION_ID:
- return isSetSessionId();
- case PAGE:
- return isSetPage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPublicImages_args)
- return this.equals((getPublicImages_args)that);
- return false;
- }
-
- public boolean equals(getPublicImages_args that) {
- if (that == null)
- return false;
-
- boolean this_present_sessionId = true && this.isSetSessionId();
- boolean that_present_sessionId = true && that.isSetSessionId();
- if (this_present_sessionId || that_present_sessionId) {
- if (!(this_present_sessionId && that_present_sessionId))
- return false;
- if (!this.sessionId.equals(that.sessionId))
- return false;
- }
-
- boolean this_present_page = true;
- boolean that_present_page = true;
- if (this_present_page || that_present_page) {
- if (!(this_present_page && that_present_page))
- return false;
- if (this.page != that.page)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPublicImages_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPublicImages_args(");
- boolean first = true;
-
- sb.append("sessionId:");
- if (this.sessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.sessionId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("page:");
- sb.append(this.page);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPublicImages_argsStandardSchemeFactory implements SchemeFactory {
- public getPublicImages_argsStandardScheme getScheme() {
- return new getPublicImages_argsStandardScheme();
- }
- }
-
- private static class getPublicImages_argsStandardScheme extends StandardScheme<getPublicImages_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.page = iprot.readI32();
- struct.setPageIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPublicImages_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.sessionId != null) {
- oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.sessionId);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(PAGE_FIELD_DESC);
- oprot.writeI32(struct.page);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPublicImages_argsTupleSchemeFactory implements SchemeFactory {
- public getPublicImages_argsTupleScheme getScheme() {
- return new getPublicImages_argsTupleScheme();
- }
- }
-
- private static class getPublicImages_argsTupleScheme extends TupleScheme<getPublicImages_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSessionId()) {
- optionals.set(0);
- }
- if (struct.isSetPage()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSessionId()) {
- oprot.writeString(struct.sessionId);
- }
- if (struct.isSetPage()) {
- oprot.writeI32(struct.page);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.page = iprot.readI32();
- struct.setPageIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPublicImages_result implements org.apache.thrift.TBase<getPublicImages_result, getPublicImages_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPublicImages_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPublicImages_resultTupleSchemeFactory());
- }
-
- public List<ImageData> success; // required
- public AuthorizationException failure; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- FAILURE((short)1, "failure");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageData.class))));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPublicImages_result.class, metaDataMap);
- }
-
- public getPublicImages_result() {
- }
-
- public getPublicImages_result(
- List<ImageData> success,
- AuthorizationException failure)
- {
- this();
- this.success = success;
- this.failure = failure;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPublicImages_result(getPublicImages_result other) {
- if (other.isSetSuccess()) {
- List<ImageData> __this__success = new ArrayList<ImageData>(other.success.size());
- for (ImageData other_element : other.success) {
- __this__success.add(new ImageData(other_element));
- }
- this.success = __this__success;
- }
- if (other.isSetFailure()) {
- this.failure = new AuthorizationException(other.failure);
- }
- }
-
- public getPublicImages_result deepCopy() {
- return new getPublicImages_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.failure = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<ImageData> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(ImageData elem) {
- if (this.success == null) {
- this.success = new ArrayList<ImageData>();
- }
- this.success.add(elem);
- }
-
- public List<ImageData> getSuccess() {
- return this.success;
- }
-
- public getPublicImages_result setSuccess(List<ImageData> 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 getPublicImages_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 void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<ImageData>)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((AuthorizationException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case FAILURE:
- return getFailure();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPublicImages_result)
- return this.equals((getPublicImages_result)that);
- return false;
- }
-
- public boolean equals(getPublicImages_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPublicImages_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPublicImages_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPublicImages_resultStandardSchemeFactory implements SchemeFactory {
- public getPublicImages_resultStandardScheme getScheme() {
- return new getPublicImages_resultStandardScheme();
- }
- }
-
- private static class getPublicImages_resultStandardScheme extends StandardScheme<getPublicImages_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
- struct.success = new ArrayList<ImageData>(_list32.size);
- for (int _i33 = 0; _i33 < _list32.size; ++_i33)
- {
- ImageData _elem34;
- _elem34 = new ImageData();
- _elem34.read(iprot);
- struct.success.add(_elem34);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // FAILURE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.failure = new AuthorizationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPublicImages_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (ImageData _iter35 : struct.success)
- {
- _iter35.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPublicImages_resultTupleSchemeFactory implements SchemeFactory {
- public getPublicImages_resultTupleScheme getScheme() {
- return new getPublicImages_resultTupleScheme();
- }
- }
-
- private static class getPublicImages_resultTupleScheme extends TupleScheme<getPublicImages_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (ImageData _iter36 : struct.success)
- {
- _iter36.write(oprot);
- }
- }
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<ImageData>(_list37.size);
- for (int _i38 = 0; _i38 < _list37.size; ++_i38)
- {
- ImageData _elem39;
- _elem39 = new ImageData();
- _elem39.read(iprot);
- struct.success.add(_elem39);
- }
- }
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.failure = new AuthorizationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- }
- }
- }
-
- }
-
- public static class getUserFromToken_args implements org.apache.thrift.TBase<getUserFromToken_args, getUserFromToken_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserFromToken_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserFromToken_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_args.class, metaDataMap);
- }
-
- public getUserFromToken_args() {
- }
-
- public getUserFromToken_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getUserFromToken_args(getUserFromToken_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getUserFromToken_args deepCopy() {
- return new getUserFromToken_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getUserFromToken_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getUserFromToken_args)
- return this.equals((getUserFromToken_args)that);
- return false;
- }
-
- public boolean equals(getUserFromToken_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getUserFromToken_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserFromToken_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getUserFromToken_argsStandardSchemeFactory implements SchemeFactory {
- public getUserFromToken_argsStandardScheme getScheme() {
- return new getUserFromToken_argsStandardScheme();
- }
- }
-
- private static class getUserFromToken_argsStandardScheme extends StandardScheme<getUserFromToken_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getUserFromToken_argsTupleSchemeFactory implements SchemeFactory {
- public getUserFromToken_argsTupleScheme getScheme() {
- return new getUserFromToken_argsTupleScheme();
- }
- }
-
- private static class getUserFromToken_argsTupleScheme extends TupleScheme<getUserFromToken_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getUserFromToken_result implements org.apache.thrift.TBase<getUserFromToken_result, getUserFromToken_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserFromToken_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserFromToken_resultTupleSchemeFactory());
- }
-
- public UserInfo success; // required
- public InvalidTokenException failure; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- FAILURE((short)1, "failure");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_result.class, metaDataMap);
- }
-
- public getUserFromToken_result() {
- }
-
- public getUserFromToken_result(
- UserInfo success,
- InvalidTokenException failure)
- {
- this();
- this.success = success;
- this.failure = failure;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getUserFromToken_result(getUserFromToken_result other) {
- if (other.isSetSuccess()) {
- this.success = new UserInfo(other.success);
- }
- if (other.isSetFailure()) {
- this.failure = new InvalidTokenException(other.failure);
- }
- }
-
- public getUserFromToken_result deepCopy() {
- return new getUserFromToken_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.failure = null;
- }
-
- public UserInfo getSuccess() {
- return this.success;
- }
-
- public getUserFromToken_result setSuccess(UserInfo success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public InvalidTokenException getFailure() {
- return this.failure;
- }
-
- public getUserFromToken_result setFailure(InvalidTokenException failure) {
- this.failure = failure;
- return this;
- }
-
- public void unsetFailure() {
- this.failure = null;
- }
-
- /** Returns true if field failure is set (has been assigned a value) and false otherwise */
- public boolean isSetFailure() {
- return this.failure != null;
- }
-
- public void setFailureIsSet(boolean value) {
- if (!value) {
- this.failure = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((UserInfo)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((InvalidTokenException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case FAILURE:
- return getFailure();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getUserFromToken_result)
- return this.equals((getUserFromToken_result)that);
- return false;
- }
-
- public boolean equals(getUserFromToken_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getUserFromToken_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserFromToken_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getUserFromToken_resultStandardSchemeFactory implements SchemeFactory {
- public getUserFromToken_resultStandardScheme getScheme() {
- return new getUserFromToken_resultStandardScheme();
- }
- }
-
- private static class getUserFromToken_resultStandardScheme extends StandardScheme<getUserFromToken_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new UserInfo();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // FAILURE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.failure = new InvalidTokenException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getUserFromToken_resultTupleSchemeFactory implements SchemeFactory {
- public getUserFromToken_resultTupleScheme getScheme() {
- return new getUserFromToken_resultTupleScheme();
- }
- }
-
- private static class getUserFromToken_resultTupleScheme extends TupleScheme<getUserFromToken_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.success = new UserInfo();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.failure = new InvalidTokenException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- }
- }
- }
-
- }
-
- public static class isServerAuthenticated_args implements org.apache.thrift.TBase<isServerAuthenticated_args, isServerAuthenticated_args._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_args");
-
- private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new isServerAuthenticated_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new isServerAuthenticated_argsTupleSchemeFactory());
- }
-
- public String serverSessionId; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SERVER_SESSION_ID((short)1, "serverSessionId");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SERVER_SESSION_ID
- return SERVER_SESSION_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_args.class, metaDataMap);
- }
-
- public isServerAuthenticated_args() {
- }
-
- public isServerAuthenticated_args(
- String serverSessionId)
- {
- this();
- this.serverSessionId = serverSessionId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public isServerAuthenticated_args(isServerAuthenticated_args other) {
- if (other.isSetServerSessionId()) {
- this.serverSessionId = other.serverSessionId;
- }
- }
-
- public isServerAuthenticated_args deepCopy() {
- return new isServerAuthenticated_args(this);
- }
-
- @Override
- public void clear() {
- this.serverSessionId = null;
- }
-
- public String getServerSessionId() {
- return this.serverSessionId;
- }
-
- public isServerAuthenticated_args setServerSessionId(String serverSessionId) {
- this.serverSessionId = serverSessionId;
- return this;
- }
-
- public void unsetServerSessionId() {
- this.serverSessionId = null;
- }
-
- /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */
- public boolean isSetServerSessionId() {
- return this.serverSessionId != null;
- }
-
- public void setServerSessionIdIsSet(boolean value) {
- if (!value) {
- this.serverSessionId = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SERVER_SESSION_ID:
- if (value == null) {
- unsetServerSessionId();
- } else {
- setServerSessionId((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SERVER_SESSION_ID:
- return getServerSessionId();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SERVER_SESSION_ID:
- return isSetServerSessionId();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof isServerAuthenticated_args)
- return this.equals((isServerAuthenticated_args)that);
- return false;
- }
-
- public boolean equals(isServerAuthenticated_args that) {
- if (that == null)
- return false;
-
- boolean this_present_serverSessionId = true && this.isSetServerSessionId();
- boolean that_present_serverSessionId = true && that.isSetServerSessionId();
- if (this_present_serverSessionId || that_present_serverSessionId) {
- if (!(this_present_serverSessionId && that_present_serverSessionId))
- return false;
- if (!this.serverSessionId.equals(that.serverSessionId))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(isServerAuthenticated_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServerSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("isServerAuthenticated_args(");
- boolean first = true;
-
- sb.append("serverSessionId:");
- if (this.serverSessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.serverSessionId);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class isServerAuthenticated_argsStandardSchemeFactory implements SchemeFactory {
- public isServerAuthenticated_argsStandardScheme getScheme() {
- return new isServerAuthenticated_argsStandardScheme();
- }
- }
-
- private static class isServerAuthenticated_argsStandardScheme extends StandardScheme<isServerAuthenticated_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SERVER_SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.serverSessionId != null) {
- oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.serverSessionId);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class isServerAuthenticated_argsTupleSchemeFactory implements SchemeFactory {
- public isServerAuthenticated_argsTupleScheme getScheme() {
- return new isServerAuthenticated_argsTupleScheme();
- }
- }
-
- private static class isServerAuthenticated_argsTupleScheme extends TupleScheme<isServerAuthenticated_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetServerSessionId()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetServerSessionId()) {
- oprot.writeString(struct.serverSessionId);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- }
- }
- }
-
- }
-
- public static class isServerAuthenticated_result implements org.apache.thrift.TBase<isServerAuthenticated_result, isServerAuthenticated_result._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new isServerAuthenticated_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new isServerAuthenticated_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_result.class, metaDataMap);
- }
-
- public isServerAuthenticated_result() {
- }
-
- public isServerAuthenticated_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public isServerAuthenticated_result(isServerAuthenticated_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public isServerAuthenticated_result deepCopy() {
- return new isServerAuthenticated_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public isServerAuthenticated_result setSuccess(boolean success) {
- this.success = success;
- setSuccessIsSet(true);
- return this;
- }
-
- public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Boolean)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return 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 isServerAuthenticated_result)
- return this.equals((isServerAuthenticated_result)that);
- return false;
- }
-
- public boolean equals(isServerAuthenticated_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(isServerAuthenticated_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("isServerAuthenticated_result(");
- boolean first = true;
-
- sb.append("success:");
- sb.append(this.success);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class isServerAuthenticated_resultStandardSchemeFactory implements SchemeFactory {
- public isServerAuthenticated_resultStandardScheme getScheme() {
- return new isServerAuthenticated_resultStandardScheme();
- }
- }
-
- private static class isServerAuthenticated_resultStandardScheme extends StandardScheme<isServerAuthenticated_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class isServerAuthenticated_resultTupleSchemeFactory implements SchemeFactory {
- public isServerAuthenticated_resultTupleScheme getScheme() {
- return new isServerAuthenticated_resultTupleScheme();
- }
- }
-
- private static class isServerAuthenticated_resultTupleScheme extends TupleScheme<isServerAuthenticated_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeBool(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class startServerAuthentication_args implements org.apache.thrift.TBase<startServerAuthentication_args, startServerAuthentication_args._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_args");
-
- private static final org.apache.thrift.protocol.TField ORGANIZATION_FIELD_DESC = new org.apache.thrift.protocol.TField("organization", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new startServerAuthentication_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new startServerAuthentication_argsTupleSchemeFactory());
- }
-
- public String organization; // 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 {
- ORGANIZATION((short)1, "organization");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ORGANIZATION
- return ORGANIZATION;
- 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.ORGANIZATION, new org.apache.thrift.meta_data.FieldMetaData("organization", 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(startServerAuthentication_args.class, metaDataMap);
- }
-
- public startServerAuthentication_args() {
- }
-
- public startServerAuthentication_args(
- String organization)
- {
- this();
- this.organization = organization;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public startServerAuthentication_args(startServerAuthentication_args other) {
- if (other.isSetOrganization()) {
- this.organization = other.organization;
- }
- }
-
- public startServerAuthentication_args deepCopy() {
- return new startServerAuthentication_args(this);
- }
-
- @Override
- public void clear() {
- this.organization = null;
- }
-
- public String getOrganization() {
- return this.organization;
- }
-
- public startServerAuthentication_args setOrganization(String organization) {
- this.organization = organization;
- return this;
- }
-
- public void unsetOrganization() {
- this.organization = null;
- }
-
- /** Returns true if field organization is set (has been assigned a value) and false otherwise */
- public boolean isSetOrganization() {
- return this.organization != null;
- }
-
- public void setOrganizationIsSet(boolean value) {
- if (!value) {
- this.organization = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ORGANIZATION:
- if (value == null) {
- unsetOrganization();
- } else {
- setOrganization((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ORGANIZATION:
- return getOrganization();
-
- }
- 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 ORGANIZATION:
- return isSetOrganization();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof startServerAuthentication_args)
- return this.equals((startServerAuthentication_args)that);
- return false;
- }
-
- public boolean equals(startServerAuthentication_args that) {
- if (that == null)
- return false;
-
- boolean this_present_organization = true && this.isSetOrganization();
- boolean that_present_organization = true && that.isSetOrganization();
- if (this_present_organization || that_present_organization) {
- if (!(this_present_organization && that_present_organization))
- return false;
- if (!this.organization.equals(that.organization))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(startServerAuthentication_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetOrganization()).compareTo(other.isSetOrganization());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOrganization()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organization, other.organization);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("startServerAuthentication_args(");
- boolean first = true;
-
- sb.append("organization:");
- if (this.organization == null) {
- sb.append("null");
- } else {
- sb.append(this.organization);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class startServerAuthentication_argsStandardSchemeFactory implements SchemeFactory {
- public startServerAuthentication_argsStandardScheme getScheme() {
- return new startServerAuthentication_argsStandardScheme();
- }
- }
-
- private static class startServerAuthentication_argsStandardScheme extends StandardScheme<startServerAuthentication_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ORGANIZATION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.organization = iprot.readString();
- struct.setOrganizationIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.organization != null) {
- oprot.writeFieldBegin(ORGANIZATION_FIELD_DESC);
- oprot.writeString(struct.organization);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class startServerAuthentication_argsTupleSchemeFactory implements SchemeFactory {
- public startServerAuthentication_argsTupleScheme getScheme() {
- return new startServerAuthentication_argsTupleScheme();
- }
- }
-
- private static class startServerAuthentication_argsTupleScheme extends TupleScheme<startServerAuthentication_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetOrganization()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetOrganization()) {
- oprot.writeString(struct.organization);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.organization = iprot.readString();
- struct.setOrganizationIsSet(true);
- }
- }
- }
-
- }
-
- public static class startServerAuthentication_result implements org.apache.thrift.TBase<startServerAuthentication_result, startServerAuthentication_result._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new startServerAuthentication_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new startServerAuthentication_resultTupleSchemeFactory());
- }
-
- public ByteBuffer success; // required
- public AuthenticationException failure; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- FAILURE((short)1, "failure");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startServerAuthentication_result.class, metaDataMap);
- }
-
- public startServerAuthentication_result() {
- }
-
- public startServerAuthentication_result(
- ByteBuffer success,
- AuthenticationException failure)
- {
- this();
- this.success = success;
- this.failure = failure;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public startServerAuthentication_result(startServerAuthentication_result other) {
- if (other.isSetSuccess()) {
- this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
-;
- }
- if (other.isSetFailure()) {
- this.failure = new AuthenticationException(other.failure);
- }
- }
-
- public startServerAuthentication_result deepCopy() {
- return new startServerAuthentication_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.failure = null;
- }
-
- public byte[] getSuccess() {
- setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
- return success == null ? null : success.array();
- }
-
- public ByteBuffer bufferForSuccess() {
- return success;
- }
-
- public startServerAuthentication_result setSuccess(byte[] success) {
- setSuccess(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
- return this;
- }
-
- public startServerAuthentication_result setSuccess(ByteBuffer 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 AuthenticationException getFailure() {
- return this.failure;
- }
-
- public startServerAuthentication_result setFailure(AuthenticationException failure) {
- this.failure = failure;
- return this;
- }
-
- public void unsetFailure() {
- this.failure = null;
- }
-
- /** Returns true if field failure is set (has been assigned a value) and false otherwise */
- public boolean isSetFailure() {
- return this.failure != null;
- }
-
- public void setFailureIsSet(boolean value) {
- if (!value) {
- this.failure = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((ByteBuffer)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((AuthenticationException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case FAILURE:
- return getFailure();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof startServerAuthentication_result)
- return this.equals((startServerAuthentication_result)that);
- return false;
- }
-
- public boolean equals(startServerAuthentication_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(startServerAuthentication_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("startServerAuthentication_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- org.apache.thrift.TBaseHelper.toString(this.success, sb);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class startServerAuthentication_resultStandardSchemeFactory implements SchemeFactory {
- public startServerAuthentication_resultStandardScheme getScheme() {
- return new startServerAuthentication_resultStandardScheme();
- }
- }
-
- private static class startServerAuthentication_resultStandardScheme extends StandardScheme<startServerAuthentication_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readBinary();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // FAILURE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.failure = new AuthenticationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBinary(struct.success);
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class startServerAuthentication_resultTupleSchemeFactory implements SchemeFactory {
- public startServerAuthentication_resultTupleScheme getScheme() {
- return new startServerAuthentication_resultTupleScheme();
- }
- }
-
- private static class startServerAuthentication_resultTupleScheme extends TupleScheme<startServerAuthentication_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSuccess()) {
- oprot.writeBinary(struct.success);
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.success = iprot.readBinary();
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.failure = new AuthenticationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- }
- }
- }
-
- }
-
- public static class serverAuthenticate_args implements org.apache.thrift.TBase<serverAuthenticate_args, serverAuthenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_args");
-
- private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField CHALLENGE_RESPONSE_FIELD_DESC = new org.apache.thrift.protocol.TField("challengeResponse", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new serverAuthenticate_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new serverAuthenticate_argsTupleSchemeFactory());
- }
-
- public String organizationId; // required
- public ByteBuffer challengeResponse; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ORGANIZATION_ID((short)1, "organizationId"),
- CHALLENGE_RESPONSE((short)2, "challengeResponse");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ORGANIZATION_ID
- return ORGANIZATION_ID;
- case 2: // CHALLENGE_RESPONSE
- return CHALLENGE_RESPONSE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.CHALLENGE_RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("challengeResponse", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(serverAuthenticate_args.class, metaDataMap);
- }
-
- public serverAuthenticate_args() {
- }
-
- public serverAuthenticate_args(
- String organizationId,
- ByteBuffer challengeResponse)
- {
- this();
- this.organizationId = organizationId;
- this.challengeResponse = challengeResponse;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public serverAuthenticate_args(serverAuthenticate_args other) {
- if (other.isSetOrganizationId()) {
- this.organizationId = other.organizationId;
- }
- if (other.isSetChallengeResponse()) {
- this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(other.challengeResponse);
-;
- }
- }
-
- public serverAuthenticate_args deepCopy() {
- return new serverAuthenticate_args(this);
- }
-
- @Override
- public void clear() {
- this.organizationId = null;
- this.challengeResponse = null;
- }
-
- public String getOrganizationId() {
- return this.organizationId;
- }
-
- public serverAuthenticate_args setOrganizationId(String organizationId) {
- this.organizationId = organizationId;
- return this;
- }
-
- public void unsetOrganizationId() {
- this.organizationId = null;
- }
-
- /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
- public boolean isSetOrganizationId() {
- return this.organizationId != null;
- }
-
- public void setOrganizationIdIsSet(boolean value) {
- if (!value) {
- this.organizationId = null;
- }
- }
-
- public byte[] getChallengeResponse() {
- setChallengeResponse(org.apache.thrift.TBaseHelper.rightSize(challengeResponse));
- return challengeResponse == null ? null : challengeResponse.array();
- }
-
- public ByteBuffer bufferForChallengeResponse() {
- return challengeResponse;
- }
-
- public serverAuthenticate_args setChallengeResponse(byte[] challengeResponse) {
- setChallengeResponse(challengeResponse == null ? (ByteBuffer)null : ByteBuffer.wrap(challengeResponse));
- return this;
- }
-
- public serverAuthenticate_args setChallengeResponse(ByteBuffer challengeResponse) {
- this.challengeResponse = challengeResponse;
- return this;
- }
-
- public void unsetChallengeResponse() {
- this.challengeResponse = null;
- }
-
- /** Returns true if field challengeResponse is set (has been assigned a value) and false otherwise */
- public boolean isSetChallengeResponse() {
- return this.challengeResponse != null;
- }
-
- public void setChallengeResponseIsSet(boolean value) {
- if (!value) {
- this.challengeResponse = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ORGANIZATION_ID:
- if (value == null) {
- unsetOrganizationId();
- } else {
- setOrganizationId((String)value);
- }
- break;
-
- case CHALLENGE_RESPONSE:
- if (value == null) {
- unsetChallengeResponse();
- } else {
- setChallengeResponse((ByteBuffer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ORGANIZATION_ID:
- return getOrganizationId();
-
- case CHALLENGE_RESPONSE:
- return getChallengeResponse();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ORGANIZATION_ID:
- return isSetOrganizationId();
- case CHALLENGE_RESPONSE:
- return isSetChallengeResponse();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof serverAuthenticate_args)
- return this.equals((serverAuthenticate_args)that);
- return false;
- }
-
- public boolean equals(serverAuthenticate_args that) {
- if (that == null)
- return false;
-
- boolean this_present_organizationId = true && this.isSetOrganizationId();
- boolean that_present_organizationId = true && that.isSetOrganizationId();
- if (this_present_organizationId || that_present_organizationId) {
- if (!(this_present_organizationId && that_present_organizationId))
- return false;
- if (!this.organizationId.equals(that.organizationId))
- return false;
- }
-
- boolean this_present_challengeResponse = true && this.isSetChallengeResponse();
- boolean that_present_challengeResponse = true && that.isSetChallengeResponse();
- if (this_present_challengeResponse || that_present_challengeResponse) {
- if (!(this_present_challengeResponse && that_present_challengeResponse))
- return false;
- if (!this.challengeResponse.equals(that.challengeResponse))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(serverAuthenticate_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOrganizationId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetChallengeResponse()).compareTo(other.isSetChallengeResponse());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetChallengeResponse()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.challengeResponse, other.challengeResponse);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("serverAuthenticate_args(");
- boolean first = true;
-
- sb.append("organizationId:");
- if (this.organizationId == null) {
- sb.append("null");
- } else {
- sb.append(this.organizationId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("challengeResponse:");
- if (this.challengeResponse == null) {
- sb.append("null");
- } else {
- org.apache.thrift.TBaseHelper.toString(this.challengeResponse, sb);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class serverAuthenticate_argsStandardSchemeFactory implements SchemeFactory {
- public serverAuthenticate_argsStandardScheme getScheme() {
- return new serverAuthenticate_argsStandardScheme();
- }
- }
-
- private static class serverAuthenticate_argsStandardScheme extends StandardScheme<serverAuthenticate_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ORGANIZATION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // CHALLENGE_RESPONSE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.challengeResponse = iprot.readBinary();
- struct.setChallengeResponseIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.organizationId != null) {
- oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
- oprot.writeString(struct.organizationId);
- oprot.writeFieldEnd();
- }
- if (struct.challengeResponse != null) {
- oprot.writeFieldBegin(CHALLENGE_RESPONSE_FIELD_DESC);
- oprot.writeBinary(struct.challengeResponse);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class serverAuthenticate_argsTupleSchemeFactory implements SchemeFactory {
- public serverAuthenticate_argsTupleScheme getScheme() {
- return new serverAuthenticate_argsTupleScheme();
- }
- }
-
- private static class serverAuthenticate_argsTupleScheme extends TupleScheme<serverAuthenticate_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetOrganizationId()) {
- optionals.set(0);
- }
- if (struct.isSetChallengeResponse()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetOrganizationId()) {
- oprot.writeString(struct.organizationId);
- }
- if (struct.isSetChallengeResponse()) {
- oprot.writeBinary(struct.challengeResponse);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.challengeResponse = iprot.readBinary();
- struct.setChallengeResponseIsSet(true);
- }
- }
- }
-
- }
-
- public static class serverAuthenticate_result implements org.apache.thrift.TBase<serverAuthenticate_result, serverAuthenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new serverAuthenticate_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new serverAuthenticate_resultTupleSchemeFactory());
- }
-
- public ServerSessionData success; // required
- public AuthenticationException failure; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- FAILURE((short)1, "failure");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ServerSessionData.class)));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(serverAuthenticate_result.class, metaDataMap);
- }
-
- public serverAuthenticate_result() {
- }
-
- public serverAuthenticate_result(
- ServerSessionData success,
- AuthenticationException failure)
- {
- this();
- this.success = success;
- this.failure = failure;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public serverAuthenticate_result(serverAuthenticate_result other) {
- if (other.isSetSuccess()) {
- this.success = new ServerSessionData(other.success);
- }
- if (other.isSetFailure()) {
- this.failure = new AuthenticationException(other.failure);
- }
- }
-
- public serverAuthenticate_result deepCopy() {
- return new serverAuthenticate_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.failure = null;
- }
-
- public ServerSessionData getSuccess() {
- return this.success;
- }
-
- public serverAuthenticate_result setSuccess(ServerSessionData success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public AuthenticationException getFailure() {
- return this.failure;
- }
-
- public serverAuthenticate_result setFailure(AuthenticationException failure) {
- this.failure = failure;
- return this;
- }
-
- public void unsetFailure() {
- this.failure = null;
- }
-
- /** Returns true if field failure is set (has been assigned a value) and false otherwise */
- public boolean isSetFailure() {
- return this.failure != null;
- }
-
- public void setFailureIsSet(boolean value) {
- if (!value) {
- this.failure = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((ServerSessionData)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((AuthenticationException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case FAILURE:
- return getFailure();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof serverAuthenticate_result)
- return this.equals((serverAuthenticate_result)that);
- return false;
- }
-
- public boolean equals(serverAuthenticate_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(serverAuthenticate_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("serverAuthenticate_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class serverAuthenticate_resultStandardSchemeFactory implements SchemeFactory {
- public serverAuthenticate_resultStandardScheme getScheme() {
- return new serverAuthenticate_resultStandardScheme();
- }
- }
-
- private static class serverAuthenticate_resultStandardScheme extends StandardScheme<serverAuthenticate_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new ServerSessionData();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // FAILURE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.failure = new AuthenticationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class serverAuthenticate_resultTupleSchemeFactory implements SchemeFactory {
- public serverAuthenticate_resultTupleScheme getScheme() {
- return new serverAuthenticate_resultTupleScheme();
- }
- }
-
- private static class serverAuthenticate_resultTupleScheme extends TupleScheme<serverAuthenticate_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.success = new ServerSessionData();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.failure = new AuthenticationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- }
- }
- }
-
- }
-
- public static class submitImage_args implements org.apache.thrift.TBase<submitImage_args, submitImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_args");
-
- private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField IMAGE_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 CRC_SUMS_FIELD_DESC = new org.apache.thrift.protocol.TField("crcSums", org.apache.thrift.protocol.TType.LIST, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new submitImage_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new submitImage_argsTupleSchemeFactory());
- }
-
- public String serverSessionId; // required
- public ImageData imageDescription; // required
- public List<Integer> crcSums; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SERVER_SESSION_ID((short)1, "serverSessionId"),
- IMAGE_DESCRIPTION((short)2, "imageDescription"),
- CRC_SUMS((short)3, "crcSums");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SERVER_SESSION_ID
- return SERVER_SESSION_ID;
- case 2: // IMAGE_DESCRIPTION
- return IMAGE_DESCRIPTION;
- case 3: // CRC_SUMS
- return CRC_SUMS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID")));
- 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)));
- tmpMap.put(_Fields.CRC_SUMS, new org.apache.thrift.meta_data.FieldMetaData("crcSums", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_args.class, metaDataMap);
- }
-
- public submitImage_args() {
- }
-
- public submitImage_args(
- String serverSessionId,
- ImageData imageDescription,
- List<Integer> crcSums)
- {
- this();
- this.serverSessionId = serverSessionId;
- this.imageDescription = imageDescription;
- this.crcSums = crcSums;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public submitImage_args(submitImage_args other) {
- if (other.isSetServerSessionId()) {
- this.serverSessionId = other.serverSessionId;
- }
- if (other.isSetImageDescription()) {
- this.imageDescription = new ImageData(other.imageDescription);
- }
- if (other.isSetCrcSums()) {
- List<Integer> __this__crcSums = new ArrayList<Integer>(other.crcSums);
- this.crcSums = __this__crcSums;
- }
- }
-
- public submitImage_args deepCopy() {
- return new submitImage_args(this);
- }
-
- @Override
- public void clear() {
- this.serverSessionId = null;
- this.imageDescription = null;
- this.crcSums = null;
- }
-
- public String getServerSessionId() {
- return this.serverSessionId;
- }
-
- public submitImage_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 ImageData getImageDescription() {
- return this.imageDescription;
- }
-
- public submitImage_args setImageDescription(ImageData imageDescription) {
- this.imageDescription = imageDescription;
- return this;
- }
-
- public void unsetImageDescription() {
- this.imageDescription = null;
- }
-
- /** Returns true if field imageDescription is set (has been assigned a value) and false otherwise */
- public boolean isSetImageDescription() {
- return this.imageDescription != null;
- }
-
- public void setImageDescriptionIsSet(boolean value) {
- if (!value) {
- this.imageDescription = null;
- }
- }
-
- public int getCrcSumsSize() {
- return (this.crcSums == null) ? 0 : this.crcSums.size();
- }
-
- public java.util.Iterator<Integer> getCrcSumsIterator() {
- return (this.crcSums == null) ? null : this.crcSums.iterator();
- }
-
- public void addToCrcSums(int elem) {
- if (this.crcSums == null) {
- this.crcSums = new ArrayList<Integer>();
- }
- this.crcSums.add(elem);
- }
-
- public List<Integer> getCrcSums() {
- return this.crcSums;
- }
-
- public submitImage_args setCrcSums(List<Integer> crcSums) {
- this.crcSums = crcSums;
- return this;
- }
-
- public void unsetCrcSums() {
- this.crcSums = null;
- }
-
- /** Returns true if field crcSums is set (has been assigned a value) and false otherwise */
- public boolean isSetCrcSums() {
- return this.crcSums != null;
- }
-
- public void setCrcSumsIsSet(boolean value) {
- if (!value) {
- this.crcSums = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SERVER_SESSION_ID:
- if (value == null) {
- unsetServerSessionId();
- } else {
- setServerSessionId((String)value);
- }
- break;
-
- case IMAGE_DESCRIPTION:
- if (value == null) {
- unsetImageDescription();
- } else {
- setImageDescription((ImageData)value);
- }
- break;
-
- case CRC_SUMS:
- if (value == null) {
- unsetCrcSums();
- } else {
- setCrcSums((List<Integer>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SERVER_SESSION_ID:
- return getServerSessionId();
-
- case IMAGE_DESCRIPTION:
- return getImageDescription();
-
- case CRC_SUMS:
- return getCrcSums();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SERVER_SESSION_ID:
- return isSetServerSessionId();
- case IMAGE_DESCRIPTION:
- return isSetImageDescription();
- case CRC_SUMS:
- return isSetCrcSums();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof submitImage_args)
- return this.equals((submitImage_args)that);
- return false;
- }
-
- public boolean equals(submitImage_args that) {
- if (that == null)
- return false;
-
- boolean this_present_serverSessionId = true && this.isSetServerSessionId();
- boolean that_present_serverSessionId = true && that.isSetServerSessionId();
- if (this_present_serverSessionId || that_present_serverSessionId) {
- if (!(this_present_serverSessionId && that_present_serverSessionId))
- return false;
- if (!this.serverSessionId.equals(that.serverSessionId))
- return false;
- }
-
- boolean this_present_imageDescription = true && this.isSetImageDescription();
- boolean that_present_imageDescription = true && that.isSetImageDescription();
- if (this_present_imageDescription || that_present_imageDescription) {
- if (!(this_present_imageDescription && that_present_imageDescription))
- return false;
- if (!this.imageDescription.equals(that.imageDescription))
- return false;
- }
-
- boolean this_present_crcSums = true && this.isSetCrcSums();
- boolean that_present_crcSums = true && that.isSetCrcSums();
- if (this_present_crcSums || that_present_crcSums) {
- if (!(this_present_crcSums && that_present_crcSums))
- return false;
- if (!this.crcSums.equals(that.crcSums))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(submitImage_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServerSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImageDescription()).compareTo(other.isSetImageDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageDescription, other.imageDescription);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCrcSums()).compareTo(other.isSetCrcSums());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCrcSums()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.crcSums, other.crcSums);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("submitImage_args(");
- boolean first = true;
-
- sb.append("serverSessionId:");
- if (this.serverSessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.serverSessionId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("imageDescription:");
- if (this.imageDescription == null) {
- sb.append("null");
- } else {
- sb.append(this.imageDescription);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("crcSums:");
- if (this.crcSums == null) {
- sb.append("null");
- } else {
- sb.append(this.crcSums);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (imageDescription != null) {
- imageDescription.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class submitImage_argsStandardSchemeFactory implements SchemeFactory {
- public submitImage_argsStandardScheme getScheme() {
- return new submitImage_argsStandardScheme();
- }
- }
-
- private static class submitImage_argsStandardScheme extends StandardScheme<submitImage_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SERVER_SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // IMAGE_DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.imageDescription = new ImageData();
- struct.imageDescription.read(iprot);
- struct.setImageDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CRC_SUMS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
- struct.crcSums = new ArrayList<Integer>(_list40.size);
- for (int _i41 = 0; _i41 < _list40.size; ++_i41)
- {
- int _elem42;
- _elem42 = iprot.readI32();
- struct.crcSums.add(_elem42);
- }
- iprot.readListEnd();
- }
- struct.setCrcSumsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, submitImage_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.serverSessionId != null) {
- oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.serverSessionId);
- oprot.writeFieldEnd();
- }
- if (struct.imageDescription != null) {
- oprot.writeFieldBegin(IMAGE_DESCRIPTION_FIELD_DESC);
- struct.imageDescription.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.crcSums != null) {
- oprot.writeFieldBegin(CRC_SUMS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.crcSums.size()));
- for (int _iter43 : struct.crcSums)
- {
- oprot.writeI32(_iter43);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class submitImage_argsTupleSchemeFactory implements SchemeFactory {
- public submitImage_argsTupleScheme getScheme() {
- return new submitImage_argsTupleScheme();
- }
- }
-
- private static class submitImage_argsTupleScheme extends TupleScheme<submitImage_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetServerSessionId()) {
- optionals.set(0);
- }
- if (struct.isSetImageDescription()) {
- optionals.set(1);
- }
- if (struct.isSetCrcSums()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetServerSessionId()) {
- oprot.writeString(struct.serverSessionId);
- }
- if (struct.isSetImageDescription()) {
- struct.imageDescription.write(oprot);
- }
- if (struct.isSetCrcSums()) {
- {
- oprot.writeI32(struct.crcSums.size());
- for (int _iter44 : struct.crcSums)
- {
- oprot.writeI32(_iter44);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.imageDescription = new ImageData();
- struct.imageDescription.read(iprot);
- struct.setImageDescriptionIsSet(true);
- }
- if (incoming.get(2)) {
- {
- org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.crcSums = new ArrayList<Integer>(_list45.size);
- for (int _i46 = 0; _i46 < _list45.size; ++_i46)
- {
- int _elem47;
- _elem47 = iprot.readI32();
- struct.crcSums.add(_elem47);
- }
- }
- struct.setCrcSumsIsSet(true);
- }
- }
- }
-
- }
-
- public static class submitImage_result implements org.apache.thrift.TBase<submitImage_result, submitImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final org.apache.thrift.protocol.TField FAILURE3_FIELD_DESC = new org.apache.thrift.protocol.TField("failure3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new submitImage_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new submitImage_resultTupleSchemeFactory());
- }
-
- public UploadData 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"),
- FAILURE3((short)3, "failure3");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- case 2: // FAILURE2
- return FAILURE2;
- case 3: // FAILURE3
- return FAILURE3;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadData.class)));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.FAILURE3, new org.apache.thrift.meta_data.FieldMetaData("failure3", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_result.class, metaDataMap);
- }
-
- public submitImage_result() {
- }
-
- public submitImage_result(
- UploadData success,
- AuthorizationException failure,
- ImageDataException failure2,
- UploadException failure3)
- {
- this();
- this.success = success;
- this.failure = failure;
- this.failure2 = failure2;
- this.failure3 = failure3;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public submitImage_result(submitImage_result other) {
- if (other.isSetSuccess()) {
- this.success = new UploadData(other.success);
- }
- if (other.isSetFailure()) {
- this.failure = new AuthorizationException(other.failure);
- }
- if (other.isSetFailure2()) {
- this.failure2 = new ImageDataException(other.failure2);
- }
- if (other.isSetFailure3()) {
- this.failure3 = new UploadException(other.failure3);
- }
- }
-
- public submitImage_result deepCopy() {
- return new submitImage_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- this.failure = null;
- this.failure2 = null;
- this.failure3 = null;
- }
-
- public UploadData getSuccess() {
- return this.success;
- }
-
- public submitImage_result setSuccess(UploadData 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 submitImage_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 submitImage_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 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((UploadData)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((AuthorizationException)value);
- }
- break;
-
- case FAILURE2:
- if (value == null) {
- unsetFailure2();
- } else {
- setFailure2((ImageDataException)value);
- }
- break;
-
- case FAILURE3:
- if (value == null) {
- unsetFailure3();
- } else {
- setFailure3((UploadException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- case FAILURE:
- return getFailure();
-
- case FAILURE2:
- return getFailure2();
-
- case FAILURE3:
- return getFailure3();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- case FAILURE2:
- return isSetFailure2();
- case FAILURE3:
- return isSetFailure3();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof submitImage_result)
- return this.equals((submitImage_result)that);
- return false;
- }
-
- public boolean equals(submitImage_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- boolean this_present_failure2 = true && this.isSetFailure2();
- boolean that_present_failure2 = true && that.isSetFailure2();
- if (this_present_failure2 || that_present_failure2) {
- if (!(this_present_failure2 && that_present_failure2))
- return false;
- if (!this.failure2.equals(that.failure2))
- return false;
- }
-
- boolean this_present_failure3 = true && this.isSetFailure3();
- boolean that_present_failure3 = true && that.isSetFailure3();
- if (this_present_failure3 || that_present_failure3) {
- if (!(this_present_failure3 && that_present_failure3))
- return false;
- if (!this.failure3.equals(that.failure3))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(submitImage_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure2()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure3()).compareTo(other.isSetFailure3());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure3()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure3, other.failure3);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("submitImage_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure2:");
- if (this.failure2 == null) {
- sb.append("null");
- } else {
- sb.append(this.failure2);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure3:");
- if (this.failure3 == null) {
- sb.append("null");
- } else {
- sb.append(this.failure3);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class submitImage_resultStandardSchemeFactory implements SchemeFactory {
- public submitImage_resultStandardScheme getScheme() {
- return new submitImage_resultStandardScheme();
- }
- }
-
- private static class submitImage_resultStandardScheme extends StandardScheme<submitImage_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new UploadData();
- 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;
- 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);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, submitImage_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.failure2 != null) {
- oprot.writeFieldBegin(FAILURE2_FIELD_DESC);
- struct.failure2.write(oprot);
- oprot.writeFieldEnd();
- }
- if (struct.failure3 != null) {
- oprot.writeFieldBegin(FAILURE3_FIELD_DESC);
- struct.failure3.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class submitImage_resultTupleSchemeFactory implements SchemeFactory {
- public submitImage_resultTupleScheme getScheme() {
- return new submitImage_resultTupleScheme();
- }
- }
-
- private static class submitImage_resultTupleScheme extends TupleScheme<submitImage_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- if (struct.isSetFailure2()) {
- optionals.set(2);
- }
- if (struct.isSetFailure3()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetSuccess()) {
- struct.success.write(oprot);
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- if (struct.isSetFailure2()) {
- struct.failure2.write(oprot);
- }
- if (struct.isSetFailure3()) {
- struct.failure3.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.success = new UploadData();
- 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);
- }
- if (incoming.get(3)) {
- struct.failure3 = new UploadException();
- struct.failure3.read(iprot);
- struct.setFailure3IsSet(true);
- }
- }
- }
-
- }
-
- public static class getImage_args implements org.apache.thrift.TBase<getImage_args, getImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImage_args> {
- 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 SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImage_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImage_argsTupleSchemeFactory());
- }
-
- public String serverSessionId; // required
- public String uuid; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SERVER_SESSION_ID((short)2, "serverSessionId"),
- UUID((short)1, "uuid");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 2: // SERVER_SESSION_ID
- return SERVER_SESSION_ID;
- case 1: // UUID
- return UUID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID")));
- 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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImage_args.class, metaDataMap);
- }
-
- public getImage_args() {
- }
-
- public getImage_args(
- String serverSessionId,
- String uuid)
- {
- this();
- this.serverSessionId = serverSessionId;
- this.uuid = uuid;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImage_args(getImage_args other) {
- if (other.isSetServerSessionId()) {
- this.serverSessionId = other.serverSessionId;
- }
- if (other.isSetUuid()) {
- this.uuid = other.uuid;
- }
- }
-
- public getImage_args deepCopy() {
- return new getImage_args(this);
- }
-
- @Override
- public void clear() {
- this.serverSessionId = null;
- 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 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 void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SERVER_SESSION_ID:
- if (value == null) {
- unsetServerSessionId();
- } else {
- setServerSessionId((String)value);
- }
- break;
-
- case UUID:
- if (value == null) {
- unsetUuid();
- } else {
- setUuid((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SERVER_SESSION_ID:
- return getServerSessionId();
-
- case UUID:
- return getUuid();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SERVER_SESSION_ID:
- return isSetServerSessionId();
- case UUID:
- return isSetUuid();
- }
- 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_serverSessionId = true && this.isSetServerSessionId();
- boolean that_present_serverSessionId = true && that.isSetServerSessionId();
- if (this_present_serverSessionId || that_present_serverSessionId) {
- if (!(this_present_serverSessionId && that_present_serverSessionId))
- return false;
- if (!this.serverSessionId.equals(that.serverSessionId))
- return false;
- }
-
- boolean this_present_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;
- }
-
- 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(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServerSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(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;
- }
- }
- 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("serverSessionId:");
- if (this.serverSessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.serverSessionId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("uuid:");
- if (this.uuid == null) {
- sb.append("null");
- } else {
- sb.append(this.uuid);
- }
- 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<getImage_args> {
-
- 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 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;
- 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;
- 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<getImage_args> {
-
- @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.isSetServerSessionId()) {
- optionals.set(0);
- }
- if (struct.isSetUuid()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetServerSessionId()) {
- oprot.writeString(struct.serverSessionId);
- }
- if (struct.isSetUuid()) {
- oprot.writeString(struct.uuid);
- }
- }
-
- @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.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.uuid = iprot.readString();
- struct.setUuidIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImage_result implements org.apache.thrift.TBase<getImage_result, getImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImage_result> {
- 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImage_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImage_resultTupleSchemeFactory());
- }
-
- public DownloadData 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<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- case 2: // FAILURE2
- return FAILURE2;
- 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, DownloadData.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(
- DownloadData success,
- AuthorizationException failure,
- ImageDataException failure2)
- {
- this();
- this.success = success;
- this.failure = failure;
- this.failure2 = failure2;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImage_result(getImage_result other) {
- if (other.isSetSuccess()) {
- this.success = new DownloadData(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 DownloadData getSuccess() {
- return this.success;
- }
-
- public getImage_result setSuccess(DownloadData 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((DownloadData)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<getImage_result> {
-
- 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 DownloadData();
- 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<getImage_result> {
-
- @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 DownloadData();
- 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 publishUser_args implements org.apache.thrift.TBase<publishUser_args, publishUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<publishUser_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publishUser_args");
-
- private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRUCT, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new publishUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new publishUser_argsTupleSchemeFactory());
- }
-
- public String serverSessionId; // required
- public UserInfo user; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SERVER_SESSION_ID((short)1, "serverSessionId"),
- USER((short)2, "user");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SERVER_SESSION_ID
- return SERVER_SESSION_ID;
- case 2: // USER
- return 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.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 , "ID")));
- tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishUser_args.class, metaDataMap);
- }
-
- public publishUser_args() {
- }
-
- public publishUser_args(
- String serverSessionId,
- UserInfo user)
- {
- this();
- this.serverSessionId = serverSessionId;
- this.user = user;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public publishUser_args(publishUser_args other) {
- if (other.isSetServerSessionId()) {
- this.serverSessionId = other.serverSessionId;
- }
- if (other.isSetUser()) {
- this.user = new UserInfo(other.user);
- }
- }
-
- public publishUser_args deepCopy() {
- return new publishUser_args(this);
- }
-
- @Override
- public void clear() {
- this.serverSessionId = null;
- this.user = null;
- }
-
- public String getServerSessionId() {
- return this.serverSessionId;
- }
-
- public publishUser_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 UserInfo getUser() {
- return this.user;
- }
-
- public publishUser_args setUser(UserInfo user) {
- this.user = user;
- return this;
- }
-
- public void unsetUser() {
- this.user = null;
- }
-
- /** Returns true if field user is set (has been assigned a value) and false otherwise */
- public boolean isSetUser() {
- return this.user != null;
- }
-
- public void setUserIsSet(boolean value) {
- if (!value) {
- this.user = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SERVER_SESSION_ID:
- if (value == null) {
- unsetServerSessionId();
- } else {
- setServerSessionId((String)value);
- }
- break;
-
- case USER:
- if (value == null) {
- unsetUser();
- } else {
- setUser((UserInfo)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SERVER_SESSION_ID:
- return getServerSessionId();
-
- case USER:
- return getUser();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SERVER_SESSION_ID:
- return isSetServerSessionId();
- case USER:
- return isSetUser();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof publishUser_args)
- return this.equals((publishUser_args)that);
- return false;
- }
-
- public boolean equals(publishUser_args that) {
- if (that == null)
- return false;
-
- boolean this_present_serverSessionId = true && this.isSetServerSessionId();
- boolean that_present_serverSessionId = true && that.isSetServerSessionId();
- if (this_present_serverSessionId || that_present_serverSessionId) {
- if (!(this_present_serverSessionId && that_present_serverSessionId))
- return false;
- if (!this.serverSessionId.equals(that.serverSessionId))
- return false;
- }
-
- boolean this_present_user = true && this.isSetUser();
- boolean that_present_user = true && that.isSetUser();
- if (this_present_user || that_present_user) {
- if (!(this_present_user && that_present_user))
- return false;
- if (!this.user.equals(that.user))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(publishUser_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServerSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUser()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
- 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("publishUser_args(");
- boolean first = true;
-
- sb.append("serverSessionId:");
- if (this.serverSessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.serverSessionId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("user:");
- if (this.user == null) {
- sb.append("null");
- } else {
- sb.append(this.user);
- }
- 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 (user != null) {
- user.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 publishUser_argsStandardSchemeFactory implements SchemeFactory {
- public publishUser_argsStandardScheme getScheme() {
- return new publishUser_argsStandardScheme();
- }
- }
-
- private static class publishUser_argsStandardScheme extends StandardScheme<publishUser_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, publishUser_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SERVER_SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // USER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.user = new UserInfo();
- struct.user.read(iprot);
- struct.setUserIsSet(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, publishUser_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.serverSessionId != null) {
- oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.serverSessionId);
- oprot.writeFieldEnd();
- }
- if (struct.user != null) {
- oprot.writeFieldBegin(USER_FIELD_DESC);
- struct.user.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class publishUser_argsTupleSchemeFactory implements SchemeFactory {
- public publishUser_argsTupleScheme getScheme() {
- return new publishUser_argsTupleScheme();
- }
- }
-
- private static class publishUser_argsTupleScheme extends TupleScheme<publishUser_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, publishUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetServerSessionId()) {
- optionals.set(0);
- }
- if (struct.isSetUser()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetServerSessionId()) {
- oprot.writeString(struct.serverSessionId);
- }
- if (struct.isSetUser()) {
- struct.user.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, publishUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.user = new UserInfo();
- struct.user.read(iprot);
- struct.setUserIsSet(true);
- }
- }
- }
-
- }
-
- public static class publishUser_result implements org.apache.thrift.TBase<publishUser_result, publishUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<publishUser_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publishUser_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
- private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new publishUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new publishUser_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
- public AuthorizationException failure; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success"),
- FAILURE((short)1, "failure");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- case 1: // FAILURE
- return FAILURE;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishUser_result.class, metaDataMap);
- }
-
- public publishUser_result() {
- }
-
- public publishUser_result(
- boolean success,
- AuthorizationException failure)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- this.failure = failure;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public publishUser_result(publishUser_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- if (other.isSetFailure()) {
- this.failure = new AuthorizationException(other.failure);
- }
- }
-
- public publishUser_result deepCopy() {
- return new publishUser_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- this.failure = null;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public publishUser_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 AuthorizationException getFailure() {
- return this.failure;
- }
-
- public publishUser_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 void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Boolean)value);
- }
- break;
-
- case FAILURE:
- if (value == null) {
- unsetFailure();
- } else {
- setFailure((AuthorizationException)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return Boolean.valueOf(isSuccess());
-
- case FAILURE:
- return getFailure();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- case FAILURE:
- return isSetFailure();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof publishUser_result)
- return this.equals((publishUser_result)that);
- return false;
- }
-
- public boolean equals(publishUser_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
- boolean this_present_failure = true && this.isSetFailure();
- boolean that_present_failure = true && that.isSetFailure();
- if (this_present_failure || that_present_failure) {
- if (!(this_present_failure && that_present_failure))
- return false;
- if (!this.failure.equals(that.failure))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(publishUser_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFailure()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("publishUser_result(");
- boolean first = true;
-
- sb.append("success:");
- sb.append(this.success);
- first = false;
- if (!first) sb.append(", ");
- sb.append("failure:");
- if (this.failure == null) {
- sb.append("null");
- } else {
- sb.append(this.failure);
- }
- first = false;
- 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 publishUser_resultStandardSchemeFactory implements SchemeFactory {
- public publishUser_resultStandardScheme getScheme() {
- return new publishUser_resultStandardScheme();
- }
- }
-
- private static class publishUser_resultStandardScheme extends StandardScheme<publishUser_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, publishUser_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 1: // FAILURE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.failure = new AuthorizationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, publishUser_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(struct.success);
- oprot.writeFieldEnd();
- }
- if (struct.failure != null) {
- oprot.writeFieldBegin(FAILURE_FIELD_DESC);
- struct.failure.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class publishUser_resultTupleSchemeFactory implements SchemeFactory {
- public publishUser_resultTupleScheme getScheme() {
- return new publishUser_resultTupleScheme();
- }
- }
-
- private static class publishUser_resultTupleScheme extends TupleScheme<publishUser_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, publishUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- if (struct.isSetFailure()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetSuccess()) {
- oprot.writeBool(struct.success);
- }
- if (struct.isSetFailure()) {
- struct.failure.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, publishUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- if (incoming.get(1)) {
- struct.failure = new AuthorizationException();
- struct.failure.read(iprot);
- struct.setFailureIsSet(true);
- }
- }
- }
-
- }
-
- public static class registerSatellite_args implements org.apache.thrift.TBase<registerSatellite_args, registerSatellite_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_args");
-
- private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField MODULUS_FIELD_DESC = new org.apache.thrift.protocol.TField("modulus", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField EXPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("exponent", org.apache.thrift.protocol.TType.STRING, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new registerSatellite_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new registerSatellite_argsTupleSchemeFactory());
- }
-
- public String organizationId; // required
- public String address; // required
- public String modulus; // required
- public String exponent; // 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 {
- ORGANIZATION_ID((short)1, "organizationId"),
- ADDRESS((short)2, "address"),
- MODULUS((short)3, "modulus"),
- EXPONENT((short)4, "exponent");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ORGANIZATION_ID
- return ORGANIZATION_ID;
- case 2: // ADDRESS
- return ADDRESS;
- case 3: // MODULUS
- return MODULUS;
- case 4: // EXPONENT
- return EXPONENT;
- 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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.MODULUS, new org.apache.thrift.meta_data.FieldMetaData("modulus", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.EXPONENT, new org.apache.thrift.meta_data.FieldMetaData("exponent", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerSatellite_args.class, metaDataMap);
- }
-
- public registerSatellite_args() {
- }
-
- public registerSatellite_args(
- String organizationId,
- String address,
- String modulus,
- String exponent)
- {
- this();
- this.organizationId = organizationId;
- this.address = address;
- this.modulus = modulus;
- this.exponent = exponent;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public registerSatellite_args(registerSatellite_args other) {
- if (other.isSetOrganizationId()) {
- this.organizationId = other.organizationId;
- }
- if (other.isSetAddress()) {
- this.address = other.address;
- }
- if (other.isSetModulus()) {
- this.modulus = other.modulus;
- }
- if (other.isSetExponent()) {
- this.exponent = other.exponent;
- }
- }
-
- public registerSatellite_args deepCopy() {
- return new registerSatellite_args(this);
- }
-
- @Override
- public void clear() {
- this.organizationId = null;
- this.address = null;
- this.modulus = null;
- this.exponent = null;
- }
-
- public String getOrganizationId() {
- return this.organizationId;
- }
-
- public registerSatellite_args setOrganizationId(String organizationId) {
- this.organizationId = organizationId;
- return this;
- }
-
- public void unsetOrganizationId() {
- this.organizationId = null;
- }
-
- /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
- public boolean isSetOrganizationId() {
- return this.organizationId != null;
- }
-
- public void setOrganizationIdIsSet(boolean value) {
- if (!value) {
- this.organizationId = null;
- }
- }
-
- public String getAddress() {
- return this.address;
- }
-
- public registerSatellite_args setAddress(String address) {
- this.address = address;
- return this;
- }
-
- public void unsetAddress() {
- this.address = null;
- }
-
- /** Returns true if field address is set (has been assigned a value) and false otherwise */
- public boolean isSetAddress() {
- return this.address != null;
- }
-
- public void setAddressIsSet(boolean value) {
- if (!value) {
- this.address = null;
- }
- }
-
- public String getModulus() {
- return this.modulus;
- }
-
- public registerSatellite_args setModulus(String modulus) {
- this.modulus = modulus;
- return this;
- }
-
- public void unsetModulus() {
- this.modulus = null;
- }
-
- /** Returns true if field modulus is set (has been assigned a value) and false otherwise */
- public boolean isSetModulus() {
- return this.modulus != null;
- }
-
- public void setModulusIsSet(boolean value) {
- if (!value) {
- this.modulus = null;
- }
- }
-
- public String getExponent() {
- return this.exponent;
- }
-
- public registerSatellite_args setExponent(String exponent) {
- this.exponent = exponent;
- return this;
- }
-
- public void unsetExponent() {
- this.exponent = null;
- }
-
- /** Returns true if field exponent is set (has been assigned a value) and false otherwise */
- public boolean isSetExponent() {
- return this.exponent != null;
- }
-
- public void setExponentIsSet(boolean value) {
- if (!value) {
- this.exponent = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ORGANIZATION_ID:
- if (value == null) {
- unsetOrganizationId();
- } else {
- setOrganizationId((String)value);
- }
- break;
-
- case ADDRESS:
- if (value == null) {
- unsetAddress();
- } else {
- setAddress((String)value);
- }
- break;
-
- case MODULUS:
- if (value == null) {
- unsetModulus();
- } else {
- setModulus((String)value);
- }
- break;
-
- case EXPONENT:
- if (value == null) {
- unsetExponent();
- } else {
- setExponent((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ORGANIZATION_ID:
- return getOrganizationId();
-
- case ADDRESS:
- return getAddress();
-
- case MODULUS:
- return getModulus();
-
- case EXPONENT:
- return getExponent();
-
- }
- 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 ORGANIZATION_ID:
- return isSetOrganizationId();
- case ADDRESS:
- return isSetAddress();
- case MODULUS:
- return isSetModulus();
- case EXPONENT:
- return isSetExponent();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof registerSatellite_args)
- return this.equals((registerSatellite_args)that);
- return false;
- }
-
- public boolean equals(registerSatellite_args that) {
- if (that == null)
- return false;
-
- boolean this_present_organizationId = true && this.isSetOrganizationId();
- boolean that_present_organizationId = true && that.isSetOrganizationId();
- if (this_present_organizationId || that_present_organizationId) {
- if (!(this_present_organizationId && that_present_organizationId))
- return false;
- if (!this.organizationId.equals(that.organizationId))
- return false;
- }
-
- boolean this_present_address = true && this.isSetAddress();
- boolean that_present_address = true && that.isSetAddress();
- if (this_present_address || that_present_address) {
- if (!(this_present_address && that_present_address))
- return false;
- if (!this.address.equals(that.address))
- return false;
- }
-
- boolean this_present_modulus = true && this.isSetModulus();
- boolean that_present_modulus = true && that.isSetModulus();
- if (this_present_modulus || that_present_modulus) {
- if (!(this_present_modulus && that_present_modulus))
- return false;
- if (!this.modulus.equals(that.modulus))
- return false;
- }
-
- boolean this_present_exponent = true && this.isSetExponent();
- boolean that_present_exponent = true && that.isSetExponent();
- if (this_present_exponent || that_present_exponent) {
- if (!(this_present_exponent && that_present_exponent))
- return false;
- if (!this.exponent.equals(that.exponent))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(registerSatellite_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOrganizationId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAddress()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetModulus()).compareTo(other.isSetModulus());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetModulus()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modulus, other.modulus);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetExponent()).compareTo(other.isSetExponent());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExponent()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exponent, other.exponent);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("registerSatellite_args(");
- boolean first = true;
-
- sb.append("organizationId:");
- if (this.organizationId == null) {
- sb.append("null");
- } else {
- sb.append(this.organizationId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("address:");
- if (this.address == null) {
- sb.append("null");
- } else {
- sb.append(this.address);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("modulus:");
- if (this.modulus == null) {
- sb.append("null");
- } else {
- sb.append(this.modulus);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("exponent:");
- if (this.exponent == null) {
- sb.append("null");
- } else {
- sb.append(this.exponent);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class registerSatellite_argsStandardSchemeFactory implements SchemeFactory {
- public registerSatellite_argsStandardScheme getScheme() {
- return new registerSatellite_argsStandardScheme();
- }
- }
-
- private static class registerSatellite_argsStandardScheme extends StandardScheme<registerSatellite_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ORGANIZATION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ADDRESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.address = iprot.readString();
- struct.setAddressIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // MODULUS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.modulus = iprot.readString();
- struct.setModulusIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // EXPONENT
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.exponent = iprot.readString();
- struct.setExponentIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, registerSatellite_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.organizationId != null) {
- oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
- oprot.writeString(struct.organizationId);
- oprot.writeFieldEnd();
- }
- if (struct.address != null) {
- oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
- oprot.writeString(struct.address);
- oprot.writeFieldEnd();
- }
- if (struct.modulus != null) {
- oprot.writeFieldBegin(MODULUS_FIELD_DESC);
- oprot.writeString(struct.modulus);
- oprot.writeFieldEnd();
- }
- if (struct.exponent != null) {
- oprot.writeFieldBegin(EXPONENT_FIELD_DESC);
- oprot.writeString(struct.exponent);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class registerSatellite_argsTupleSchemeFactory implements SchemeFactory {
- public registerSatellite_argsTupleScheme getScheme() {
- return new registerSatellite_argsTupleScheme();
- }
- }
-
- private static class registerSatellite_argsTupleScheme extends TupleScheme<registerSatellite_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetOrganizationId()) {
- optionals.set(0);
- }
- if (struct.isSetAddress()) {
- optionals.set(1);
- }
- if (struct.isSetModulus()) {
- optionals.set(2);
- }
- if (struct.isSetExponent()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetOrganizationId()) {
- oprot.writeString(struct.organizationId);
- }
- if (struct.isSetAddress()) {
- oprot.writeString(struct.address);
- }
- if (struct.isSetModulus()) {
- oprot.writeString(struct.modulus);
- }
- if (struct.isSetExponent()) {
- oprot.writeString(struct.exponent);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.address = iprot.readString();
- struct.setAddressIsSet(true);
- }
- if (incoming.get(2)) {
- struct.modulus = iprot.readString();
- struct.setModulusIsSet(true);
- }
- if (incoming.get(3)) {
- struct.exponent = iprot.readString();
- struct.setExponentIsSet(true);
- }
- }
- }
-
- }
-
- public static class registerSatellite_result implements org.apache.thrift.TBase<registerSatellite_result, registerSatellite_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new registerSatellite_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new registerSatellite_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerSatellite_result.class, metaDataMap);
- }
-
- public registerSatellite_result() {
- }
-
- public registerSatellite_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public registerSatellite_result(registerSatellite_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public registerSatellite_result deepCopy() {
- return new registerSatellite_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public registerSatellite_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 registerSatellite_result)
- return this.equals((registerSatellite_result)that);
- return false;
- }
-
- public boolean equals(registerSatellite_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(registerSatellite_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("registerSatellite_result(");
- boolean first = true;
-
- sb.append("success:");
- sb.append(this.success);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class registerSatellite_resultStandardSchemeFactory implements SchemeFactory {
- public registerSatellite_resultStandardScheme getScheme() {
- return new registerSatellite_resultStandardScheme();
- }
- }
-
- private static class registerSatellite_resultStandardScheme extends StandardScheme<registerSatellite_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.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, registerSatellite_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 registerSatellite_resultTupleSchemeFactory implements SchemeFactory {
- public registerSatellite_resultTupleScheme getScheme() {
- return new registerSatellite_resultTupleScheme();
- }
- }
-
- private static class registerSatellite_resultTupleScheme extends TupleScheme<registerSatellite_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeBool(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class updateSatelliteAddress_args implements org.apache.thrift.TBase<updateSatelliteAddress_args, updateSatelliteAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatelliteAddress_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatelliteAddress_args");
-
- private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateSatelliteAddress_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateSatelliteAddress_argsTupleSchemeFactory());
- }
-
- public String serverSessionId; // required
- public String address; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SERVER_SESSION_ID((short)1, "serverSessionId"),
- ADDRESS((short)2, "address");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SERVER_SESSION_ID
- return SERVER_SESSION_ID;
- case 2: // ADDRESS
- return ADDRESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID")));
- tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", 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(updateSatelliteAddress_args.class, metaDataMap);
- }
-
- public updateSatelliteAddress_args() {
- }
-
- public updateSatelliteAddress_args(
- String serverSessionId,
- String address)
- {
- this();
- this.serverSessionId = serverSessionId;
- this.address = address;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public updateSatelliteAddress_args(updateSatelliteAddress_args other) {
- if (other.isSetServerSessionId()) {
- this.serverSessionId = other.serverSessionId;
- }
- if (other.isSetAddress()) {
- this.address = other.address;
- }
- }
-
- public updateSatelliteAddress_args deepCopy() {
- return new updateSatelliteAddress_args(this);
- }
-
- @Override
- public void clear() {
- this.serverSessionId = null;
- this.address = null;
- }
-
- public String getServerSessionId() {
- return this.serverSessionId;
- }
-
- public updateSatelliteAddress_args setServerSessionId(String serverSessionId) {
- this.serverSessionId = serverSessionId;
- return this;
- }
-
- public void unsetServerSessionId() {
- this.serverSessionId = null;
- }
-
- /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */
- public boolean isSetServerSessionId() {
- return this.serverSessionId != null;
- }
-
- public void setServerSessionIdIsSet(boolean value) {
- if (!value) {
- this.serverSessionId = null;
- }
- }
-
- public String getAddress() {
- return this.address;
- }
-
- public updateSatelliteAddress_args setAddress(String address) {
- this.address = address;
- return this;
- }
-
- public void unsetAddress() {
- this.address = null;
- }
-
- /** Returns true if field address is set (has been assigned a value) and false otherwise */
- public boolean isSetAddress() {
- return this.address != null;
- }
-
- public void setAddressIsSet(boolean value) {
- if (!value) {
- this.address = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SERVER_SESSION_ID:
- if (value == null) {
- unsetServerSessionId();
- } else {
- setServerSessionId((String)value);
- }
- break;
-
- case ADDRESS:
- if (value == null) {
- unsetAddress();
- } else {
- setAddress((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SERVER_SESSION_ID:
- return getServerSessionId();
-
- case ADDRESS:
- return getAddress();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SERVER_SESSION_ID:
- return isSetServerSessionId();
- case ADDRESS:
- return isSetAddress();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof updateSatelliteAddress_args)
- return this.equals((updateSatelliteAddress_args)that);
- return false;
- }
-
- public boolean equals(updateSatelliteAddress_args that) {
- if (that == null)
- return false;
-
- boolean this_present_serverSessionId = true && this.isSetServerSessionId();
- boolean that_present_serverSessionId = true && that.isSetServerSessionId();
- if (this_present_serverSessionId || that_present_serverSessionId) {
- if (!(this_present_serverSessionId && that_present_serverSessionId))
- return false;
- if (!this.serverSessionId.equals(that.serverSessionId))
- return false;
- }
-
- boolean this_present_address = true && this.isSetAddress();
- boolean that_present_address = true && that.isSetAddress();
- if (this_present_address || that_present_address) {
- if (!(this_present_address && that_present_address))
- return false;
- if (!this.address.equals(that.address))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(updateSatelliteAddress_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServerSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAddress()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address);
- 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("updateSatelliteAddress_args(");
- boolean first = true;
-
- sb.append("serverSessionId:");
- if (this.serverSessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.serverSessionId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("address:");
- if (this.address == null) {
- sb.append("null");
- } else {
- sb.append(this.address);
- }
- 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 updateSatelliteAddress_argsStandardSchemeFactory implements SchemeFactory {
- public updateSatelliteAddress_argsStandardScheme getScheme() {
- return new updateSatelliteAddress_argsStandardScheme();
- }
- }
-
- private static class updateSatelliteAddress_argsStandardScheme extends StandardScheme<updateSatelliteAddress_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatelliteAddress_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SERVER_SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ADDRESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.address = iprot.readString();
- struct.setAddressIsSet(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, updateSatelliteAddress_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.serverSessionId != null) {
- oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.serverSessionId);
- oprot.writeFieldEnd();
- }
- if (struct.address != null) {
- oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
- oprot.writeString(struct.address);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class updateSatelliteAddress_argsTupleSchemeFactory implements SchemeFactory {
- public updateSatelliteAddress_argsTupleScheme getScheme() {
- return new updateSatelliteAddress_argsTupleScheme();
- }
- }
-
- private static class updateSatelliteAddress_argsTupleScheme extends TupleScheme<updateSatelliteAddress_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, updateSatelliteAddress_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetServerSessionId()) {
- optionals.set(0);
- }
- if (struct.isSetAddress()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetServerSessionId()) {
- oprot.writeString(struct.serverSessionId);
- }
- if (struct.isSetAddress()) {
- oprot.writeString(struct.address);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, updateSatelliteAddress_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.serverSessionId = iprot.readString();
- struct.setServerSessionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.address = iprot.readString();
- struct.setAddressIsSet(true);
- }
- }
- }
-
- }
-
- public static class updateSatelliteAddress_result implements org.apache.thrift.TBase<updateSatelliteAddress_result, updateSatelliteAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatelliteAddress_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatelliteAddress_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateSatelliteAddress_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateSatelliteAddress_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSatelliteAddress_result.class, metaDataMap);
- }
-
- public updateSatelliteAddress_result() {
- }
-
- public updateSatelliteAddress_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public updateSatelliteAddress_result(updateSatelliteAddress_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public updateSatelliteAddress_result deepCopy() {
- return new updateSatelliteAddress_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public updateSatelliteAddress_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 updateSatelliteAddress_result)
- return this.equals((updateSatelliteAddress_result)that);
- return false;
- }
-
- public boolean equals(updateSatelliteAddress_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(updateSatelliteAddress_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("updateSatelliteAddress_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 updateSatelliteAddress_resultStandardSchemeFactory implements SchemeFactory {
- public updateSatelliteAddress_resultStandardScheme getScheme() {
- return new updateSatelliteAddress_resultStandardScheme();
- }
- }
-
- private static class updateSatelliteAddress_resultStandardScheme extends StandardScheme<updateSatelliteAddress_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatelliteAddress_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, updateSatelliteAddress_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 updateSatelliteAddress_resultTupleSchemeFactory implements SchemeFactory {
- public updateSatelliteAddress_resultTupleScheme getScheme() {
- return new updateSatelliteAddress_resultTupleScheme();
- }
- }
-
- private static class updateSatelliteAddress_resultTupleScheme extends TupleScheme<updateSatelliteAddress_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, updateSatelliteAddress_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, updateSatelliteAddress_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class addSession_args implements org.apache.thrift.TBase<addSession_args, addSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSession_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSession_args");
-
- private static final org.apache.thrift.protocol.TField LOCAL_PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("localPassword", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField USER_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("userInfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new addSession_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new addSession_argsTupleSchemeFactory());
- }
-
- public String localPassword; // required
- public UserInfo userInfo; // 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 {
- LOCAL_PASSWORD((short)1, "localPassword"),
- USER_INFO((short)2, "userInfo");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // LOCAL_PASSWORD
- return LOCAL_PASSWORD;
- case 2: // USER_INFO
- return USER_INFO;
- 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.LOCAL_PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("localPassword", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_INFO, new org.apache.thrift.meta_data.FieldMetaData("userInfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSession_args.class, metaDataMap);
- }
-
- public addSession_args() {
- }
-
- public addSession_args(
- String localPassword,
- UserInfo userInfo)
- {
- this();
- this.localPassword = localPassword;
- this.userInfo = userInfo;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public addSession_args(addSession_args other) {
- if (other.isSetLocalPassword()) {
- this.localPassword = other.localPassword;
- }
- if (other.isSetUserInfo()) {
- this.userInfo = new UserInfo(other.userInfo);
- }
- }
-
- public addSession_args deepCopy() {
- return new addSession_args(this);
- }
-
- @Override
- public void clear() {
- this.localPassword = null;
- this.userInfo = null;
- }
-
- public String getLocalPassword() {
- return this.localPassword;
- }
-
- public addSession_args setLocalPassword(String localPassword) {
- this.localPassword = localPassword;
- return this;
- }
-
- public void unsetLocalPassword() {
- this.localPassword = null;
- }
-
- /** Returns true if field localPassword is set (has been assigned a value) and false otherwise */
- public boolean isSetLocalPassword() {
- return this.localPassword != null;
- }
-
- public void setLocalPasswordIsSet(boolean value) {
- if (!value) {
- this.localPassword = null;
- }
- }
-
- public UserInfo getUserInfo() {
- return this.userInfo;
- }
-
- public addSession_args setUserInfo(UserInfo userInfo) {
- this.userInfo = userInfo;
- return this;
- }
-
- public void unsetUserInfo() {
- this.userInfo = null;
- }
-
- /** Returns true if field userInfo is set (has been assigned a value) and false otherwise */
- public boolean isSetUserInfo() {
- return this.userInfo != null;
- }
-
- public void setUserInfoIsSet(boolean value) {
- if (!value) {
- this.userInfo = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LOCAL_PASSWORD:
- if (value == null) {
- unsetLocalPassword();
- } else {
- setLocalPassword((String)value);
- }
- break;
-
- case USER_INFO:
- if (value == null) {
- unsetUserInfo();
- } else {
- setUserInfo((UserInfo)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LOCAL_PASSWORD:
- return getLocalPassword();
-
- case USER_INFO:
- return getUserInfo();
-
- }
- 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 LOCAL_PASSWORD:
- return isSetLocalPassword();
- case USER_INFO:
- return isSetUserInfo();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof addSession_args)
- return this.equals((addSession_args)that);
- return false;
- }
-
- public boolean equals(addSession_args that) {
- if (that == null)
- return false;
-
- boolean this_present_localPassword = true && this.isSetLocalPassword();
- boolean that_present_localPassword = true && that.isSetLocalPassword();
- if (this_present_localPassword || that_present_localPassword) {
- if (!(this_present_localPassword && that_present_localPassword))
- return false;
- if (!this.localPassword.equals(that.localPassword))
- return false;
- }
-
- boolean this_present_userInfo = true && this.isSetUserInfo();
- boolean that_present_userInfo = true && that.isSetUserInfo();
- if (this_present_userInfo || that_present_userInfo) {
- if (!(this_present_userInfo && that_present_userInfo))
- return false;
- if (!this.userInfo.equals(that.userInfo))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(addSession_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetLocalPassword()).compareTo(other.isSetLocalPassword());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLocalPassword()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.localPassword, other.localPassword);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserInfo()).compareTo(other.isSetUserInfo());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserInfo()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userInfo, other.userInfo);
- 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("addSession_args(");
- boolean first = true;
-
- sb.append("localPassword:");
- if (this.localPassword == null) {
- sb.append("null");
- } else {
- sb.append(this.localPassword);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userInfo:");
- if (this.userInfo == null) {
- sb.append("null");
- } else {
- sb.append(this.userInfo);
- }
- 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 (userInfo != null) {
- userInfo.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 addSession_argsStandardSchemeFactory implements SchemeFactory {
- public addSession_argsStandardScheme getScheme() {
- return new addSession_argsStandardScheme();
- }
- }
-
- private static class addSession_argsStandardScheme extends StandardScheme<addSession_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, addSession_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: // LOCAL_PASSWORD
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.localPassword = iprot.readString();
- struct.setLocalPasswordIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // USER_INFO
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.userInfo = new UserInfo();
- struct.userInfo.read(iprot);
- struct.setUserInfoIsSet(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, addSession_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.localPassword != null) {
- oprot.writeFieldBegin(LOCAL_PASSWORD_FIELD_DESC);
- oprot.writeString(struct.localPassword);
- oprot.writeFieldEnd();
- }
- if (struct.userInfo != null) {
- oprot.writeFieldBegin(USER_INFO_FIELD_DESC);
- struct.userInfo.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class addSession_argsTupleSchemeFactory implements SchemeFactory {
- public addSession_argsTupleScheme getScheme() {
- return new addSession_argsTupleScheme();
- }
- }
-
- private static class addSession_argsTupleScheme extends TupleScheme<addSession_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, addSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetLocalPassword()) {
- optionals.set(0);
- }
- if (struct.isSetUserInfo()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetLocalPassword()) {
- oprot.writeString(struct.localPassword);
- }
- if (struct.isSetUserInfo()) {
- struct.userInfo.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, addSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.localPassword = iprot.readString();
- struct.setLocalPasswordIsSet(true);
- }
- if (incoming.get(1)) {
- struct.userInfo = new UserInfo();
- struct.userInfo.read(iprot);
- struct.setUserInfoIsSet(true);
- }
- }
- }
-
- }
-
- public static class addSession_result implements org.apache.thrift.TBase<addSession_result, addSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSession_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSession_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new addSession_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new addSession_resultTupleSchemeFactory());
- }
-
- public ServerSessionData success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ServerSessionData.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSession_result.class, metaDataMap);
- }
-
- public addSession_result() {
- }
-
- public addSession_result(
- ServerSessionData success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public addSession_result(addSession_result other) {
- if (other.isSetSuccess()) {
- this.success = new ServerSessionData(other.success);
- }
- }
-
- public addSession_result deepCopy() {
- return new addSession_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public ServerSessionData getSuccess() {
- return this.success;
- }
-
- public addSession_result setSuccess(ServerSessionData success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((ServerSessionData)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof addSession_result)
- return this.equals((addSession_result)that);
- return false;
- }
-
- public boolean equals(addSession_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(addSession_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("addSession_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 addSession_resultStandardSchemeFactory implements SchemeFactory {
- public addSession_resultStandardScheme getScheme() {
- return new addSession_resultStandardScheme();
- }
- }
-
- private static class addSession_resultStandardScheme extends StandardScheme<addSession_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, addSession_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.success = new ServerSessionData();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- 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, addSession_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class addSession_resultTupleSchemeFactory implements SchemeFactory {
- public addSession_resultTupleScheme getScheme() {
- return new addSession_resultTupleScheme();
- }
- }
-
- private static class addSession_resultTupleScheme extends TupleScheme<addSession_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, addSession_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()) {
- struct.success.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, addSession_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = new ServerSessionData();
- struct.success.read(iprot);
- struct.setSuccessIsSet(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
deleted file mode 100644
index e163c4f..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class InvalidTokenException extends TException implements org.apache.thrift.TBase<InvalidTokenException, InvalidTokenException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidTokenException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidTokenException");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new InvalidTokenExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new InvalidTokenExceptionTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidTokenException.class, metaDataMap);
- }
-
- public InvalidTokenException() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public InvalidTokenException(InvalidTokenException other) {
- }
-
- public InvalidTokenException deepCopy() {
- return new InvalidTokenException(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof InvalidTokenException)
- return this.equals((InvalidTokenException)that);
- return false;
- }
-
- public boolean equals(InvalidTokenException that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(InvalidTokenException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("InvalidTokenException(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class InvalidTokenExceptionStandardSchemeFactory implements SchemeFactory {
- public InvalidTokenExceptionStandardScheme getScheme() {
- return new InvalidTokenExceptionStandardScheme();
- }
- }
-
- private static class InvalidTokenExceptionStandardScheme extends StandardScheme<InvalidTokenException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidTokenException struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidTokenException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class InvalidTokenExceptionTupleSchemeFactory implements SchemeFactory {
- public InvalidTokenExceptionTupleScheme getScheme() {
- return new InvalidTokenExceptionTupleScheme();
- }
- }
-
- private static class InvalidTokenExceptionTupleScheme extends TupleScheme<InvalidTokenException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, InvalidTokenException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, InvalidTokenException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java
deleted file mode 100644
index 2177c37..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java
+++ /dev/null
@@ -1,737 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OrganizationData implements org.apache.thrift.TBase<OrganizationData, OrganizationData._Fields>, java.io.Serializable, Cloneable, Comparable<OrganizationData> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OrganizationData");
-
- private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField ECP_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("ecpUrl", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField SUFFIX_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("suffixList", org.apache.thrift.protocol.TType.LIST, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new OrganizationDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new OrganizationDataTupleSchemeFactory());
- }
-
- public String organizationId; // required
- public String displayName; // required
- public String ecpUrl; // required
- public List<String> suffixList; // 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 {
- ORGANIZATION_ID((short)1, "organizationId"),
- DISPLAY_NAME((short)2, "displayName"),
- ECP_URL((short)3, "ecpUrl"),
- SUFFIX_LIST((short)4, "suffixList");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ORGANIZATION_ID
- return ORGANIZATION_ID;
- case 2: // DISPLAY_NAME
- return DISPLAY_NAME;
- case 3: // ECP_URL
- return ECP_URL;
- case 4: // SUFFIX_LIST
- return SUFFIX_LIST;
- 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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ECP_URL, new org.apache.thrift.meta_data.FieldMetaData("ecpUrl", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SUFFIX_LIST, new org.apache.thrift.meta_data.FieldMetaData("suffixList", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OrganizationData.class, metaDataMap);
- }
-
- public OrganizationData() {
- }
-
- public OrganizationData(
- String organizationId,
- String displayName,
- String ecpUrl,
- List<String> suffixList)
- {
- this();
- this.organizationId = organizationId;
- this.displayName = displayName;
- this.ecpUrl = ecpUrl;
- this.suffixList = suffixList;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public OrganizationData(OrganizationData other) {
- if (other.isSetOrganizationId()) {
- this.organizationId = other.organizationId;
- }
- if (other.isSetDisplayName()) {
- this.displayName = other.displayName;
- }
- if (other.isSetEcpUrl()) {
- this.ecpUrl = other.ecpUrl;
- }
- if (other.isSetSuffixList()) {
- List<String> __this__suffixList = new ArrayList<String>(other.suffixList);
- this.suffixList = __this__suffixList;
- }
- }
-
- public OrganizationData deepCopy() {
- return new OrganizationData(this);
- }
-
- @Override
- public void clear() {
- this.organizationId = null;
- this.displayName = null;
- this.ecpUrl = null;
- this.suffixList = null;
- }
-
- public String getOrganizationId() {
- return this.organizationId;
- }
-
- public OrganizationData setOrganizationId(String organizationId) {
- this.organizationId = organizationId;
- return this;
- }
-
- public void unsetOrganizationId() {
- this.organizationId = null;
- }
-
- /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
- public boolean isSetOrganizationId() {
- return this.organizationId != null;
- }
-
- public void setOrganizationIdIsSet(boolean value) {
- if (!value) {
- this.organizationId = null;
- }
- }
-
- public String getDisplayName() {
- return this.displayName;
- }
-
- public OrganizationData setDisplayName(String displayName) {
- this.displayName = displayName;
- return this;
- }
-
- public void unsetDisplayName() {
- this.displayName = null;
- }
-
- /** Returns true if field displayName is set (has been assigned a value) and false otherwise */
- public boolean isSetDisplayName() {
- return this.displayName != null;
- }
-
- public void setDisplayNameIsSet(boolean value) {
- if (!value) {
- this.displayName = null;
- }
- }
-
- public String getEcpUrl() {
- return this.ecpUrl;
- }
-
- public OrganizationData setEcpUrl(String ecpUrl) {
- this.ecpUrl = ecpUrl;
- return this;
- }
-
- public void unsetEcpUrl() {
- this.ecpUrl = null;
- }
-
- /** Returns true if field ecpUrl is set (has been assigned a value) and false otherwise */
- public boolean isSetEcpUrl() {
- return this.ecpUrl != null;
- }
-
- public void setEcpUrlIsSet(boolean value) {
- if (!value) {
- this.ecpUrl = null;
- }
- }
-
- public int getSuffixListSize() {
- return (this.suffixList == null) ? 0 : this.suffixList.size();
- }
-
- public java.util.Iterator<String> getSuffixListIterator() {
- return (this.suffixList == null) ? null : this.suffixList.iterator();
- }
-
- public void addToSuffixList(String elem) {
- if (this.suffixList == null) {
- this.suffixList = new ArrayList<String>();
- }
- this.suffixList.add(elem);
- }
-
- public List<String> getSuffixList() {
- return this.suffixList;
- }
-
- public OrganizationData setSuffixList(List<String> suffixList) {
- this.suffixList = suffixList;
- return this;
- }
-
- public void unsetSuffixList() {
- this.suffixList = null;
- }
-
- /** Returns true if field suffixList is set (has been assigned a value) and false otherwise */
- public boolean isSetSuffixList() {
- return this.suffixList != null;
- }
-
- public void setSuffixListIsSet(boolean value) {
- if (!value) {
- this.suffixList = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ORGANIZATION_ID:
- if (value == null) {
- unsetOrganizationId();
- } else {
- setOrganizationId((String)value);
- }
- break;
-
- case DISPLAY_NAME:
- if (value == null) {
- unsetDisplayName();
- } else {
- setDisplayName((String)value);
- }
- break;
-
- case ECP_URL:
- if (value == null) {
- unsetEcpUrl();
- } else {
- setEcpUrl((String)value);
- }
- break;
-
- case SUFFIX_LIST:
- if (value == null) {
- unsetSuffixList();
- } else {
- setSuffixList((List<String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ORGANIZATION_ID:
- return getOrganizationId();
-
- case DISPLAY_NAME:
- return getDisplayName();
-
- case ECP_URL:
- return getEcpUrl();
-
- case SUFFIX_LIST:
- return getSuffixList();
-
- }
- 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 ORGANIZATION_ID:
- return isSetOrganizationId();
- case DISPLAY_NAME:
- return isSetDisplayName();
- case ECP_URL:
- return isSetEcpUrl();
- case SUFFIX_LIST:
- return isSetSuffixList();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof OrganizationData)
- return this.equals((OrganizationData)that);
- return false;
- }
-
- public boolean equals(OrganizationData that) {
- if (that == null)
- return false;
-
- boolean this_present_organizationId = true && this.isSetOrganizationId();
- boolean that_present_organizationId = true && that.isSetOrganizationId();
- if (this_present_organizationId || that_present_organizationId) {
- if (!(this_present_organizationId && that_present_organizationId))
- return false;
- if (!this.organizationId.equals(that.organizationId))
- return false;
- }
-
- boolean this_present_displayName = true && this.isSetDisplayName();
- boolean that_present_displayName = true && that.isSetDisplayName();
- if (this_present_displayName || that_present_displayName) {
- if (!(this_present_displayName && that_present_displayName))
- return false;
- if (!this.displayName.equals(that.displayName))
- return false;
- }
-
- boolean this_present_ecpUrl = true && this.isSetEcpUrl();
- boolean that_present_ecpUrl = true && that.isSetEcpUrl();
- if (this_present_ecpUrl || that_present_ecpUrl) {
- if (!(this_present_ecpUrl && that_present_ecpUrl))
- return false;
- if (!this.ecpUrl.equals(that.ecpUrl))
- return false;
- }
-
- boolean this_present_suffixList = true && this.isSetSuffixList();
- boolean that_present_suffixList = true && that.isSetSuffixList();
- if (this_present_suffixList || that_present_suffixList) {
- if (!(this_present_suffixList && that_present_suffixList))
- return false;
- if (!this.suffixList.equals(that.suffixList))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(OrganizationData other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOrganizationId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDisplayName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetEcpUrl()).compareTo(other.isSetEcpUrl());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetEcpUrl()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ecpUrl, other.ecpUrl);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetSuffixList()).compareTo(other.isSetSuffixList());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuffixList()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.suffixList, other.suffixList);
- 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("OrganizationData(");
- boolean first = true;
-
- sb.append("organizationId:");
- if (this.organizationId == null) {
- sb.append("null");
- } else {
- sb.append(this.organizationId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("displayName:");
- if (this.displayName == null) {
- sb.append("null");
- } else {
- sb.append(this.displayName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("ecpUrl:");
- if (this.ecpUrl == null) {
- sb.append("null");
- } else {
- sb.append(this.ecpUrl);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("suffixList:");
- if (this.suffixList == null) {
- sb.append("null");
- } else {
- sb.append(this.suffixList);
- }
- 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 OrganizationDataStandardSchemeFactory implements SchemeFactory {
- public OrganizationDataStandardScheme getScheme() {
- return new OrganizationDataStandardScheme();
- }
- }
-
- private static class OrganizationDataStandardScheme extends StandardScheme<OrganizationData> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, OrganizationData 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: // ORGANIZATION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DISPLAY_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.displayName = iprot.readString();
- struct.setDisplayNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // ECP_URL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.ecpUrl = iprot.readString();
- struct.setEcpUrlIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // SUFFIX_LIST
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.suffixList = new ArrayList<String>(_list0.size);
- for (int _i1 = 0; _i1 < _list0.size; ++_i1)
- {
- String _elem2;
- _elem2 = iprot.readString();
- struct.suffixList.add(_elem2);
- }
- iprot.readListEnd();
- }
- struct.setSuffixListIsSet(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, OrganizationData struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.organizationId != null) {
- oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
- oprot.writeString(struct.organizationId);
- oprot.writeFieldEnd();
- }
- if (struct.displayName != null) {
- oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC);
- oprot.writeString(struct.displayName);
- oprot.writeFieldEnd();
- }
- if (struct.ecpUrl != null) {
- oprot.writeFieldBegin(ECP_URL_FIELD_DESC);
- oprot.writeString(struct.ecpUrl);
- oprot.writeFieldEnd();
- }
- if (struct.suffixList != null) {
- oprot.writeFieldBegin(SUFFIX_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.suffixList.size()));
- for (String _iter3 : struct.suffixList)
- {
- oprot.writeString(_iter3);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class OrganizationDataTupleSchemeFactory implements SchemeFactory {
- public OrganizationDataTupleScheme getScheme() {
- return new OrganizationDataTupleScheme();
- }
- }
-
- private static class OrganizationDataTupleScheme extends TupleScheme<OrganizationData> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, OrganizationData struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetOrganizationId()) {
- optionals.set(0);
- }
- if (struct.isSetDisplayName()) {
- optionals.set(1);
- }
- if (struct.isSetEcpUrl()) {
- optionals.set(2);
- }
- if (struct.isSetSuffixList()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetOrganizationId()) {
- oprot.writeString(struct.organizationId);
- }
- if (struct.isSetDisplayName()) {
- oprot.writeString(struct.displayName);
- }
- if (struct.isSetEcpUrl()) {
- oprot.writeString(struct.ecpUrl);
- }
- if (struct.isSetSuffixList()) {
- {
- oprot.writeI32(struct.suffixList.size());
- for (String _iter4 : struct.suffixList)
- {
- oprot.writeString(_iter4);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, OrganizationData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.displayName = iprot.readString();
- struct.setDisplayNameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.ecpUrl = iprot.readString();
- struct.setEcpUrlIsSet(true);
- }
- if (incoming.get(3)) {
- {
- org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.suffixList = new ArrayList<String>(_list5.size);
- for (int _i6 = 0; _i6 < _list5.size; ++_i6)
- {
- String _elem7;
- _elem7 = iprot.readString();
- struct.suffixList.add(_elem7);
- }
- }
- struct.setSuffixListIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java
deleted file mode 100644
index 8f8893a..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java
+++ /dev/null
@@ -1,388 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionData, ServerSessionData._Fields>, java.io.Serializable, Cloneable, Comparable<ServerSessionData> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ServerSessionData");
-
- private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ServerSessionDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ServerSessionDataTupleSchemeFactory());
- }
-
- public String sessionId; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SESSION_ID((short)1, "sessionId");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SESSION_ID
- return SESSION_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServerSessionData.class, metaDataMap);
- }
-
- public ServerSessionData() {
- }
-
- public ServerSessionData(
- String sessionId)
- {
- this();
- this.sessionId = sessionId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ServerSessionData(ServerSessionData other) {
- if (other.isSetSessionId()) {
- this.sessionId = other.sessionId;
- }
- }
-
- public ServerSessionData deepCopy() {
- return new ServerSessionData(this);
- }
-
- @Override
- public void clear() {
- this.sessionId = null;
- }
-
- public String getSessionId() {
- return this.sessionId;
- }
-
- public ServerSessionData setSessionId(String sessionId) {
- this.sessionId = sessionId;
- return this;
- }
-
- public void unsetSessionId() {
- this.sessionId = null;
- }
-
- /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
- public boolean isSetSessionId() {
- return this.sessionId != null;
- }
-
- public void setSessionIdIsSet(boolean value) {
- if (!value) {
- this.sessionId = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SESSION_ID:
- if (value == null) {
- unsetSessionId();
- } else {
- setSessionId((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SESSION_ID:
- return getSessionId();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SESSION_ID:
- return isSetSessionId();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ServerSessionData)
- return this.equals((ServerSessionData)that);
- return false;
- }
-
- public boolean equals(ServerSessionData that) {
- if (that == null)
- return false;
-
- boolean this_present_sessionId = true && this.isSetSessionId();
- boolean that_present_sessionId = true && that.isSetSessionId();
- if (this_present_sessionId || that_present_sessionId) {
- if (!(this_present_sessionId && that_present_sessionId))
- return false;
- if (!this.sessionId.equals(that.sessionId))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(ServerSessionData other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ServerSessionData(");
- boolean first = true;
-
- sb.append("sessionId:");
- if (this.sessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.sessionId);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class ServerSessionDataStandardSchemeFactory implements SchemeFactory {
- public ServerSessionDataStandardScheme getScheme() {
- return new ServerSessionDataStandardScheme();
- }
- }
-
- private static class ServerSessionDataStandardScheme extends StandardScheme<ServerSessionData> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ServerSessionData struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ServerSessionData struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.sessionId != null) {
- oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.sessionId);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ServerSessionDataTupleSchemeFactory implements SchemeFactory {
- public ServerSessionDataTupleScheme getScheme() {
- return new ServerSessionDataTupleScheme();
- }
- }
-
- private static class ServerSessionDataTupleScheme extends TupleScheme<ServerSessionData> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ServerSessionData struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSessionId()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSessionId()) {
- oprot.writeString(struct.sessionId);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ServerSessionData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java
deleted file mode 100644
index 711abeb..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java
+++ /dev/null
@@ -1,588 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SessionData implements org.apache.thrift.TBase<SessionData, SessionData._Fields>, java.io.Serializable, Cloneable, Comparable<SessionData> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SessionData");
-
- private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authToken", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField SERVER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("serverAddress", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SessionDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SessionDataTupleSchemeFactory());
- }
-
- public String sessionId; // required
- public String authToken; // required
- public String serverAddress; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SESSION_ID((short)1, "sessionId"),
- AUTH_TOKEN((short)2, "authToken"),
- SERVER_ADDRESS((short)3, "serverAddress");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SESSION_ID
- return SESSION_ID;
- case 2: // AUTH_TOKEN
- return AUTH_TOKEN;
- case 3: // SERVER_ADDRESS
- return SERVER_ADDRESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID")));
- tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- tmpMap.put(_Fields.SERVER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("serverAddress", 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(SessionData.class, metaDataMap);
- }
-
- public SessionData() {
- }
-
- public SessionData(
- String sessionId,
- String authToken,
- String serverAddress)
- {
- this();
- this.sessionId = sessionId;
- this.authToken = authToken;
- this.serverAddress = serverAddress;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SessionData(SessionData other) {
- if (other.isSetSessionId()) {
- this.sessionId = other.sessionId;
- }
- if (other.isSetAuthToken()) {
- this.authToken = other.authToken;
- }
- if (other.isSetServerAddress()) {
- this.serverAddress = other.serverAddress;
- }
- }
-
- public SessionData deepCopy() {
- return new SessionData(this);
- }
-
- @Override
- public void clear() {
- this.sessionId = null;
- this.authToken = null;
- this.serverAddress = null;
- }
-
- public String getSessionId() {
- return this.sessionId;
- }
-
- public SessionData setSessionId(String sessionId) {
- this.sessionId = sessionId;
- return this;
- }
-
- public void unsetSessionId() {
- this.sessionId = null;
- }
-
- /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
- public boolean isSetSessionId() {
- return this.sessionId != null;
- }
-
- public void setSessionIdIsSet(boolean value) {
- if (!value) {
- this.sessionId = null;
- }
- }
-
- public String getAuthToken() {
- return this.authToken;
- }
-
- public SessionData setAuthToken(String authToken) {
- this.authToken = authToken;
- return this;
- }
-
- public void unsetAuthToken() {
- this.authToken = null;
- }
-
- /** Returns true if field authToken is set (has been assigned a value) and false otherwise */
- public boolean isSetAuthToken() {
- return this.authToken != null;
- }
-
- public void setAuthTokenIsSet(boolean value) {
- if (!value) {
- this.authToken = null;
- }
- }
-
- public String getServerAddress() {
- return this.serverAddress;
- }
-
- public SessionData setServerAddress(String serverAddress) {
- this.serverAddress = serverAddress;
- return this;
- }
-
- public void unsetServerAddress() {
- this.serverAddress = null;
- }
-
- /** Returns true if field serverAddress is set (has been assigned a value) and false otherwise */
- public boolean isSetServerAddress() {
- return this.serverAddress != null;
- }
-
- public void setServerAddressIsSet(boolean value) {
- if (!value) {
- this.serverAddress = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SESSION_ID:
- if (value == null) {
- unsetSessionId();
- } else {
- setSessionId((String)value);
- }
- break;
-
- case AUTH_TOKEN:
- if (value == null) {
- unsetAuthToken();
- } else {
- setAuthToken((String)value);
- }
- break;
-
- case SERVER_ADDRESS:
- if (value == null) {
- unsetServerAddress();
- } else {
- setServerAddress((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SESSION_ID:
- return getSessionId();
-
- case AUTH_TOKEN:
- return getAuthToken();
-
- case SERVER_ADDRESS:
- return getServerAddress();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SESSION_ID:
- return isSetSessionId();
- case AUTH_TOKEN:
- return isSetAuthToken();
- case SERVER_ADDRESS:
- return isSetServerAddress();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SessionData)
- return this.equals((SessionData)that);
- return false;
- }
-
- public boolean equals(SessionData that) {
- if (that == null)
- return false;
-
- boolean this_present_sessionId = true && this.isSetSessionId();
- boolean that_present_sessionId = true && that.isSetSessionId();
- if (this_present_sessionId || that_present_sessionId) {
- if (!(this_present_sessionId && that_present_sessionId))
- return false;
- if (!this.sessionId.equals(that.sessionId))
- return false;
- }
-
- boolean this_present_authToken = true && this.isSetAuthToken();
- boolean that_present_authToken = true && that.isSetAuthToken();
- if (this_present_authToken || that_present_authToken) {
- if (!(this_present_authToken && that_present_authToken))
- return false;
- if (!this.authToken.equals(that.authToken))
- return false;
- }
-
- boolean this_present_serverAddress = true && this.isSetServerAddress();
- boolean that_present_serverAddress = true && that.isSetServerAddress();
- if (this_present_serverAddress || that_present_serverAddress) {
- if (!(this_present_serverAddress && that_present_serverAddress))
- return false;
- if (!this.serverAddress.equals(that.serverAddress))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(SessionData other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSessionId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetAuthToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetServerAddress()).compareTo(other.isSetServerAddress());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetServerAddress()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverAddress, other.serverAddress);
- 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("SessionData(");
- boolean first = true;
-
- sb.append("sessionId:");
- if (this.sessionId == null) {
- sb.append("null");
- } else {
- sb.append(this.sessionId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("authToken:");
- if (this.authToken == null) {
- sb.append("null");
- } else {
- sb.append(this.authToken);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("serverAddress:");
- if (this.serverAddress == null) {
- sb.append("null");
- } else {
- sb.append(this.serverAddress);
- }
- 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 SessionDataStandardSchemeFactory implements SchemeFactory {
- public SessionDataStandardScheme getScheme() {
- return new SessionDataStandardScheme();
- }
- }
-
- private static class SessionDataStandardScheme extends StandardScheme<SessionData> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, SessionData struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SESSION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // AUTH_TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.authToken = iprot.readString();
- struct.setAuthTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // SERVER_ADDRESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.serverAddress = iprot.readString();
- struct.setServerAddressIsSet(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, SessionData struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.sessionId != null) {
- oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
- oprot.writeString(struct.sessionId);
- oprot.writeFieldEnd();
- }
- if (struct.authToken != null) {
- oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC);
- oprot.writeString(struct.authToken);
- oprot.writeFieldEnd();
- }
- if (struct.serverAddress != null) {
- oprot.writeFieldBegin(SERVER_ADDRESS_FIELD_DESC);
- oprot.writeString(struct.serverAddress);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class SessionDataTupleSchemeFactory implements SchemeFactory {
- public SessionDataTupleScheme getScheme() {
- return new SessionDataTupleScheme();
- }
- }
-
- private static class SessionDataTupleScheme extends TupleScheme<SessionData> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSessionId()) {
- optionals.set(0);
- }
- if (struct.isSetAuthToken()) {
- optionals.set(1);
- }
- if (struct.isSetServerAddress()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetSessionId()) {
- oprot.writeString(struct.sessionId);
- }
- if (struct.isSetAuthToken()) {
- oprot.writeString(struct.authToken);
- }
- if (struct.isSetServerAddress()) {
- oprot.writeString(struct.serverAddress);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.sessionId = iprot.readString();
- struct.setSessionIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.authToken = iprot.readString();
- struct.setAuthTokenIsSet(true);
- }
- if (incoming.get(2)) {
- struct.serverAddress = iprot.readString();
- struct.setServerAddressIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java
deleted file mode 100644
index 314920e..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UploadData implements org.apache.thrift.TBase<UploadData, UploadData._Fields>, java.io.Serializable, Cloneable, Comparable<UploadData> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UploadData");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UploadDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UploadDataTupleSchemeFactory());
- }
-
- public String token; // required
- public int port; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token"),
- PORT((short)2, "port");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- case 2: // PORT
- return PORT;
- 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 __PORT_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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UploadData.class, metaDataMap);
- }
-
- public UploadData() {
- }
-
- public UploadData(
- String token,
- int port)
- {
- this();
- this.token = token;
- this.port = port;
- setPortIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public UploadData(UploadData other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetToken()) {
- this.token = other.token;
- }
- this.port = other.port;
- }
-
- public UploadData deepCopy() {
- return new UploadData(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- setPortIsSet(false);
- this.port = 0;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public UploadData setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public int getPort() {
- return this.port;
- }
-
- public UploadData setPort(int port) {
- this.port = port;
- setPortIsSet(true);
- return this;
- }
-
- public void unsetPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
- }
-
- /** Returns true if field port is set (has been assigned a value) and false otherwise */
- public boolean isSetPort() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
- }
-
- public void setPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case PORT:
- if (value == null) {
- unsetPort();
- } else {
- setPort((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- case PORT:
- return Integer.valueOf(getPort());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- case PORT:
- return isSetPort();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof UploadData)
- return this.equals((UploadData)that);
- return false;
- }
-
- public boolean equals(UploadData that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_port = true;
- boolean that_present_port = true;
- if (this_present_port || that_present_port) {
- if (!(this_present_port && that_present_port))
- return false;
- if (this.port != that.port)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(UploadData other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
- 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("UploadData(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("port:");
- sb.append(this.port);
- 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 UploadDataStandardSchemeFactory implements SchemeFactory {
- public UploadDataStandardScheme getScheme() {
- return new UploadDataStandardScheme();
- }
- }
-
- private static class UploadDataStandardScheme extends StandardScheme<UploadData> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, UploadData struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PORT
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.port = iprot.readI32();
- struct.setPortIsSet(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, UploadData struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(PORT_FIELD_DESC);
- oprot.writeI32(struct.port);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class UploadDataTupleSchemeFactory implements SchemeFactory {
- public UploadDataTupleScheme getScheme() {
- return new UploadDataTupleScheme();
- }
- }
-
- private static class UploadDataTupleScheme extends TupleScheme<UploadData> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, UploadData struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- if (struct.isSetPort()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetPort()) {
- oprot.writeI32(struct.port);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, UploadData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(1)) {
- struct.port = iprot.readI32();
- struct.setPortIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java
deleted file mode 100644
index 963ff1c..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-public enum UploadError implements org.apache.thrift.TEnum {
- INVALID_CRC(0),
- BROKEN_BLOCK(1),
- GENERIC_ERROR(2),
- INVALID_METADATA(3),
- ALREADY_COMPLETE(4);
-
- private final int value;
-
- private UploadError(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static UploadError findByValue(int value) {
- switch (value) {
- case 0:
- return INVALID_CRC;
- case 1:
- return BROKEN_BLOCK;
- case 2:
- return GENERIC_ERROR;
- case 3:
- return INVALID_METADATA;
- case 4:
- return ALREADY_COMPLETE;
- default:
- return null;
- }
- }
-}
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java
deleted file mode 100644
index bc4c150..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UploadException extends TException implements org.apache.thrift.TBase<UploadException, UploadException._Fields>, java.io.Serializable, Cloneable, Comparable<UploadException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UploadException");
-
- private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UploadExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UploadExceptionTupleSchemeFactory());
- }
-
- /**
- *
- * @see UploadError
- */
- public UploadError number; // required
- public String message; // 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 {
- /**
- *
- * @see UploadError
- */
- NUMBER((short)1, "number"),
- MESSAGE((short)2, "message");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NUMBER
- return NUMBER;
- case 2: // MESSAGE
- return MESSAGE;
- 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, UploadError.class)));
- tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(UploadException.class, metaDataMap);
- }
-
- public UploadException() {
- }
-
- public UploadException(
- UploadError number,
- String message)
- {
- this();
- this.number = number;
- this.message = message;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public UploadException(UploadException other) {
- if (other.isSetNumber()) {
- this.number = other.number;
- }
- if (other.isSetMessage()) {
- this.message = other.message;
- }
- }
-
- public UploadException deepCopy() {
- return new UploadException(this);
- }
-
- @Override
- public void clear() {
- this.number = null;
- this.message = null;
- }
-
- /**
- *
- * @see UploadError
- */
- public UploadError getNumber() {
- return this.number;
- }
-
- /**
- *
- * @see UploadError
- */
- public UploadException setNumber(UploadError number) {
- this.number = number;
- return this;
- }
-
- public void unsetNumber() {
- this.number = null;
- }
-
- /** Returns true if field number is set (has been assigned a value) and false otherwise */
- public boolean isSetNumber() {
- return this.number != null;
- }
-
- public void setNumberIsSet(boolean value) {
- if (!value) {
- this.number = null;
- }
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public UploadException setMessage(String message) {
- this.message = message;
- return this;
- }
-
- public void unsetMessage() {
- this.message = null;
- }
-
- /** Returns true if field message is set (has been assigned a value) and false otherwise */
- public boolean isSetMessage() {
- return this.message != null;
- }
-
- public void setMessageIsSet(boolean value) {
- if (!value) {
- this.message = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NUMBER:
- if (value == null) {
- unsetNumber();
- } else {
- setNumber((UploadError)value);
- }
- break;
-
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NUMBER:
- return getNumber();
-
- case MESSAGE:
- return getMessage();
-
- }
- 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 NUMBER:
- return isSetNumber();
- case MESSAGE:
- return isSetMessage();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof UploadException)
- return this.equals((UploadException)that);
- return false;
- }
-
- public boolean equals(UploadException that) {
- if (that == null)
- return false;
-
- boolean this_present_number = true && this.isSetNumber();
- boolean that_present_number = true && that.isSetNumber();
- if (this_present_number || that_present_number) {
- if (!(this_present_number && that_present_number))
- return false;
- if (!this.number.equals(that.number))
- return false;
- }
-
- boolean this_present_message = true && this.isSetMessage();
- boolean that_present_message = true && that.isSetMessage();
- if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
- return false;
- if (!this.message.equals(that.message))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(UploadException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNumber()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
- 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("UploadException(");
- boolean first = true;
-
- sb.append("number:");
- if (this.number == null) {
- sb.append("null");
- } else {
- sb.append(this.number);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("message:");
- if (this.message == null) {
- sb.append("null");
- } else {
- sb.append(this.message);
- }
- 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 UploadExceptionStandardSchemeFactory implements SchemeFactory {
- public UploadExceptionStandardScheme getScheme() {
- return new UploadExceptionStandardScheme();
- }
- }
-
- private static class UploadExceptionStandardScheme extends StandardScheme<UploadException> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, UploadException 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: // NUMBER
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.number = UploadError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // MESSAGE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(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, UploadException struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.number != null) {
- oprot.writeFieldBegin(NUMBER_FIELD_DESC);
- oprot.writeI32(struct.number.getValue());
- oprot.writeFieldEnd();
- }
- if (struct.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(struct.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class UploadExceptionTupleSchemeFactory implements SchemeFactory {
- public UploadExceptionTupleScheme getScheme() {
- return new UploadExceptionTupleScheme();
- }
- }
-
- private static class UploadExceptionTupleScheme extends TupleScheme<UploadException> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, UploadException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetNumber()) {
- optionals.set(0);
- }
- if (struct.isSetMessage()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetNumber()) {
- oprot.writeI32(struct.number.getValue());
- }
- if (struct.isSetMessage()) {
- oprot.writeString(struct.message);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, UploadException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.number = UploadError.findByValue(iprot.readI32());
- struct.setNumberIsSet(true);
- }
- if (incoming.get(1)) {
- struct.message = iprot.readString();
- struct.setMessageIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java
deleted file mode 100644
index 2d9581b..0000000
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java
+++ /dev/null
@@ -1,788 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.imagemaster.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fields>, java.io.Serializable, Cloneable, Comparable<UserInfo> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserInfo");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField E_MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("eMail", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UserInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UserInfoTupleSchemeFactory());
- }
-
- public String userId; // required
- public String firstName; // required
- public String lastName; // required
- public String eMail; // required
- public String organizationId; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userId"),
- FIRST_NAME((short)2, "firstName"),
- LAST_NAME((short)3, "lastName"),
- E_MAIL((short)4, "eMail"),
- ORGANIZATION_ID((short)5, "organizationId");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // FIRST_NAME
- return FIRST_NAME;
- case 3: // LAST_NAME
- return LAST_NAME;
- case 4: // E_MAIL
- return E_MAIL;
- case 5: // ORGANIZATION_ID
- return ORGANIZATION_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.E_MAIL, new org.apache.thrift.meta_data.FieldMetaData("eMail", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserInfo.class, metaDataMap);
- }
-
- public UserInfo() {
- }
-
- public UserInfo(
- String userId,
- String firstName,
- String lastName,
- String eMail,
- String organizationId)
- {
- this();
- this.userId = userId;
- this.firstName = firstName;
- this.lastName = lastName;
- this.eMail = eMail;
- this.organizationId = organizationId;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public UserInfo(UserInfo other) {
- if (other.isSetUserId()) {
- this.userId = other.userId;
- }
- if (other.isSetFirstName()) {
- this.firstName = other.firstName;
- }
- if (other.isSetLastName()) {
- this.lastName = other.lastName;
- }
- if (other.isSetEMail()) {
- this.eMail = other.eMail;
- }
- if (other.isSetOrganizationId()) {
- this.organizationId = other.organizationId;
- }
- }
-
- public UserInfo deepCopy() {
- return new UserInfo(this);
- }
-
- @Override
- public void clear() {
- this.userId = null;
- this.firstName = null;
- this.lastName = null;
- this.eMail = null;
- this.organizationId = null;
- }
-
- public String getUserId() {
- return this.userId;
- }
-
- public UserInfo setUserId(String userId) {
- this.userId = userId;
- return this;
- }
-
- public void unsetUserId() {
- this.userId = null;
- }
-
- /** Returns true if field userId is set (has been assigned a value) and false otherwise */
- public boolean isSetUserId() {
- return this.userId != null;
- }
-
- public void setUserIdIsSet(boolean value) {
- if (!value) {
- this.userId = null;
- }
- }
-
- public String getFirstName() {
- return this.firstName;
- }
-
- public UserInfo setFirstName(String firstName) {
- this.firstName = firstName;
- return this;
- }
-
- public void unsetFirstName() {
- this.firstName = null;
- }
-
- /** Returns true if field firstName is set (has been assigned a value) and false otherwise */
- public boolean isSetFirstName() {
- return this.firstName != null;
- }
-
- public void setFirstNameIsSet(boolean value) {
- if (!value) {
- this.firstName = null;
- }
- }
-
- public String getLastName() {
- return this.lastName;
- }
-
- public UserInfo setLastName(String lastName) {
- this.lastName = lastName;
- return this;
- }
-
- public void unsetLastName() {
- this.lastName = null;
- }
-
- /** Returns true if field lastName is set (has been assigned a value) and false otherwise */
- public boolean isSetLastName() {
- return this.lastName != null;
- }
-
- public void setLastNameIsSet(boolean value) {
- if (!value) {
- this.lastName = null;
- }
- }
-
- public String getEMail() {
- return this.eMail;
- }
-
- public UserInfo setEMail(String eMail) {
- this.eMail = eMail;
- return this;
- }
-
- public void unsetEMail() {
- this.eMail = null;
- }
-
- /** Returns true if field eMail is set (has been assigned a value) and false otherwise */
- public boolean isSetEMail() {
- return this.eMail != null;
- }
-
- public void setEMailIsSet(boolean value) {
- if (!value) {
- this.eMail = null;
- }
- }
-
- public String getOrganizationId() {
- return this.organizationId;
- }
-
- public UserInfo setOrganizationId(String organizationId) {
- this.organizationId = organizationId;
- return this;
- }
-
- public void unsetOrganizationId() {
- this.organizationId = null;
- }
-
- /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
- public boolean isSetOrganizationId() {
- return this.organizationId != null;
- }
-
- public void setOrganizationIdIsSet(boolean value) {
- if (!value) {
- this.organizationId = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserId();
- } else {
- setUserId((String)value);
- }
- break;
-
- case FIRST_NAME:
- if (value == null) {
- unsetFirstName();
- } else {
- setFirstName((String)value);
- }
- break;
-
- case LAST_NAME:
- if (value == null) {
- unsetLastName();
- } else {
- setLastName((String)value);
- }
- break;
-
- case E_MAIL:
- if (value == null) {
- unsetEMail();
- } else {
- setEMail((String)value);
- }
- break;
-
- case ORGANIZATION_ID:
- if (value == null) {
- unsetOrganizationId();
- } else {
- setOrganizationId((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserId();
-
- case FIRST_NAME:
- return getFirstName();
-
- case LAST_NAME:
- return getLastName();
-
- case E_MAIL:
- return getEMail();
-
- case ORGANIZATION_ID:
- return getOrganizationId();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserId();
- case FIRST_NAME:
- return isSetFirstName();
- case LAST_NAME:
- return isSetLastName();
- case E_MAIL:
- return isSetEMail();
- case ORGANIZATION_ID:
- return isSetOrganizationId();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof UserInfo)
- return this.equals((UserInfo)that);
- return false;
- }
-
- public boolean equals(UserInfo that) {
- if (that == null)
- return false;
-
- boolean this_present_userId = true && this.isSetUserId();
- boolean that_present_userId = true && that.isSetUserId();
- if (this_present_userId || that_present_userId) {
- if (!(this_present_userId && that_present_userId))
- return false;
- if (!this.userId.equals(that.userId))
- return false;
- }
-
- boolean this_present_firstName = true && this.isSetFirstName();
- boolean that_present_firstName = true && that.isSetFirstName();
- if (this_present_firstName || that_present_firstName) {
- if (!(this_present_firstName && that_present_firstName))
- return false;
- if (!this.firstName.equals(that.firstName))
- return false;
- }
-
- boolean this_present_lastName = true && this.isSetLastName();
- boolean that_present_lastName = true && that.isSetLastName();
- if (this_present_lastName || that_present_lastName) {
- if (!(this_present_lastName && that_present_lastName))
- return false;
- if (!this.lastName.equals(that.lastName))
- return false;
- }
-
- boolean this_present_eMail = true && this.isSetEMail();
- boolean that_present_eMail = true && that.isSetEMail();
- if (this_present_eMail || that_present_eMail) {
- if (!(this_present_eMail && that_present_eMail))
- return false;
- if (!this.eMail.equals(that.eMail))
- return false;
- }
-
- boolean this_present_organizationId = true && this.isSetOrganizationId();
- boolean that_present_organizationId = true && that.isSetOrganizationId();
- if (this_present_organizationId || that_present_organizationId) {
- if (!(this_present_organizationId && that_present_organizationId))
- return false;
- if (!this.organizationId.equals(that.organizationId))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(UserInfo other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFirstName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLastName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetEMail()).compareTo(other.isSetEMail());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetEMail()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eMail, other.eMail);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOrganizationId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- 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("UserInfo(");
- boolean first = true;
-
- sb.append("userId:");
- if (this.userId == null) {
- sb.append("null");
- } else {
- sb.append(this.userId);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("firstName:");
- if (this.firstName == null) {
- sb.append("null");
- } else {
- sb.append(this.firstName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("lastName:");
- if (this.lastName == null) {
- sb.append("null");
- } else {
- sb.append(this.lastName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("eMail:");
- if (this.eMail == null) {
- sb.append("null");
- } else {
- sb.append(this.eMail);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("organizationId:");
- if (this.organizationId == null) {
- sb.append("null");
- } else {
- sb.append(this.organizationId);
- }
- 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 UserInfoStandardSchemeFactory implements SchemeFactory {
- public UserInfoStandardScheme getScheme() {
- return new UserInfoStandardScheme();
- }
- }
-
- private static class UserInfoStandardScheme extends StandardScheme<UserInfo> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, UserInfo struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userId = iprot.readString();
- struct.setUserIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // FIRST_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.firstName = iprot.readString();
- struct.setFirstNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // LAST_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lastName = iprot.readString();
- struct.setLastNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // E_MAIL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.eMail = iprot.readString();
- struct.setEMailIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // ORGANIZATION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- 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, UserInfo struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userId != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userId);
- oprot.writeFieldEnd();
- }
- if (struct.firstName != null) {
- oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC);
- oprot.writeString(struct.firstName);
- oprot.writeFieldEnd();
- }
- if (struct.lastName != null) {
- oprot.writeFieldBegin(LAST_NAME_FIELD_DESC);
- oprot.writeString(struct.lastName);
- oprot.writeFieldEnd();
- }
- if (struct.eMail != null) {
- oprot.writeFieldBegin(E_MAIL_FIELD_DESC);
- oprot.writeString(struct.eMail);
- oprot.writeFieldEnd();
- }
- if (struct.organizationId != null) {
- oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
- oprot.writeString(struct.organizationId);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class UserInfoTupleSchemeFactory implements SchemeFactory {
- public UserInfoTupleScheme getScheme() {
- return new UserInfoTupleScheme();
- }
- }
-
- private static class UserInfoTupleScheme extends TupleScheme<UserInfo> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserId()) {
- optionals.set(0);
- }
- if (struct.isSetFirstName()) {
- optionals.set(1);
- }
- if (struct.isSetLastName()) {
- optionals.set(2);
- }
- if (struct.isSetEMail()) {
- optionals.set(3);
- }
- if (struct.isSetOrganizationId()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetUserId()) {
- oprot.writeString(struct.userId);
- }
- if (struct.isSetFirstName()) {
- oprot.writeString(struct.firstName);
- }
- if (struct.isSetLastName()) {
- oprot.writeString(struct.lastName);
- }
- if (struct.isSetEMail()) {
- oprot.writeString(struct.eMail);
- }
- if (struct.isSetOrganizationId()) {
- oprot.writeString(struct.organizationId);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.userId = iprot.readString();
- struct.setUserIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.firstName = iprot.readString();
- struct.setFirstNameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.lastName = iprot.readString();
- struct.setLastNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.eMail = iprot.readString();
- struct.setEMailIsSet(true);
- }
- if (incoming.get(4)) {
- struct.organizationId = iprot.readString();
- struct.setOrganizationIdIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/sat/thrift/iface/Image.java b/src/main/java/org/openslx/sat/thrift/iface/Image.java
deleted file mode 100644
index 4b4e9a0..0000000
--- a/src/main/java/org/openslx/sat/thrift/iface/Image.java
+++ /dev/null
@@ -1,1388 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.sat.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Image implements org.apache.thrift.TBase<Image, Image._Fields>, java.io.Serializable, Cloneable, Comparable<Image> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Image");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField LICENSE_RESTRICTION_FIELD_DESC = new org.apache.thrift.protocol.TField("licenseRestriction", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField OS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("osName", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField USER_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("userData", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.STRING, (short)9);
- private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)10);
- private static final org.apache.thrift.protocol.TField IMAGE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("imageSize", org.apache.thrift.protocol.TType.STRING, (short)11);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImageStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImageTupleSchemeFactory());
- }
-
- public String id; // required
- public String version; // required
- public String imageName; // required
- public String licenseRestriction; // required
- public String osName; // required
- public String lectureName; // required
- public String updateTime; // required
- public String userData; // required
- public String isTemplate; // required
- public String description; // required
- public String imageSize; // 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 {
- ID((short)1, "id"),
- VERSION((short)2, "version"),
- IMAGE_NAME((short)3, "imageName"),
- LICENSE_RESTRICTION((short)4, "licenseRestriction"),
- OS_NAME((short)5, "osName"),
- LECTURE_NAME((short)6, "lectureName"),
- UPDATE_TIME((short)7, "updateTime"),
- USER_DATA((short)8, "userData"),
- IS_TEMPLATE((short)9, "isTemplate"),
- DESCRIPTION((short)10, "description"),
- IMAGE_SIZE((short)11, "imageSize");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ID
- return ID;
- case 2: // VERSION
- return VERSION;
- case 3: // IMAGE_NAME
- return IMAGE_NAME;
- case 4: // LICENSE_RESTRICTION
- return LICENSE_RESTRICTION;
- case 5: // OS_NAME
- return OS_NAME;
- case 6: // LECTURE_NAME
- return LECTURE_NAME;
- case 7: // UPDATE_TIME
- return UPDATE_TIME;
- case 8: // USER_DATA
- return USER_DATA;
- case 9: // IS_TEMPLATE
- return IS_TEMPLATE;
- case 10: // DESCRIPTION
- return DESCRIPTION;
- case 11: // IMAGE_SIZE
- return IMAGE_SIZE;
- 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LICENSE_RESTRICTION, new org.apache.thrift.meta_data.FieldMetaData("licenseRestriction", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OS_NAME, new org.apache.thrift.meta_data.FieldMetaData("osName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_DATA, new org.apache.thrift.meta_data.FieldMetaData("userData", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("imageSize", 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(Image.class, metaDataMap);
- }
-
- public Image() {
- }
-
- public Image(
- String id,
- String version,
- String imageName,
- String licenseRestriction,
- String osName,
- String lectureName,
- String updateTime,
- String userData,
- String isTemplate,
- String description,
- String imageSize)
- {
- this();
- this.id = id;
- this.version = version;
- this.imageName = imageName;
- this.licenseRestriction = licenseRestriction;
- this.osName = osName;
- this.lectureName = lectureName;
- this.updateTime = updateTime;
- this.userData = userData;
- this.isTemplate = isTemplate;
- this.description = description;
- this.imageSize = imageSize;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public Image(Image other) {
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetVersion()) {
- this.version = other.version;
- }
- if (other.isSetImageName()) {
- this.imageName = other.imageName;
- }
- if (other.isSetLicenseRestriction()) {
- this.licenseRestriction = other.licenseRestriction;
- }
- if (other.isSetOsName()) {
- this.osName = other.osName;
- }
- if (other.isSetLectureName()) {
- this.lectureName = other.lectureName;
- }
- if (other.isSetUpdateTime()) {
- this.updateTime = other.updateTime;
- }
- if (other.isSetUserData()) {
- this.userData = other.userData;
- }
- if (other.isSetIsTemplate()) {
- this.isTemplate = other.isTemplate;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- if (other.isSetImageSize()) {
- this.imageSize = other.imageSize;
- }
- }
-
- public Image deepCopy() {
- return new Image(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.version = null;
- this.imageName = null;
- this.licenseRestriction = null;
- this.osName = null;
- this.lectureName = null;
- this.updateTime = null;
- this.userData = null;
- this.isTemplate = null;
- this.description = null;
- this.imageSize = null;
- }
-
- public String getId() {
- return this.id;
- }
-
- public Image setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getVersion() {
- return this.version;
- }
-
- public Image setVersion(String version) {
- this.version = version;
- return this;
- }
-
- public void unsetVersion() {
- this.version = null;
- }
-
- /** Returns true if field version is set (has been assigned a value) and false otherwise */
- public boolean isSetVersion() {
- return this.version != null;
- }
-
- public void setVersionIsSet(boolean value) {
- if (!value) {
- this.version = null;
- }
- }
-
- public String getImageName() {
- return this.imageName;
- }
-
- public Image setImageName(String imageName) {
- this.imageName = imageName;
- return this;
- }
-
- public void unsetImageName() {
- this.imageName = null;
- }
-
- /** Returns true if field imageName is set (has been assigned a value) and false otherwise */
- public boolean isSetImageName() {
- return this.imageName != null;
- }
-
- public void setImageNameIsSet(boolean value) {
- if (!value) {
- this.imageName = null;
- }
- }
-
- public String getLicenseRestriction() {
- return this.licenseRestriction;
- }
-
- public Image setLicenseRestriction(String licenseRestriction) {
- this.licenseRestriction = licenseRestriction;
- return this;
- }
-
- public void unsetLicenseRestriction() {
- this.licenseRestriction = null;
- }
-
- /** Returns true if field licenseRestriction is set (has been assigned a value) and false otherwise */
- public boolean isSetLicenseRestriction() {
- return this.licenseRestriction != null;
- }
-
- public void setLicenseRestrictionIsSet(boolean value) {
- if (!value) {
- this.licenseRestriction = null;
- }
- }
-
- public String getOsName() {
- return this.osName;
- }
-
- public Image setOsName(String osName) {
- this.osName = osName;
- return this;
- }
-
- public void unsetOsName() {
- this.osName = null;
- }
-
- /** Returns true if field osName is set (has been assigned a value) and false otherwise */
- public boolean isSetOsName() {
- return this.osName != null;
- }
-
- public void setOsNameIsSet(boolean value) {
- if (!value) {
- this.osName = null;
- }
- }
-
- public String getLectureName() {
- return this.lectureName;
- }
-
- public Image setLectureName(String lectureName) {
- this.lectureName = lectureName;
- return this;
- }
-
- public void unsetLectureName() {
- this.lectureName = null;
- }
-
- /** Returns true if field lectureName is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureName() {
- return this.lectureName != null;
- }
-
- public void setLectureNameIsSet(boolean value) {
- if (!value) {
- this.lectureName = null;
- }
- }
-
- public String getUpdateTime() {
- return this.updateTime;
- }
-
- public Image setUpdateTime(String updateTime) {
- this.updateTime = updateTime;
- return this;
- }
-
- public void unsetUpdateTime() {
- this.updateTime = null;
- }
-
- /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */
- public boolean isSetUpdateTime() {
- return this.updateTime != null;
- }
-
- public void setUpdateTimeIsSet(boolean value) {
- if (!value) {
- this.updateTime = null;
- }
- }
-
- public String getUserData() {
- return this.userData;
- }
-
- public Image setUserData(String userData) {
- this.userData = userData;
- return this;
- }
-
- public void unsetUserData() {
- this.userData = null;
- }
-
- /** Returns true if field userData is set (has been assigned a value) and false otherwise */
- public boolean isSetUserData() {
- return this.userData != null;
- }
-
- public void setUserDataIsSet(boolean value) {
- if (!value) {
- this.userData = null;
- }
- }
-
- public String getIsTemplate() {
- return this.isTemplate;
- }
-
- public Image setIsTemplate(String isTemplate) {
- this.isTemplate = isTemplate;
- return this;
- }
-
- public void unsetIsTemplate() {
- this.isTemplate = null;
- }
-
- /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */
- public boolean isSetIsTemplate() {
- return this.isTemplate != null;
- }
-
- public void setIsTemplateIsSet(boolean value) {
- if (!value) {
- this.isTemplate = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public Image setDescription(String description) {
- this.description = description;
- return this;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public String getImageSize() {
- return this.imageSize;
- }
-
- public Image setImageSize(String imageSize) {
- this.imageSize = imageSize;
- return this;
- }
-
- public void unsetImageSize() {
- this.imageSize = null;
- }
-
- /** Returns true if field imageSize is set (has been assigned a value) and false otherwise */
- public boolean isSetImageSize() {
- return this.imageSize != null;
- }
-
- public void setImageSizeIsSet(boolean value) {
- if (!value) {
- this.imageSize = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case VERSION:
- if (value == null) {
- unsetVersion();
- } else {
- setVersion((String)value);
- }
- break;
-
- case IMAGE_NAME:
- if (value == null) {
- unsetImageName();
- } else {
- setImageName((String)value);
- }
- break;
-
- case LICENSE_RESTRICTION:
- if (value == null) {
- unsetLicenseRestriction();
- } else {
- setLicenseRestriction((String)value);
- }
- break;
-
- case OS_NAME:
- if (value == null) {
- unsetOsName();
- } else {
- setOsName((String)value);
- }
- break;
-
- case LECTURE_NAME:
- if (value == null) {
- unsetLectureName();
- } else {
- setLectureName((String)value);
- }
- break;
-
- case UPDATE_TIME:
- if (value == null) {
- unsetUpdateTime();
- } else {
- setUpdateTime((String)value);
- }
- break;
-
- case USER_DATA:
- if (value == null) {
- unsetUserData();
- } else {
- setUserData((String)value);
- }
- break;
-
- case IS_TEMPLATE:
- if (value == null) {
- unsetIsTemplate();
- } else {
- setIsTemplate((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case IMAGE_SIZE:
- if (value == null) {
- unsetImageSize();
- } else {
- setImageSize((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return getId();
-
- case VERSION:
- return getVersion();
-
- case IMAGE_NAME:
- return getImageName();
-
- case LICENSE_RESTRICTION:
- return getLicenseRestriction();
-
- case OS_NAME:
- return getOsName();
-
- case LECTURE_NAME:
- return getLectureName();
-
- case UPDATE_TIME:
- return getUpdateTime();
-
- case USER_DATA:
- return getUserData();
-
- case IS_TEMPLATE:
- return getIsTemplate();
-
- case DESCRIPTION:
- return getDescription();
-
- case IMAGE_SIZE:
- return getImageSize();
-
- }
- 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 ID:
- return isSetId();
- case VERSION:
- return isSetVersion();
- case IMAGE_NAME:
- return isSetImageName();
- case LICENSE_RESTRICTION:
- return isSetLicenseRestriction();
- case OS_NAME:
- return isSetOsName();
- case LECTURE_NAME:
- return isSetLectureName();
- case UPDATE_TIME:
- return isSetUpdateTime();
- case USER_DATA:
- return isSetUserData();
- case IS_TEMPLATE:
- return isSetIsTemplate();
- case DESCRIPTION:
- return isSetDescription();
- case IMAGE_SIZE:
- return isSetImageSize();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof Image)
- return this.equals((Image)that);
- return false;
- }
-
- public boolean equals(Image that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_version = true && this.isSetVersion();
- boolean that_present_version = true && that.isSetVersion();
- if (this_present_version || that_present_version) {
- if (!(this_present_version && that_present_version))
- return false;
- if (!this.version.equals(that.version))
- return false;
- }
-
- boolean this_present_imageName = true && this.isSetImageName();
- boolean that_present_imageName = true && that.isSetImageName();
- if (this_present_imageName || that_present_imageName) {
- if (!(this_present_imageName && that_present_imageName))
- return false;
- if (!this.imageName.equals(that.imageName))
- return false;
- }
-
- boolean this_present_licenseRestriction = true && this.isSetLicenseRestriction();
- boolean that_present_licenseRestriction = true && that.isSetLicenseRestriction();
- if (this_present_licenseRestriction || that_present_licenseRestriction) {
- if (!(this_present_licenseRestriction && that_present_licenseRestriction))
- return false;
- if (!this.licenseRestriction.equals(that.licenseRestriction))
- return false;
- }
-
- boolean this_present_osName = true && this.isSetOsName();
- boolean that_present_osName = true && that.isSetOsName();
- if (this_present_osName || that_present_osName) {
- if (!(this_present_osName && that_present_osName))
- return false;
- if (!this.osName.equals(that.osName))
- return false;
- }
-
- boolean this_present_lectureName = true && this.isSetLectureName();
- boolean that_present_lectureName = true && that.isSetLectureName();
- if (this_present_lectureName || that_present_lectureName) {
- if (!(this_present_lectureName && that_present_lectureName))
- return false;
- if (!this.lectureName.equals(that.lectureName))
- return false;
- }
-
- boolean this_present_updateTime = true && this.isSetUpdateTime();
- boolean that_present_updateTime = true && that.isSetUpdateTime();
- if (this_present_updateTime || that_present_updateTime) {
- if (!(this_present_updateTime && that_present_updateTime))
- return false;
- if (!this.updateTime.equals(that.updateTime))
- return false;
- }
-
- boolean this_present_userData = true && this.isSetUserData();
- boolean that_present_userData = true && that.isSetUserData();
- if (this_present_userData || that_present_userData) {
- if (!(this_present_userData && that_present_userData))
- return false;
- if (!this.userData.equals(that.userData))
- return false;
- }
-
- boolean this_present_isTemplate = true && this.isSetIsTemplate();
- boolean that_present_isTemplate = true && that.isSetIsTemplate();
- if (this_present_isTemplate || that_present_isTemplate) {
- if (!(this_present_isTemplate && that_present_isTemplate))
- return false;
- if (!this.isTemplate.equals(that.isTemplate))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- boolean this_present_imageSize = true && this.isSetImageSize();
- boolean that_present_imageSize = true && that.isSetImageSize();
- if (this_present_imageSize || that_present_imageSize) {
- if (!(this_present_imageSize && that_present_imageSize))
- return false;
- if (!this.imageSize.equals(that.imageSize))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(Image other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVersion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLicenseRestriction()).compareTo(other.isSetLicenseRestriction());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLicenseRestriction()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.licenseRestriction, other.licenseRestriction);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOsName()).compareTo(other.isSetOsName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOsName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osName, other.osName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureName, other.lectureName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUpdateTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserData()).compareTo(other.isSetUserData());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserData()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userData, other.userData);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsTemplate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImageSize()).compareTo(other.isSetImageSize());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageSize()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageSize, other.imageSize);
- 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("Image(");
- boolean first = true;
-
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("version:");
- if (this.version == null) {
- sb.append("null");
- } else {
- sb.append(this.version);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("imageName:");
- if (this.imageName == null) {
- sb.append("null");
- } else {
- sb.append(this.imageName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("licenseRestriction:");
- if (this.licenseRestriction == null) {
- sb.append("null");
- } else {
- sb.append(this.licenseRestriction);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("osName:");
- if (this.osName == null) {
- sb.append("null");
- } else {
- sb.append(this.osName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("lectureName:");
- if (this.lectureName == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("updateTime:");
- if (this.updateTime == null) {
- sb.append("null");
- } else {
- sb.append(this.updateTime);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userData:");
- if (this.userData == null) {
- sb.append("null");
- } else {
- sb.append(this.userData);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isTemplate:");
- if (this.isTemplate == null) {
- sb.append("null");
- } else {
- sb.append(this.isTemplate);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("imageSize:");
- if (this.imageSize == null) {
- sb.append("null");
- } else {
- sb.append(this.imageSize);
- }
- 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 ImageStandardSchemeFactory implements SchemeFactory {
- public ImageStandardScheme getScheme() {
- return new ImageStandardScheme();
- }
- }
-
- private static class ImageStandardScheme extends StandardScheme<Image> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, Image 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: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // IMAGE_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageName = iprot.readString();
- struct.setImageNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // LICENSE_RESTRICTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.licenseRestriction = iprot.readString();
- struct.setLicenseRestrictionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // OS_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.osName = iprot.readString();
- struct.setOsNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // LECTURE_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureName = iprot.readString();
- struct.setLectureNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // UPDATE_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.updateTime = iprot.readString();
- struct.setUpdateTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // USER_DATA
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userData = iprot.readString();
- struct.setUserDataIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // IS_TEMPLATE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.isTemplate = iprot.readString();
- struct.setIsTemplateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // IMAGE_SIZE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageSize = iprot.readString();
- struct.setImageSizeIsSet(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, Image struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.version != null) {
- oprot.writeFieldBegin(VERSION_FIELD_DESC);
- oprot.writeString(struct.version);
- oprot.writeFieldEnd();
- }
- if (struct.imageName != null) {
- oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
- oprot.writeString(struct.imageName);
- oprot.writeFieldEnd();
- }
- if (struct.licenseRestriction != null) {
- oprot.writeFieldBegin(LICENSE_RESTRICTION_FIELD_DESC);
- oprot.writeString(struct.licenseRestriction);
- oprot.writeFieldEnd();
- }
- if (struct.osName != null) {
- oprot.writeFieldBegin(OS_NAME_FIELD_DESC);
- oprot.writeString(struct.osName);
- oprot.writeFieldEnd();
- }
- if (struct.lectureName != null) {
- oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC);
- oprot.writeString(struct.lectureName);
- oprot.writeFieldEnd();
- }
- if (struct.updateTime != null) {
- oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC);
- oprot.writeString(struct.updateTime);
- oprot.writeFieldEnd();
- }
- if (struct.userData != null) {
- oprot.writeFieldBegin(USER_DATA_FIELD_DESC);
- oprot.writeString(struct.userData);
- oprot.writeFieldEnd();
- }
- if (struct.isTemplate != null) {
- oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC);
- oprot.writeString(struct.isTemplate);
- oprot.writeFieldEnd();
- }
- if (struct.description != null) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- if (struct.imageSize != null) {
- oprot.writeFieldBegin(IMAGE_SIZE_FIELD_DESC);
- oprot.writeString(struct.imageSize);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ImageTupleSchemeFactory implements SchemeFactory {
- public ImageTupleScheme getScheme() {
- return new ImageTupleScheme();
- }
- }
-
- private static class ImageTupleScheme extends TupleScheme<Image> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Image struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetId()) {
- optionals.set(0);
- }
- if (struct.isSetVersion()) {
- optionals.set(1);
- }
- if (struct.isSetImageName()) {
- optionals.set(2);
- }
- if (struct.isSetLicenseRestriction()) {
- optionals.set(3);
- }
- if (struct.isSetOsName()) {
- optionals.set(4);
- }
- if (struct.isSetLectureName()) {
- optionals.set(5);
- }
- if (struct.isSetUpdateTime()) {
- optionals.set(6);
- }
- if (struct.isSetUserData()) {
- optionals.set(7);
- }
- if (struct.isSetIsTemplate()) {
- optionals.set(8);
- }
- if (struct.isSetDescription()) {
- optionals.set(9);
- }
- if (struct.isSetImageSize()) {
- optionals.set(10);
- }
- oprot.writeBitSet(optionals, 11);
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetVersion()) {
- oprot.writeString(struct.version);
- }
- if (struct.isSetImageName()) {
- oprot.writeString(struct.imageName);
- }
- if (struct.isSetLicenseRestriction()) {
- oprot.writeString(struct.licenseRestriction);
- }
- if (struct.isSetOsName()) {
- oprot.writeString(struct.osName);
- }
- if (struct.isSetLectureName()) {
- oprot.writeString(struct.lectureName);
- }
- if (struct.isSetUpdateTime()) {
- oprot.writeString(struct.updateTime);
- }
- if (struct.isSetUserData()) {
- oprot.writeString(struct.userData);
- }
- if (struct.isSetIsTemplate()) {
- oprot.writeString(struct.isTemplate);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetImageSize()) {
- oprot.writeString(struct.imageSize);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Image struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(11);
- if (incoming.get(0)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.imageName = iprot.readString();
- struct.setImageNameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.licenseRestriction = iprot.readString();
- struct.setLicenseRestrictionIsSet(true);
- }
- if (incoming.get(4)) {
- struct.osName = iprot.readString();
- struct.setOsNameIsSet(true);
- }
- if (incoming.get(5)) {
- struct.lectureName = iprot.readString();
- struct.setLectureNameIsSet(true);
- }
- if (incoming.get(6)) {
- struct.updateTime = iprot.readString();
- struct.setUpdateTimeIsSet(true);
- }
- if (incoming.get(7)) {
- struct.userData = iprot.readString();
- struct.setUserDataIsSet(true);
- }
- if (incoming.get(8)) {
- struct.isTemplate = iprot.readString();
- struct.setIsTemplateIsSet(true);
- }
- if (incoming.get(9)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(10)) {
- struct.imageSize = iprot.readString();
- struct.setImageSizeIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/sat/thrift/iface/Lecture.java b/src/main/java/org/openslx/sat/thrift/iface/Lecture.java
deleted file mode 100644
index aae0509..0000000
--- a/src/main/java/org/openslx/sat/thrift/iface/Lecture.java
+++ /dev/null
@@ -1,1188 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.sat.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Lecture implements org.apache.thrift.TBase<Lecture, Lecture._Fields>, java.io.Serializable, Cloneable, Comparable<Lecture> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Lecture");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField LECTURENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lecturename", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField STARTTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("starttime", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField ENDTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endtime", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField LASTUSED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastused", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)9);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LectureStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LectureTupleSchemeFactory());
- }
-
- public String id; // required
- public String lecturename; // required
- public String isActive; // required
- public String starttime; // required
- public String endtime; // required
- public String lastused; // required
- public String desc; // required
- public String imagename; // required
- public String username; // 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 {
- ID((short)1, "id"),
- LECTURENAME((short)2, "lecturename"),
- IS_ACTIVE((short)3, "isActive"),
- STARTTIME((short)4, "starttime"),
- ENDTIME((short)5, "endtime"),
- LASTUSED((short)6, "lastused"),
- DESC((short)7, "desc"),
- IMAGENAME((short)8, "imagename"),
- USERNAME((short)9, "username");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ID
- return ID;
- case 2: // LECTURENAME
- return LECTURENAME;
- case 3: // IS_ACTIVE
- return IS_ACTIVE;
- case 4: // STARTTIME
- return STARTTIME;
- case 5: // ENDTIME
- return ENDTIME;
- case 6: // LASTUSED
- return LASTUSED;
- case 7: // DESC
- return DESC;
- case 8: // IMAGENAME
- return IMAGENAME;
- case 9: // USERNAME
- return USERNAME;
- 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LECTURENAME, new org.apache.thrift.meta_data.FieldMetaData("lecturename", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.STARTTIME, new org.apache.thrift.meta_data.FieldMetaData("starttime", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ENDTIME, new org.apache.thrift.meta_data.FieldMetaData("endtime", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LASTUSED, new org.apache.thrift.meta_data.FieldMetaData("lastused", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", 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(Lecture.class, metaDataMap);
- }
-
- public Lecture() {
- }
-
- public Lecture(
- String id,
- String lecturename,
- String isActive,
- String starttime,
- String endtime,
- String lastused,
- String desc,
- String imagename,
- String username)
- {
- this();
- this.id = id;
- this.lecturename = lecturename;
- this.isActive = isActive;
- this.starttime = starttime;
- this.endtime = endtime;
- this.lastused = lastused;
- this.desc = desc;
- this.imagename = imagename;
- this.username = username;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public Lecture(Lecture other) {
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetLecturename()) {
- this.lecturename = other.lecturename;
- }
- if (other.isSetIsActive()) {
- this.isActive = other.isActive;
- }
- if (other.isSetStarttime()) {
- this.starttime = other.starttime;
- }
- if (other.isSetEndtime()) {
- this.endtime = other.endtime;
- }
- if (other.isSetLastused()) {
- this.lastused = other.lastused;
- }
- if (other.isSetDesc()) {
- this.desc = other.desc;
- }
- if (other.isSetImagename()) {
- this.imagename = other.imagename;
- }
- if (other.isSetUsername()) {
- this.username = other.username;
- }
- }
-
- public Lecture deepCopy() {
- return new Lecture(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.lecturename = null;
- this.isActive = null;
- this.starttime = null;
- this.endtime = null;
- this.lastused = null;
- this.desc = null;
- this.imagename = null;
- this.username = null;
- }
-
- public String getId() {
- return this.id;
- }
-
- public Lecture setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getLecturename() {
- return this.lecturename;
- }
-
- public Lecture setLecturename(String lecturename) {
- this.lecturename = lecturename;
- return this;
- }
-
- public void unsetLecturename() {
- this.lecturename = null;
- }
-
- /** Returns true if field lecturename is set (has been assigned a value) and false otherwise */
- public boolean isSetLecturename() {
- return this.lecturename != null;
- }
-
- public void setLecturenameIsSet(boolean value) {
- if (!value) {
- this.lecturename = null;
- }
- }
-
- public String getIsActive() {
- return this.isActive;
- }
-
- public Lecture setIsActive(String isActive) {
- this.isActive = isActive;
- return this;
- }
-
- public void unsetIsActive() {
- this.isActive = null;
- }
-
- /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
- public boolean isSetIsActive() {
- return this.isActive != null;
- }
-
- public void setIsActiveIsSet(boolean value) {
- if (!value) {
- this.isActive = null;
- }
- }
-
- public String getStarttime() {
- return this.starttime;
- }
-
- public Lecture setStarttime(String starttime) {
- this.starttime = starttime;
- return this;
- }
-
- public void unsetStarttime() {
- this.starttime = null;
- }
-
- /** Returns true if field starttime is set (has been assigned a value) and false otherwise */
- public boolean isSetStarttime() {
- return this.starttime != null;
- }
-
- public void setStarttimeIsSet(boolean value) {
- if (!value) {
- this.starttime = null;
- }
- }
-
- public String getEndtime() {
- return this.endtime;
- }
-
- public Lecture setEndtime(String endtime) {
- this.endtime = endtime;
- return this;
- }
-
- public void unsetEndtime() {
- this.endtime = null;
- }
-
- /** Returns true if field endtime is set (has been assigned a value) and false otherwise */
- public boolean isSetEndtime() {
- return this.endtime != null;
- }
-
- public void setEndtimeIsSet(boolean value) {
- if (!value) {
- this.endtime = null;
- }
- }
-
- public String getLastused() {
- return this.lastused;
- }
-
- public Lecture setLastused(String lastused) {
- this.lastused = lastused;
- return this;
- }
-
- public void unsetLastused() {
- this.lastused = null;
- }
-
- /** Returns true if field lastused is set (has been assigned a value) and false otherwise */
- public boolean isSetLastused() {
- return this.lastused != null;
- }
-
- public void setLastusedIsSet(boolean value) {
- if (!value) {
- this.lastused = null;
- }
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public Lecture setDesc(String desc) {
- this.desc = desc;
- return this;
- }
-
- public void unsetDesc() {
- this.desc = null;
- }
-
- /** Returns true if field desc is set (has been assigned a value) and false otherwise */
- public boolean isSetDesc() {
- return this.desc != null;
- }
-
- public void setDescIsSet(boolean value) {
- if (!value) {
- this.desc = null;
- }
- }
-
- public String getImagename() {
- return this.imagename;
- }
-
- public Lecture setImagename(String imagename) {
- this.imagename = imagename;
- return this;
- }
-
- public void unsetImagename() {
- this.imagename = null;
- }
-
- /** Returns true if field imagename is set (has been assigned a value) and false otherwise */
- public boolean isSetImagename() {
- return this.imagename != null;
- }
-
- public void setImagenameIsSet(boolean value) {
- if (!value) {
- this.imagename = null;
- }
- }
-
- public String getUsername() {
- return this.username;
- }
-
- public Lecture setUsername(String username) {
- this.username = username;
- return this;
- }
-
- public void unsetUsername() {
- this.username = null;
- }
-
- /** Returns true if field username is set (has been assigned a value) and false otherwise */
- public boolean isSetUsername() {
- return this.username != null;
- }
-
- public void setUsernameIsSet(boolean value) {
- if (!value) {
- this.username = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case LECTURENAME:
- if (value == null) {
- unsetLecturename();
- } else {
- setLecturename((String)value);
- }
- break;
-
- case IS_ACTIVE:
- if (value == null) {
- unsetIsActive();
- } else {
- setIsActive((String)value);
- }
- break;
-
- case STARTTIME:
- if (value == null) {
- unsetStarttime();
- } else {
- setStarttime((String)value);
- }
- break;
-
- case ENDTIME:
- if (value == null) {
- unsetEndtime();
- } else {
- setEndtime((String)value);
- }
- break;
-
- case LASTUSED:
- if (value == null) {
- unsetLastused();
- } else {
- setLastused((String)value);
- }
- break;
-
- case DESC:
- if (value == null) {
- unsetDesc();
- } else {
- setDesc((String)value);
- }
- break;
-
- case IMAGENAME:
- if (value == null) {
- unsetImagename();
- } else {
- setImagename((String)value);
- }
- break;
-
- case USERNAME:
- if (value == null) {
- unsetUsername();
- } else {
- setUsername((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return getId();
-
- case LECTURENAME:
- return getLecturename();
-
- case IS_ACTIVE:
- return getIsActive();
-
- case STARTTIME:
- return getStarttime();
-
- case ENDTIME:
- return getEndtime();
-
- case LASTUSED:
- return getLastused();
-
- case DESC:
- return getDesc();
-
- case IMAGENAME:
- return getImagename();
-
- case USERNAME:
- return getUsername();
-
- }
- 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 ID:
- return isSetId();
- case LECTURENAME:
- return isSetLecturename();
- case IS_ACTIVE:
- return isSetIsActive();
- case STARTTIME:
- return isSetStarttime();
- case ENDTIME:
- return isSetEndtime();
- case LASTUSED:
- return isSetLastused();
- case DESC:
- return isSetDesc();
- case IMAGENAME:
- return isSetImagename();
- case USERNAME:
- return isSetUsername();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof Lecture)
- return this.equals((Lecture)that);
- return false;
- }
-
- public boolean equals(Lecture that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_lecturename = true && this.isSetLecturename();
- boolean that_present_lecturename = true && that.isSetLecturename();
- if (this_present_lecturename || that_present_lecturename) {
- if (!(this_present_lecturename && that_present_lecturename))
- return false;
- if (!this.lecturename.equals(that.lecturename))
- return false;
- }
-
- boolean this_present_isActive = true && this.isSetIsActive();
- boolean that_present_isActive = true && that.isSetIsActive();
- if (this_present_isActive || that_present_isActive) {
- if (!(this_present_isActive && that_present_isActive))
- return false;
- if (!this.isActive.equals(that.isActive))
- return false;
- }
-
- boolean this_present_starttime = true && this.isSetStarttime();
- boolean that_present_starttime = true && that.isSetStarttime();
- if (this_present_starttime || that_present_starttime) {
- if (!(this_present_starttime && that_present_starttime))
- return false;
- if (!this.starttime.equals(that.starttime))
- return false;
- }
-
- boolean this_present_endtime = true && this.isSetEndtime();
- boolean that_present_endtime = true && that.isSetEndtime();
- if (this_present_endtime || that_present_endtime) {
- if (!(this_present_endtime && that_present_endtime))
- return false;
- if (!this.endtime.equals(that.endtime))
- return false;
- }
-
- boolean this_present_lastused = true && this.isSetLastused();
- boolean that_present_lastused = true && that.isSetLastused();
- if (this_present_lastused || that_present_lastused) {
- if (!(this_present_lastused && that_present_lastused))
- return false;
- if (!this.lastused.equals(that.lastused))
- return false;
- }
-
- boolean this_present_desc = true && this.isSetDesc();
- boolean that_present_desc = true && that.isSetDesc();
- if (this_present_desc || that_present_desc) {
- if (!(this_present_desc && that_present_desc))
- return false;
- if (!this.desc.equals(that.desc))
- return false;
- }
-
- boolean this_present_imagename = true && this.isSetImagename();
- boolean that_present_imagename = true && that.isSetImagename();
- if (this_present_imagename || that_present_imagename) {
- if (!(this_present_imagename && that_present_imagename))
- return false;
- if (!this.imagename.equals(that.imagename))
- return false;
- }
-
- boolean this_present_username = true && this.isSetUsername();
- boolean that_present_username = true && that.isSetUsername();
- if (this_present_username || that_present_username) {
- if (!(this_present_username && that_present_username))
- return false;
- if (!this.username.equals(that.username))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(Lecture other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLecturename()).compareTo(other.isSetLecturename());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLecturename()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecturename, other.lecturename);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(other.isSetIsActive());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsActive()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, other.isActive);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetStarttime()).compareTo(other.isSetStarttime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStarttime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.starttime, other.starttime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetEndtime()).compareTo(other.isSetEndtime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetEndtime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endtime, other.endtime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLastused()).compareTo(other.isSetLastused());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLastused()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastused, other.lastused);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDesc()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImagename()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUsername()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
- 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("Lecture(");
- boolean first = true;
-
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("lecturename:");
- if (this.lecturename == null) {
- sb.append("null");
- } else {
- sb.append(this.lecturename);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isActive:");
- if (this.isActive == null) {
- sb.append("null");
- } else {
- sb.append(this.isActive);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("starttime:");
- if (this.starttime == null) {
- sb.append("null");
- } else {
- sb.append(this.starttime);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("endtime:");
- if (this.endtime == null) {
- sb.append("null");
- } else {
- sb.append(this.endtime);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("lastused:");
- if (this.lastused == null) {
- sb.append("null");
- } else {
- sb.append(this.lastused);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("desc:");
- if (this.desc == null) {
- sb.append("null");
- } else {
- sb.append(this.desc);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("imagename:");
- if (this.imagename == null) {
- sb.append("null");
- } else {
- sb.append(this.imagename);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("username:");
- if (this.username == null) {
- sb.append("null");
- } else {
- sb.append(this.username);
- }
- 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 LectureStandardSchemeFactory implements SchemeFactory {
- public LectureStandardScheme getScheme() {
- return new LectureStandardScheme();
- }
- }
-
- private static class LectureStandardScheme extends StandardScheme<Lecture> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, Lecture 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: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // LECTURENAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lecturename = iprot.readString();
- struct.setLecturenameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // IS_ACTIVE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.isActive = iprot.readString();
- struct.setIsActiveIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // STARTTIME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.starttime = iprot.readString();
- struct.setStarttimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // ENDTIME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.endtime = iprot.readString();
- struct.setEndtimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // LASTUSED
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lastused = iprot.readString();
- struct.setLastusedIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // DESC
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // IMAGENAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // USERNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(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, Lecture struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.lecturename != null) {
- oprot.writeFieldBegin(LECTURENAME_FIELD_DESC);
- oprot.writeString(struct.lecturename);
- oprot.writeFieldEnd();
- }
- if (struct.isActive != null) {
- oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
- oprot.writeString(struct.isActive);
- oprot.writeFieldEnd();
- }
- if (struct.starttime != null) {
- oprot.writeFieldBegin(STARTTIME_FIELD_DESC);
- oprot.writeString(struct.starttime);
- oprot.writeFieldEnd();
- }
- if (struct.endtime != null) {
- oprot.writeFieldBegin(ENDTIME_FIELD_DESC);
- oprot.writeString(struct.endtime);
- oprot.writeFieldEnd();
- }
- if (struct.lastused != null) {
- oprot.writeFieldBegin(LASTUSED_FIELD_DESC);
- oprot.writeString(struct.lastused);
- oprot.writeFieldEnd();
- }
- if (struct.desc != null) {
- oprot.writeFieldBegin(DESC_FIELD_DESC);
- oprot.writeString(struct.desc);
- oprot.writeFieldEnd();
- }
- if (struct.imagename != null) {
- oprot.writeFieldBegin(IMAGENAME_FIELD_DESC);
- oprot.writeString(struct.imagename);
- oprot.writeFieldEnd();
- }
- if (struct.username != null) {
- oprot.writeFieldBegin(USERNAME_FIELD_DESC);
- oprot.writeString(struct.username);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class LectureTupleSchemeFactory implements SchemeFactory {
- public LectureTupleScheme getScheme() {
- return new LectureTupleScheme();
- }
- }
-
- private static class LectureTupleScheme extends TupleScheme<Lecture> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Lecture struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetId()) {
- optionals.set(0);
- }
- if (struct.isSetLecturename()) {
- optionals.set(1);
- }
- if (struct.isSetIsActive()) {
- optionals.set(2);
- }
- if (struct.isSetStarttime()) {
- optionals.set(3);
- }
- if (struct.isSetEndtime()) {
- optionals.set(4);
- }
- if (struct.isSetLastused()) {
- optionals.set(5);
- }
- if (struct.isSetDesc()) {
- optionals.set(6);
- }
- if (struct.isSetImagename()) {
- optionals.set(7);
- }
- if (struct.isSetUsername()) {
- optionals.set(8);
- }
- oprot.writeBitSet(optionals, 9);
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetLecturename()) {
- oprot.writeString(struct.lecturename);
- }
- if (struct.isSetIsActive()) {
- oprot.writeString(struct.isActive);
- }
- if (struct.isSetStarttime()) {
- oprot.writeString(struct.starttime);
- }
- if (struct.isSetEndtime()) {
- oprot.writeString(struct.endtime);
- }
- if (struct.isSetLastused()) {
- oprot.writeString(struct.lastused);
- }
- if (struct.isSetDesc()) {
- oprot.writeString(struct.desc);
- }
- if (struct.isSetImagename()) {
- oprot.writeString(struct.imagename);
- }
- if (struct.isSetUsername()) {
- oprot.writeString(struct.username);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Lecture struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(9);
- if (incoming.get(0)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.lecturename = iprot.readString();
- struct.setLecturenameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.isActive = iprot.readString();
- struct.setIsActiveIsSet(true);
- }
- if (incoming.get(3)) {
- struct.starttime = iprot.readString();
- struct.setStarttimeIsSet(true);
- }
- if (incoming.get(4)) {
- struct.endtime = iprot.readString();
- struct.setEndtimeIsSet(true);
- }
- if (incoming.get(5)) {
- struct.lastused = iprot.readString();
- struct.setLastusedIsSet(true);
- }
- if (incoming.get(6)) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- }
- if (incoming.get(7)) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- }
- if (incoming.get(8)) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/sat/thrift/iface/Person.java b/src/main/java/org/openslx/sat/thrift/iface/Person.java
deleted file mode 100644
index bb407af..0000000
--- a/src/main/java/org/openslx/sat/thrift/iface/Person.java
+++ /dev/null
@@ -1,1350 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.sat.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Person implements org.apache.thrift.TBase<Person, Person._Fields>, java.io.Serializable, Cloneable, Comparable<Person> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Person");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField NACHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("Nachname", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField VORNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("Vorname", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("mail", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField IMAGE_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("image_read", org.apache.thrift.protocol.TType.BOOL, (short)5);
- private static final org.apache.thrift.protocol.TField IMAGE_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("image_write", org.apache.thrift.protocol.TType.BOOL, (short)6);
- private static final org.apache.thrift.protocol.TField IMAGE_ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("image_admin", org.apache.thrift.protocol.TType.BOOL, (short)7);
- private static final org.apache.thrift.protocol.TField IMAGE_LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("image_link", org.apache.thrift.protocol.TType.BOOL, (short)8);
- private static final org.apache.thrift.protocol.TField LECTURE_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture_read", org.apache.thrift.protocol.TType.BOOL, (short)9);
- private static final org.apache.thrift.protocol.TField LECTURE_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture_write", org.apache.thrift.protocol.TType.BOOL, (short)10);
- private static final org.apache.thrift.protocol.TField LECTURE_ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture_admin", org.apache.thrift.protocol.TType.BOOL, (short)11);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new PersonStandardSchemeFactory());
- schemes.put(TupleScheme.class, new PersonTupleSchemeFactory());
- }
-
- public String userID; // required
- public String Nachname; // required
- public String Vorname; // required
- public String mail; // required
- public boolean image_read; // required
- public boolean image_write; // required
- public boolean image_admin; // required
- public boolean image_link; // required
- public boolean lecture_read; // required
- public boolean lecture_write; // required
- public boolean lecture_admin; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- NACHNAME((short)2, "Nachname"),
- VORNAME((short)3, "Vorname"),
- MAIL((short)4, "mail"),
- IMAGE_READ((short)5, "image_read"),
- IMAGE_WRITE((short)6, "image_write"),
- IMAGE_ADMIN((short)7, "image_admin"),
- IMAGE_LINK((short)8, "image_link"),
- LECTURE_READ((short)9, "lecture_read"),
- LECTURE_WRITE((short)10, "lecture_write"),
- LECTURE_ADMIN((short)11, "lecture_admin");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // NACHNAME
- return NACHNAME;
- case 3: // VORNAME
- return VORNAME;
- case 4: // MAIL
- return MAIL;
- case 5: // IMAGE_READ
- return IMAGE_READ;
- case 6: // IMAGE_WRITE
- return IMAGE_WRITE;
- case 7: // IMAGE_ADMIN
- return IMAGE_ADMIN;
- case 8: // IMAGE_LINK
- return IMAGE_LINK;
- case 9: // LECTURE_READ
- return LECTURE_READ;
- case 10: // LECTURE_WRITE
- return LECTURE_WRITE;
- case 11: // LECTURE_ADMIN
- return LECTURE_ADMIN;
- 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 __IMAGE_READ_ISSET_ID = 0;
- private static final int __IMAGE_WRITE_ISSET_ID = 1;
- private static final int __IMAGE_ADMIN_ISSET_ID = 2;
- private static final int __IMAGE_LINK_ISSET_ID = 3;
- private static final int __LECTURE_READ_ISSET_ID = 4;
- private static final int __LECTURE_WRITE_ISSET_ID = 5;
- private static final int __LECTURE_ADMIN_ISSET_ID = 6;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NACHNAME, new org.apache.thrift.meta_data.FieldMetaData("Nachname", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VORNAME, new org.apache.thrift.meta_data.FieldMetaData("Vorname", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.MAIL, new org.apache.thrift.meta_data.FieldMetaData("mail", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGE_READ, new org.apache.thrift.meta_data.FieldMetaData("image_read", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IMAGE_WRITE, new org.apache.thrift.meta_data.FieldMetaData("image_write", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IMAGE_ADMIN, new org.apache.thrift.meta_data.FieldMetaData("image_admin", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IMAGE_LINK, new org.apache.thrift.meta_data.FieldMetaData("image_link", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.LECTURE_READ, new org.apache.thrift.meta_data.FieldMetaData("lecture_read", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.LECTURE_WRITE, new org.apache.thrift.meta_data.FieldMetaData("lecture_write", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.LECTURE_ADMIN, new org.apache.thrift.meta_data.FieldMetaData("lecture_admin", 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(Person.class, metaDataMap);
- }
-
- public Person() {
- }
-
- public Person(
- String userID,
- String Nachname,
- String Vorname,
- String mail,
- boolean image_read,
- boolean image_write,
- boolean image_admin,
- boolean image_link,
- boolean lecture_read,
- boolean lecture_write,
- boolean lecture_admin)
- {
- this();
- this.userID = userID;
- this.Nachname = Nachname;
- this.Vorname = Vorname;
- this.mail = mail;
- this.image_read = image_read;
- setImage_readIsSet(true);
- this.image_write = image_write;
- setImage_writeIsSet(true);
- this.image_admin = image_admin;
- setImage_adminIsSet(true);
- this.image_link = image_link;
- setImage_linkIsSet(true);
- this.lecture_read = lecture_read;
- setLecture_readIsSet(true);
- this.lecture_write = lecture_write;
- setLecture_writeIsSet(true);
- this.lecture_admin = lecture_admin;
- setLecture_adminIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public Person(Person other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetNachname()) {
- this.Nachname = other.Nachname;
- }
- if (other.isSetVorname()) {
- this.Vorname = other.Vorname;
- }
- if (other.isSetMail()) {
- this.mail = other.mail;
- }
- this.image_read = other.image_read;
- this.image_write = other.image_write;
- this.image_admin = other.image_admin;
- this.image_link = other.image_link;
- this.lecture_read = other.lecture_read;
- this.lecture_write = other.lecture_write;
- this.lecture_admin = other.lecture_admin;
- }
-
- public Person deepCopy() {
- return new Person(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.Nachname = null;
- this.Vorname = null;
- this.mail = null;
- setImage_readIsSet(false);
- this.image_read = false;
- setImage_writeIsSet(false);
- this.image_write = false;
- setImage_adminIsSet(false);
- this.image_admin = false;
- setImage_linkIsSet(false);
- this.image_link = false;
- setLecture_readIsSet(false);
- this.lecture_read = false;
- setLecture_writeIsSet(false);
- this.lecture_write = false;
- setLecture_adminIsSet(false);
- this.lecture_admin = false;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public Person setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getNachname() {
- return this.Nachname;
- }
-
- public Person setNachname(String Nachname) {
- this.Nachname = Nachname;
- return this;
- }
-
- public void unsetNachname() {
- this.Nachname = null;
- }
-
- /** Returns true if field Nachname is set (has been assigned a value) and false otherwise */
- public boolean isSetNachname() {
- return this.Nachname != null;
- }
-
- public void setNachnameIsSet(boolean value) {
- if (!value) {
- this.Nachname = null;
- }
- }
-
- public String getVorname() {
- return this.Vorname;
- }
-
- public Person setVorname(String Vorname) {
- this.Vorname = Vorname;
- return this;
- }
-
- public void unsetVorname() {
- this.Vorname = null;
- }
-
- /** Returns true if field Vorname is set (has been assigned a value) and false otherwise */
- public boolean isSetVorname() {
- return this.Vorname != null;
- }
-
- public void setVornameIsSet(boolean value) {
- if (!value) {
- this.Vorname = null;
- }
- }
-
- public String getMail() {
- return this.mail;
- }
-
- public Person setMail(String mail) {
- this.mail = mail;
- return this;
- }
-
- public void unsetMail() {
- this.mail = null;
- }
-
- /** Returns true if field mail is set (has been assigned a value) and false otherwise */
- public boolean isSetMail() {
- return this.mail != null;
- }
-
- public void setMailIsSet(boolean value) {
- if (!value) {
- this.mail = null;
- }
- }
-
- public boolean isImage_read() {
- return this.image_read;
- }
-
- public Person setImage_read(boolean image_read) {
- this.image_read = image_read;
- setImage_readIsSet(true);
- return this;
- }
-
- public void unsetImage_read() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_READ_ISSET_ID);
- }
-
- /** Returns true if field image_read is set (has been assigned a value) and false otherwise */
- public boolean isSetImage_read() {
- return EncodingUtils.testBit(__isset_bitfield, __IMAGE_READ_ISSET_ID);
- }
-
- public void setImage_readIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_READ_ISSET_ID, value);
- }
-
- public boolean isImage_write() {
- return this.image_write;
- }
-
- public Person setImage_write(boolean image_write) {
- this.image_write = image_write;
- setImage_writeIsSet(true);
- return this;
- }
-
- public void unsetImage_write() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_WRITE_ISSET_ID);
- }
-
- /** Returns true if field image_write is set (has been assigned a value) and false otherwise */
- public boolean isSetImage_write() {
- return EncodingUtils.testBit(__isset_bitfield, __IMAGE_WRITE_ISSET_ID);
- }
-
- public void setImage_writeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_WRITE_ISSET_ID, value);
- }
-
- public boolean isImage_admin() {
- return this.image_admin;
- }
-
- public Person setImage_admin(boolean image_admin) {
- this.image_admin = image_admin;
- setImage_adminIsSet(true);
- return this;
- }
-
- public void unsetImage_admin() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_ADMIN_ISSET_ID);
- }
-
- /** Returns true if field image_admin is set (has been assigned a value) and false otherwise */
- public boolean isSetImage_admin() {
- return EncodingUtils.testBit(__isset_bitfield, __IMAGE_ADMIN_ISSET_ID);
- }
-
- public void setImage_adminIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_ADMIN_ISSET_ID, value);
- }
-
- public boolean isImage_link() {
- return this.image_link;
- }
-
- public Person setImage_link(boolean image_link) {
- this.image_link = image_link;
- setImage_linkIsSet(true);
- return this;
- }
-
- public void unsetImage_link() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IMAGE_LINK_ISSET_ID);
- }
-
- /** Returns true if field image_link is set (has been assigned a value) and false otherwise */
- public boolean isSetImage_link() {
- return EncodingUtils.testBit(__isset_bitfield, __IMAGE_LINK_ISSET_ID);
- }
-
- public void setImage_linkIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IMAGE_LINK_ISSET_ID, value);
- }
-
- public boolean isLecture_read() {
- return this.lecture_read;
- }
-
- public Person setLecture_read(boolean lecture_read) {
- this.lecture_read = lecture_read;
- setLecture_readIsSet(true);
- return this;
- }
-
- public void unsetLecture_read() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LECTURE_READ_ISSET_ID);
- }
-
- /** Returns true if field lecture_read is set (has been assigned a value) and false otherwise */
- public boolean isSetLecture_read() {
- return EncodingUtils.testBit(__isset_bitfield, __LECTURE_READ_ISSET_ID);
- }
-
- public void setLecture_readIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LECTURE_READ_ISSET_ID, value);
- }
-
- public boolean isLecture_write() {
- return this.lecture_write;
- }
-
- public Person setLecture_write(boolean lecture_write) {
- this.lecture_write = lecture_write;
- setLecture_writeIsSet(true);
- return this;
- }
-
- public void unsetLecture_write() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LECTURE_WRITE_ISSET_ID);
- }
-
- /** Returns true if field lecture_write is set (has been assigned a value) and false otherwise */
- public boolean isSetLecture_write() {
- return EncodingUtils.testBit(__isset_bitfield, __LECTURE_WRITE_ISSET_ID);
- }
-
- public void setLecture_writeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LECTURE_WRITE_ISSET_ID, value);
- }
-
- public boolean isLecture_admin() {
- return this.lecture_admin;
- }
-
- public Person setLecture_admin(boolean lecture_admin) {
- this.lecture_admin = lecture_admin;
- setLecture_adminIsSet(true);
- return this;
- }
-
- public void unsetLecture_admin() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LECTURE_ADMIN_ISSET_ID);
- }
-
- /** Returns true if field lecture_admin is set (has been assigned a value) and false otherwise */
- public boolean isSetLecture_admin() {
- return EncodingUtils.testBit(__isset_bitfield, __LECTURE_ADMIN_ISSET_ID);
- }
-
- public void setLecture_adminIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LECTURE_ADMIN_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case NACHNAME:
- if (value == null) {
- unsetNachname();
- } else {
- setNachname((String)value);
- }
- break;
-
- case VORNAME:
- if (value == null) {
- unsetVorname();
- } else {
- setVorname((String)value);
- }
- break;
-
- case MAIL:
- if (value == null) {
- unsetMail();
- } else {
- setMail((String)value);
- }
- break;
-
- case IMAGE_READ:
- if (value == null) {
- unsetImage_read();
- } else {
- setImage_read((Boolean)value);
- }
- break;
-
- case IMAGE_WRITE:
- if (value == null) {
- unsetImage_write();
- } else {
- setImage_write((Boolean)value);
- }
- break;
-
- case IMAGE_ADMIN:
- if (value == null) {
- unsetImage_admin();
- } else {
- setImage_admin((Boolean)value);
- }
- break;
-
- case IMAGE_LINK:
- if (value == null) {
- unsetImage_link();
- } else {
- setImage_link((Boolean)value);
- }
- break;
-
- case LECTURE_READ:
- if (value == null) {
- unsetLecture_read();
- } else {
- setLecture_read((Boolean)value);
- }
- break;
-
- case LECTURE_WRITE:
- if (value == null) {
- unsetLecture_write();
- } else {
- setLecture_write((Boolean)value);
- }
- break;
-
- case LECTURE_ADMIN:
- if (value == null) {
- unsetLecture_admin();
- } else {
- setLecture_admin((Boolean)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case NACHNAME:
- return getNachname();
-
- case VORNAME:
- return getVorname();
-
- case MAIL:
- return getMail();
-
- case IMAGE_READ:
- return Boolean.valueOf(isImage_read());
-
- case IMAGE_WRITE:
- return Boolean.valueOf(isImage_write());
-
- case IMAGE_ADMIN:
- return Boolean.valueOf(isImage_admin());
-
- case IMAGE_LINK:
- return Boolean.valueOf(isImage_link());
-
- case LECTURE_READ:
- return Boolean.valueOf(isLecture_read());
-
- case LECTURE_WRITE:
- return Boolean.valueOf(isLecture_write());
-
- case LECTURE_ADMIN:
- return Boolean.valueOf(isLecture_admin());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case NACHNAME:
- return isSetNachname();
- case VORNAME:
- return isSetVorname();
- case MAIL:
- return isSetMail();
- case IMAGE_READ:
- return isSetImage_read();
- case IMAGE_WRITE:
- return isSetImage_write();
- case IMAGE_ADMIN:
- return isSetImage_admin();
- case IMAGE_LINK:
- return isSetImage_link();
- case LECTURE_READ:
- return isSetLecture_read();
- case LECTURE_WRITE:
- return isSetLecture_write();
- case LECTURE_ADMIN:
- return isSetLecture_admin();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof Person)
- return this.equals((Person)that);
- return false;
- }
-
- public boolean equals(Person that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_Nachname = true && this.isSetNachname();
- boolean that_present_Nachname = true && that.isSetNachname();
- if (this_present_Nachname || that_present_Nachname) {
- if (!(this_present_Nachname && that_present_Nachname))
- return false;
- if (!this.Nachname.equals(that.Nachname))
- return false;
- }
-
- boolean this_present_Vorname = true && this.isSetVorname();
- boolean that_present_Vorname = true && that.isSetVorname();
- if (this_present_Vorname || that_present_Vorname) {
- if (!(this_present_Vorname && that_present_Vorname))
- return false;
- if (!this.Vorname.equals(that.Vorname))
- return false;
- }
-
- boolean this_present_mail = true && this.isSetMail();
- boolean that_present_mail = true && that.isSetMail();
- if (this_present_mail || that_present_mail) {
- if (!(this_present_mail && that_present_mail))
- return false;
- if (!this.mail.equals(that.mail))
- return false;
- }
-
- boolean this_present_image_read = true;
- boolean that_present_image_read = true;
- if (this_present_image_read || that_present_image_read) {
- if (!(this_present_image_read && that_present_image_read))
- return false;
- if (this.image_read != that.image_read)
- return false;
- }
-
- boolean this_present_image_write = true;
- boolean that_present_image_write = true;
- if (this_present_image_write || that_present_image_write) {
- if (!(this_present_image_write && that_present_image_write))
- return false;
- if (this.image_write != that.image_write)
- return false;
- }
-
- boolean this_present_image_admin = true;
- boolean that_present_image_admin = true;
- if (this_present_image_admin || that_present_image_admin) {
- if (!(this_present_image_admin && that_present_image_admin))
- return false;
- if (this.image_admin != that.image_admin)
- return false;
- }
-
- boolean this_present_image_link = true;
- boolean that_present_image_link = true;
- if (this_present_image_link || that_present_image_link) {
- if (!(this_present_image_link && that_present_image_link))
- return false;
- if (this.image_link != that.image_link)
- return false;
- }
-
- boolean this_present_lecture_read = true;
- boolean that_present_lecture_read = true;
- if (this_present_lecture_read || that_present_lecture_read) {
- if (!(this_present_lecture_read && that_present_lecture_read))
- return false;
- if (this.lecture_read != that.lecture_read)
- return false;
- }
-
- boolean this_present_lecture_write = true;
- boolean that_present_lecture_write = true;
- if (this_present_lecture_write || that_present_lecture_write) {
- if (!(this_present_lecture_write && that_present_lecture_write))
- return false;
- if (this.lecture_write != that.lecture_write)
- return false;
- }
-
- boolean this_present_lecture_admin = true;
- boolean that_present_lecture_admin = true;
- if (this_present_lecture_admin || that_present_lecture_admin) {
- if (!(this_present_lecture_admin && that_present_lecture_admin))
- return false;
- if (this.lecture_admin != that.lecture_admin)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(Person other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNachname()).compareTo(other.isSetNachname());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNachname()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Nachname, other.Nachname);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetVorname()).compareTo(other.isSetVorname());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVorname()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Vorname, other.Vorname);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetMail()).compareTo(other.isSetMail());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetMail()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mail, other.mail);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImage_read()).compareTo(other.isSetImage_read());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImage_read()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_read, other.image_read);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImage_write()).compareTo(other.isSetImage_write());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImage_write()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_write, other.image_write);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImage_admin()).compareTo(other.isSetImage_admin());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImage_admin()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_admin, other.image_admin);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImage_link()).compareTo(other.isSetImage_link());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImage_link()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_link, other.image_link);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLecture_read()).compareTo(other.isSetLecture_read());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLecture_read()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture_read, other.lecture_read);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLecture_write()).compareTo(other.isSetLecture_write());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLecture_write()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture_write, other.lecture_write);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLecture_admin()).compareTo(other.isSetLecture_admin());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLecture_admin()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture_admin, other.lecture_admin);
- 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("Person(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Nachname:");
- if (this.Nachname == null) {
- sb.append("null");
- } else {
- sb.append(this.Nachname);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Vorname:");
- if (this.Vorname == null) {
- sb.append("null");
- } else {
- sb.append(this.Vorname);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("mail:");
- if (this.mail == null) {
- sb.append("null");
- } else {
- sb.append(this.mail);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("image_read:");
- sb.append(this.image_read);
- first = false;
- if (!first) sb.append(", ");
- sb.append("image_write:");
- sb.append(this.image_write);
- first = false;
- if (!first) sb.append(", ");
- sb.append("image_admin:");
- sb.append(this.image_admin);
- first = false;
- if (!first) sb.append(", ");
- sb.append("image_link:");
- sb.append(this.image_link);
- first = false;
- if (!first) sb.append(", ");
- sb.append("lecture_read:");
- sb.append(this.lecture_read);
- first = false;
- if (!first) sb.append(", ");
- sb.append("lecture_write:");
- sb.append(this.lecture_write);
- first = false;
- if (!first) sb.append(", ");
- sb.append("lecture_admin:");
- sb.append(this.lecture_admin);
- 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 PersonStandardSchemeFactory implements SchemeFactory {
- public PersonStandardScheme getScheme() {
- return new PersonStandardScheme();
- }
- }
-
- private static class PersonStandardScheme extends StandardScheme<Person> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, Person struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NACHNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Nachname = iprot.readString();
- struct.setNachnameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // VORNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Vorname = iprot.readString();
- struct.setVornameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // MAIL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.mail = iprot.readString();
- struct.setMailIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // IMAGE_READ
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.image_read = iprot.readBool();
- struct.setImage_readIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // IMAGE_WRITE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.image_write = iprot.readBool();
- struct.setImage_writeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // IMAGE_ADMIN
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.image_admin = iprot.readBool();
- struct.setImage_adminIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // IMAGE_LINK
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.image_link = iprot.readBool();
- struct.setImage_linkIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // LECTURE_READ
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.lecture_read = iprot.readBool();
- struct.setLecture_readIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // LECTURE_WRITE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.lecture_write = iprot.readBool();
- struct.setLecture_writeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // LECTURE_ADMIN
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.lecture_admin = iprot.readBool();
- struct.setLecture_adminIsSet(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, Person struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.Nachname != null) {
- oprot.writeFieldBegin(NACHNAME_FIELD_DESC);
- oprot.writeString(struct.Nachname);
- oprot.writeFieldEnd();
- }
- if (struct.Vorname != null) {
- oprot.writeFieldBegin(VORNAME_FIELD_DESC);
- oprot.writeString(struct.Vorname);
- oprot.writeFieldEnd();
- }
- if (struct.mail != null) {
- oprot.writeFieldBegin(MAIL_FIELD_DESC);
- oprot.writeString(struct.mail);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(IMAGE_READ_FIELD_DESC);
- oprot.writeBool(struct.image_read);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IMAGE_WRITE_FIELD_DESC);
- oprot.writeBool(struct.image_write);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IMAGE_ADMIN_FIELD_DESC);
- oprot.writeBool(struct.image_admin);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IMAGE_LINK_FIELD_DESC);
- oprot.writeBool(struct.image_link);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(LECTURE_READ_FIELD_DESC);
- oprot.writeBool(struct.lecture_read);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(LECTURE_WRITE_FIELD_DESC);
- oprot.writeBool(struct.lecture_write);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(LECTURE_ADMIN_FIELD_DESC);
- oprot.writeBool(struct.lecture_admin);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class PersonTupleSchemeFactory implements SchemeFactory {
- public PersonTupleScheme getScheme() {
- return new PersonTupleScheme();
- }
- }
-
- private static class PersonTupleScheme extends TupleScheme<Person> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Person struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetNachname()) {
- optionals.set(1);
- }
- if (struct.isSetVorname()) {
- optionals.set(2);
- }
- if (struct.isSetMail()) {
- optionals.set(3);
- }
- if (struct.isSetImage_read()) {
- optionals.set(4);
- }
- if (struct.isSetImage_write()) {
- optionals.set(5);
- }
- if (struct.isSetImage_admin()) {
- optionals.set(6);
- }
- if (struct.isSetImage_link()) {
- optionals.set(7);
- }
- if (struct.isSetLecture_read()) {
- optionals.set(8);
- }
- if (struct.isSetLecture_write()) {
- optionals.set(9);
- }
- if (struct.isSetLecture_admin()) {
- optionals.set(10);
- }
- oprot.writeBitSet(optionals, 11);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetNachname()) {
- oprot.writeString(struct.Nachname);
- }
- if (struct.isSetVorname()) {
- oprot.writeString(struct.Vorname);
- }
- if (struct.isSetMail()) {
- oprot.writeString(struct.mail);
- }
- if (struct.isSetImage_read()) {
- oprot.writeBool(struct.image_read);
- }
- if (struct.isSetImage_write()) {
- oprot.writeBool(struct.image_write);
- }
- if (struct.isSetImage_admin()) {
- oprot.writeBool(struct.image_admin);
- }
- if (struct.isSetImage_link()) {
- oprot.writeBool(struct.image_link);
- }
- if (struct.isSetLecture_read()) {
- oprot.writeBool(struct.lecture_read);
- }
- if (struct.isSetLecture_write()) {
- oprot.writeBool(struct.lecture_write);
- }
- if (struct.isSetLecture_admin()) {
- oprot.writeBool(struct.lecture_admin);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Person struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(11);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.Nachname = iprot.readString();
- struct.setNachnameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.Vorname = iprot.readString();
- struct.setVornameIsSet(true);
- }
- if (incoming.get(3)) {
- struct.mail = iprot.readString();
- struct.setMailIsSet(true);
- }
- if (incoming.get(4)) {
- struct.image_read = iprot.readBool();
- struct.setImage_readIsSet(true);
- }
- if (incoming.get(5)) {
- struct.image_write = iprot.readBool();
- struct.setImage_writeIsSet(true);
- }
- if (incoming.get(6)) {
- struct.image_admin = iprot.readBool();
- struct.setImage_adminIsSet(true);
- }
- if (incoming.get(7)) {
- struct.image_link = iprot.readBool();
- struct.setImage_linkIsSet(true);
- }
- if (incoming.get(8)) {
- struct.lecture_read = iprot.readBool();
- struct.setLecture_readIsSet(true);
- }
- if (incoming.get(9)) {
- struct.lecture_write = iprot.readBool();
- struct.setLecture_writeIsSet(true);
- }
- if (incoming.get(10)) {
- struct.lecture_admin = iprot.readBool();
- struct.setLecture_adminIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/sat/thrift/iface/Server.java b/src/main/java/org/openslx/sat/thrift/iface/Server.java
deleted file mode 100644
index 4d7a286..0000000
--- a/src/main/java/org/openslx/sat/thrift/iface/Server.java
+++ /dev/null
@@ -1,55510 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.sat.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Server {
-
- public interface Iface {
-
- public long getVersion() throws org.apache.thrift.TException;
-
- public User getFtpUser(String token) throws org.apache.thrift.TException;
-
- public boolean authenticated(String token) throws org.apache.thrift.TException;
-
- public boolean setSessionInvalid(String token) throws org.apache.thrift.TException;
-
- public long DeleteFtpUser(String user, String token) throws org.apache.thrift.TException;
-
- public String getPathOfImage(String image_id, String version, String token) throws org.apache.thrift.TException;
-
- public String setInstitution(String university, String token) throws org.apache.thrift.TException;
-
- public boolean writeVLdata(String imagename, String desc, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, String token, String userID) throws org.apache.thrift.TException;
-
- public List<Image> getImageListPermissionWrite(String userID, String token) throws org.apache.thrift.TException;
-
- public List<Image> getImageListPermissionRead(String userID, String token) throws org.apache.thrift.TException;
-
- public List<Image> getImageListPermissionLink(String userID, String token) throws org.apache.thrift.TException;
-
- public List<Image> getImageListPermissionAdmin(String userID, String token) throws org.apache.thrift.TException;
-
- public List<Image> getImageListAllTemplates(String token) throws org.apache.thrift.TException;
-
- public List<Image> getImageList(String userID, String token) throws org.apache.thrift.TException;
-
- public List<Lecture> getLectureList(String token) throws org.apache.thrift.TException;
-
- public List<Lecture> getLectureListPermissionRead(String token) throws org.apache.thrift.TException;
-
- public List<Lecture> getLectureListPermissionWrite(String token) throws org.apache.thrift.TException;
-
- public List<Lecture> getLectureListPermissionAdmin(String token) throws org.apache.thrift.TException;
-
- public List<String> getAllOS(String token) throws org.apache.thrift.TException;
-
- public List<String> getAllUniversities(String token) throws org.apache.thrift.TException;
-
- public Map<String,String> getPersonData(String Vorname, String Nachname, String token) throws org.apache.thrift.TException;
-
- public Map<String,String> getItemOwner(String itemID, String token) throws org.apache.thrift.TException;
-
- public void setPerson(String userID, String token, String institution) throws org.apache.thrift.TException;
-
- public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String token, String Tel, String Fak, String lectureID, String university) throws org.apache.thrift.TException;
-
- public boolean startFileCopy(String file, String token) throws org.apache.thrift.TException;
-
- public Map<String,String> getImageData(String imageid, String imageversion, String token) throws org.apache.thrift.TException;
-
- public Map<String,String> getLectureData(String lectureid, String token) throws org.apache.thrift.TException;
-
- public boolean updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, String token) throws org.apache.thrift.TException;
-
- public boolean deleteImageData(String id, String version, String token) throws org.apache.thrift.TException;
-
- public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imageid, String imageversion, String token, String Tel, String Fak, String id, String university) throws org.apache.thrift.TException;
-
- public boolean deleteImageServer(String id, String version, String token) throws org.apache.thrift.TException;
-
- public boolean deleteImageByPath(String image_path) throws org.apache.thrift.TException;
-
- public boolean connectedToLecture(String id, String version, String token) throws org.apache.thrift.TException;
-
- public boolean deleteLecture(String id, String token, String university) throws org.apache.thrift.TException;
-
- public boolean checkUser(String username, String token) throws org.apache.thrift.TException;
-
- public boolean createUser(String token, String university) throws org.apache.thrift.TException;
-
- public boolean writeImageRights(String imagename, String token, String role, String university, String userID) throws org.apache.thrift.TException;
-
- public boolean writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, String token) throws org.apache.thrift.TException;
-
- public boolean writeLectureRights(String lectureID, String role, String token, String university, String userID) throws org.apache.thrift.TException;
-
- public boolean writeAdditionalLectureRights(String lectureName, String userID, boolean isRead, boolean isWrite, boolean isAdmin, String token) throws org.apache.thrift.TException;
-
- public List<Person> getAllOtherSatelliteUsers(List<String> userID, String token) throws org.apache.thrift.TException;
-
- public List<Person> getPermissionForUserAndImage(String token, String imageID, String userID) throws org.apache.thrift.TException;
-
- public List<String> getAdditionalImageContacts(String imageID, String token) throws org.apache.thrift.TException;
-
- public List<Person> getPermissionForUserAndLecture(String token, String lectureID, String userID) throws org.apache.thrift.TException;
-
- public void deleteAllAdditionalImagePermissions(String imageID, String token, String userID) throws org.apache.thrift.TException;
-
- public void deleteAllAdditionalLecturePermissions(String lectureID, String token, String userID) throws org.apache.thrift.TException;
-
- public String getOsNameForGuestOs(String guestOS, String token) throws org.apache.thrift.TException;
-
- public boolean userIsImageAdmin(String imageID, String token, String userID) throws org.apache.thrift.TException;
-
- public boolean userIsLectureAdmin(String userID, String lectureID, String token) throws org.apache.thrift.TException;
-
- public String createRandomUUID(String token) throws org.apache.thrift.TException;
-
- public String getInstitutionByID(String institutionID) throws org.apache.thrift.TException;
-
- }
-
- public interface AsyncIface {
-
- public void getVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getFtpUser(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void authenticated(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void setSessionInvalid(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void DeleteFtpUser(String user, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPathOfImage(String image_id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void setInstitution(String university, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void writeVLdata(String imagename, String desc, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImageListPermissionWrite(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImageListPermissionRead(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImageListPermissionLink(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImageListPermissionAdmin(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImageListAllTemplates(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImageList(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getLectureList(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getLectureListPermissionRead(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getLectureListPermissionWrite(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getLectureListPermissionAdmin(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getAllOS(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getAllUniversities(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPersonData(String Vorname, String Nachname, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getItemOwner(String itemID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void setPerson(String userID, String token, String institution, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String token, String Tel, String Fak, String lectureID, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void startFileCopy(String file, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getImageData(String imageid, String imageversion, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getLectureData(String lectureid, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteImageData(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imageid, String imageversion, String token, String Tel, String Fak, String id, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteImageServer(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteImageByPath(String image_path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void connectedToLecture(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteLecture(String id, String token, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void checkUser(String username, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void createUser(String token, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void writeImageRights(String imagename, String token, String role, String university, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void writeLectureRights(String lectureID, String role, String token, String university, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void writeAdditionalLectureRights(String lectureName, String userID, boolean isRead, boolean isWrite, boolean isAdmin, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getAllOtherSatelliteUsers(List<String> userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPermissionForUserAndImage(String token, String imageID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getAdditionalImageContacts(String imageID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getPermissionForUserAndLecture(String token, String lectureID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteAllAdditionalImagePermissions(String imageID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void deleteAllAdditionalLecturePermissions(String lectureID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getOsNameForGuestOs(String guestOS, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void userIsImageAdmin(String imageID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void userIsLectureAdmin(String userID, String lectureID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void createRandomUUID(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- public void getInstitutionByID(String institutionID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
-
- }
-
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
- public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
- public Factory() {}
- public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
- return new Client(prot);
- }
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- return new Client(iprot, oprot);
- }
- }
-
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
- super(prot, prot);
- }
-
- public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
- super(iprot, oprot);
- }
-
- public long getVersion() throws org.apache.thrift.TException
- {
- send_getVersion();
- return recv_getVersion();
- }
-
- public void send_getVersion() throws org.apache.thrift.TException
- {
- getVersion_args args = new getVersion_args();
- sendBase("getVersion", args);
- }
-
- public long recv_getVersion() throws org.apache.thrift.TException
- {
- getVersion_result result = new getVersion_result();
- receiveBase(result, "getVersion");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result");
- }
-
- public User getFtpUser(String token) throws org.apache.thrift.TException
- {
- send_getFtpUser(token);
- return recv_getFtpUser();
- }
-
- public void send_getFtpUser(String token) throws org.apache.thrift.TException
- {
- getFtpUser_args args = new getFtpUser_args();
- args.setToken(token);
- sendBase("getFtpUser", args);
- }
-
- public User recv_getFtpUser() throws org.apache.thrift.TException
- {
- getFtpUser_result result = new getFtpUser_result();
- receiveBase(result, "getFtpUser");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFtpUser failed: unknown result");
- }
-
- public boolean authenticated(String token) throws org.apache.thrift.TException
- {
- send_authenticated(token);
- return recv_authenticated();
- }
-
- public void send_authenticated(String token) throws org.apache.thrift.TException
- {
- authenticated_args args = new authenticated_args();
- args.setToken(token);
- sendBase("authenticated", args);
- }
-
- public boolean recv_authenticated() throws org.apache.thrift.TException
- {
- authenticated_result result = new authenticated_result();
- receiveBase(result, "authenticated");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticated failed: unknown result");
- }
-
- public boolean setSessionInvalid(String token) throws org.apache.thrift.TException
- {
- send_setSessionInvalid(token);
- return recv_setSessionInvalid();
- }
-
- public void send_setSessionInvalid(String token) throws org.apache.thrift.TException
- {
- setSessionInvalid_args args = new setSessionInvalid_args();
- args.setToken(token);
- sendBase("setSessionInvalid", args);
- }
-
- public boolean recv_setSessionInvalid() throws org.apache.thrift.TException
- {
- setSessionInvalid_result result = new setSessionInvalid_result();
- receiveBase(result, "setSessionInvalid");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setSessionInvalid failed: unknown result");
- }
-
- public long DeleteFtpUser(String user, String token) throws org.apache.thrift.TException
- {
- send_DeleteFtpUser(user, token);
- return recv_DeleteFtpUser();
- }
-
- public void send_DeleteFtpUser(String user, String token) throws org.apache.thrift.TException
- {
- DeleteFtpUser_args args = new DeleteFtpUser_args();
- args.setUser(user);
- args.setToken(token);
- sendBase("DeleteFtpUser", args);
- }
-
- public long recv_DeleteFtpUser() throws org.apache.thrift.TException
- {
- DeleteFtpUser_result result = new DeleteFtpUser_result();
- receiveBase(result, "DeleteFtpUser");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "DeleteFtpUser failed: unknown result");
- }
-
- public String getPathOfImage(String image_id, String version, String token) throws org.apache.thrift.TException
- {
- send_getPathOfImage(image_id, version, token);
- return recv_getPathOfImage();
- }
-
- public void send_getPathOfImage(String image_id, String version, String token) throws org.apache.thrift.TException
- {
- getPathOfImage_args args = new getPathOfImage_args();
- args.setImage_id(image_id);
- args.setVersion(version);
- args.setToken(token);
- sendBase("getPathOfImage", args);
- }
-
- public String recv_getPathOfImage() throws org.apache.thrift.TException
- {
- getPathOfImage_result result = new getPathOfImage_result();
- receiveBase(result, "getPathOfImage");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPathOfImage failed: unknown result");
- }
-
- public String setInstitution(String university, String token) throws org.apache.thrift.TException
- {
- send_setInstitution(university, token);
- return recv_setInstitution();
- }
-
- public void send_setInstitution(String university, String token) throws org.apache.thrift.TException
- {
- setInstitution_args args = new setInstitution_args();
- args.setUniversity(university);
- args.setToken(token);
- sendBase("setInstitution", args);
- }
-
- public String recv_setInstitution() throws org.apache.thrift.TException
- {
- setInstitution_result result = new setInstitution_result();
- receiveBase(result, "setInstitution");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setInstitution failed: unknown result");
- }
-
- public boolean writeVLdata(String imagename, String desc, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, String token, String userID) throws org.apache.thrift.TException
- {
- send_writeVLdata(imagename, desc, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os, uid, token, userID);
- return recv_writeVLdata();
- }
-
- public void send_writeVLdata(String imagename, String desc, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, String token, String userID) throws org.apache.thrift.TException
- {
- writeVLdata_args args = new writeVLdata_args();
- args.setImagename(imagename);
- args.setDesc(desc);
- args.setTel(Tel);
- args.setFak(Fak);
- args.setLicense(license);
- args.setInternet(internet);
- args.setRam(ram);
- args.setCpu(cpu);
- args.setImagePath(imagePath);
- args.setIsTemplate(isTemplate);
- args.setFilesize(filesize);
- args.setShareMode(shareMode);
- args.setOs(os);
- args.setUid(uid);
- args.setToken(token);
- args.setUserID(userID);
- sendBase("writeVLdata", args);
- }
-
- public boolean recv_writeVLdata() throws org.apache.thrift.TException
- {
- writeVLdata_result result = new writeVLdata_result();
- receiveBase(result, "writeVLdata");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeVLdata failed: unknown result");
- }
-
- public List<Image> getImageListPermissionWrite(String userID, String token) throws org.apache.thrift.TException
- {
- send_getImageListPermissionWrite(userID, token);
- return recv_getImageListPermissionWrite();
- }
-
- public void send_getImageListPermissionWrite(String userID, String token) throws org.apache.thrift.TException
- {
- getImageListPermissionWrite_args args = new getImageListPermissionWrite_args();
- args.setUserID(userID);
- args.setToken(token);
- sendBase("getImageListPermissionWrite", args);
- }
-
- public List<Image> recv_getImageListPermissionWrite() throws org.apache.thrift.TException
- {
- getImageListPermissionWrite_result result = new getImageListPermissionWrite_result();
- receiveBase(result, "getImageListPermissionWrite");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageListPermissionWrite failed: unknown result");
- }
-
- public List<Image> getImageListPermissionRead(String userID, String token) throws org.apache.thrift.TException
- {
- send_getImageListPermissionRead(userID, token);
- return recv_getImageListPermissionRead();
- }
-
- public void send_getImageListPermissionRead(String userID, String token) throws org.apache.thrift.TException
- {
- getImageListPermissionRead_args args = new getImageListPermissionRead_args();
- args.setUserID(userID);
- args.setToken(token);
- sendBase("getImageListPermissionRead", args);
- }
-
- public List<Image> recv_getImageListPermissionRead() throws org.apache.thrift.TException
- {
- getImageListPermissionRead_result result = new getImageListPermissionRead_result();
- receiveBase(result, "getImageListPermissionRead");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageListPermissionRead failed: unknown result");
- }
-
- public List<Image> getImageListPermissionLink(String userID, String token) throws org.apache.thrift.TException
- {
- send_getImageListPermissionLink(userID, token);
- return recv_getImageListPermissionLink();
- }
-
- public void send_getImageListPermissionLink(String userID, String token) throws org.apache.thrift.TException
- {
- getImageListPermissionLink_args args = new getImageListPermissionLink_args();
- args.setUserID(userID);
- args.setToken(token);
- sendBase("getImageListPermissionLink", args);
- }
-
- public List<Image> recv_getImageListPermissionLink() throws org.apache.thrift.TException
- {
- getImageListPermissionLink_result result = new getImageListPermissionLink_result();
- receiveBase(result, "getImageListPermissionLink");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageListPermissionLink failed: unknown result");
- }
-
- public List<Image> getImageListPermissionAdmin(String userID, String token) throws org.apache.thrift.TException
- {
- send_getImageListPermissionAdmin(userID, token);
- return recv_getImageListPermissionAdmin();
- }
-
- public void send_getImageListPermissionAdmin(String userID, String token) throws org.apache.thrift.TException
- {
- getImageListPermissionAdmin_args args = new getImageListPermissionAdmin_args();
- args.setUserID(userID);
- args.setToken(token);
- sendBase("getImageListPermissionAdmin", args);
- }
-
- public List<Image> recv_getImageListPermissionAdmin() throws org.apache.thrift.TException
- {
- getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_result();
- receiveBase(result, "getImageListPermissionAdmin");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageListPermissionAdmin failed: unknown result");
- }
-
- public List<Image> getImageListAllTemplates(String token) throws org.apache.thrift.TException
- {
- send_getImageListAllTemplates(token);
- return recv_getImageListAllTemplates();
- }
-
- public void send_getImageListAllTemplates(String token) throws org.apache.thrift.TException
- {
- getImageListAllTemplates_args args = new getImageListAllTemplates_args();
- args.setToken(token);
- sendBase("getImageListAllTemplates", args);
- }
-
- public List<Image> recv_getImageListAllTemplates() throws org.apache.thrift.TException
- {
- getImageListAllTemplates_result result = new getImageListAllTemplates_result();
- receiveBase(result, "getImageListAllTemplates");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageListAllTemplates failed: unknown result");
- }
-
- public List<Image> getImageList(String userID, String token) throws org.apache.thrift.TException
- {
- send_getImageList(userID, token);
- return recv_getImageList();
- }
-
- public void send_getImageList(String userID, String token) throws org.apache.thrift.TException
- {
- getImageList_args args = new getImageList_args();
- args.setUserID(userID);
- args.setToken(token);
- sendBase("getImageList", args);
- }
-
- public List<Image> recv_getImageList() throws org.apache.thrift.TException
- {
- getImageList_result result = new getImageList_result();
- receiveBase(result, "getImageList");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageList failed: unknown result");
- }
-
- public List<Lecture> getLectureList(String token) throws org.apache.thrift.TException
- {
- send_getLectureList(token);
- return recv_getLectureList();
- }
-
- public void send_getLectureList(String token) throws org.apache.thrift.TException
- {
- getLectureList_args args = new getLectureList_args();
- args.setToken(token);
- sendBase("getLectureList", args);
- }
-
- public List<Lecture> recv_getLectureList() throws org.apache.thrift.TException
- {
- getLectureList_result result = new getLectureList_result();
- receiveBase(result, "getLectureList");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureList failed: unknown result");
- }
-
- public List<Lecture> getLectureListPermissionRead(String token) throws org.apache.thrift.TException
- {
- send_getLectureListPermissionRead(token);
- return recv_getLectureListPermissionRead();
- }
-
- public void send_getLectureListPermissionRead(String token) throws org.apache.thrift.TException
- {
- getLectureListPermissionRead_args args = new getLectureListPermissionRead_args();
- args.setToken(token);
- sendBase("getLectureListPermissionRead", args);
- }
-
- public List<Lecture> recv_getLectureListPermissionRead() throws org.apache.thrift.TException
- {
- getLectureListPermissionRead_result result = new getLectureListPermissionRead_result();
- receiveBase(result, "getLectureListPermissionRead");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureListPermissionRead failed: unknown result");
- }
-
- public List<Lecture> getLectureListPermissionWrite(String token) throws org.apache.thrift.TException
- {
- send_getLectureListPermissionWrite(token);
- return recv_getLectureListPermissionWrite();
- }
-
- public void send_getLectureListPermissionWrite(String token) throws org.apache.thrift.TException
- {
- getLectureListPermissionWrite_args args = new getLectureListPermissionWrite_args();
- args.setToken(token);
- sendBase("getLectureListPermissionWrite", args);
- }
-
- public List<Lecture> recv_getLectureListPermissionWrite() throws org.apache.thrift.TException
- {
- getLectureListPermissionWrite_result result = new getLectureListPermissionWrite_result();
- receiveBase(result, "getLectureListPermissionWrite");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureListPermissionWrite failed: unknown result");
- }
-
- public List<Lecture> getLectureListPermissionAdmin(String token) throws org.apache.thrift.TException
- {
- send_getLectureListPermissionAdmin(token);
- return recv_getLectureListPermissionAdmin();
- }
-
- public void send_getLectureListPermissionAdmin(String token) throws org.apache.thrift.TException
- {
- getLectureListPermissionAdmin_args args = new getLectureListPermissionAdmin_args();
- args.setToken(token);
- sendBase("getLectureListPermissionAdmin", args);
- }
-
- public List<Lecture> recv_getLectureListPermissionAdmin() throws org.apache.thrift.TException
- {
- getLectureListPermissionAdmin_result result = new getLectureListPermissionAdmin_result();
- receiveBase(result, "getLectureListPermissionAdmin");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureListPermissionAdmin failed: unknown result");
- }
-
- public List<String> getAllOS(String token) throws org.apache.thrift.TException
- {
- send_getAllOS(token);
- return recv_getAllOS();
- }
-
- public void send_getAllOS(String token) throws org.apache.thrift.TException
- {
- getAllOS_args args = new getAllOS_args();
- args.setToken(token);
- sendBase("getAllOS", args);
- }
-
- public List<String> recv_getAllOS() throws org.apache.thrift.TException
- {
- getAllOS_result result = new getAllOS_result();
- receiveBase(result, "getAllOS");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOS failed: unknown result");
- }
-
- public List<String> getAllUniversities(String token) throws org.apache.thrift.TException
- {
- send_getAllUniversities(token);
- return recv_getAllUniversities();
- }
-
- public void send_getAllUniversities(String token) throws org.apache.thrift.TException
- {
- getAllUniversities_args args = new getAllUniversities_args();
- args.setToken(token);
- sendBase("getAllUniversities", args);
- }
-
- public List<String> recv_getAllUniversities() throws org.apache.thrift.TException
- {
- getAllUniversities_result result = new getAllUniversities_result();
- receiveBase(result, "getAllUniversities");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUniversities failed: unknown result");
- }
-
- public Map<String,String> getPersonData(String Vorname, String Nachname, String token) throws org.apache.thrift.TException
- {
- send_getPersonData(Vorname, Nachname, token);
- return recv_getPersonData();
- }
-
- public void send_getPersonData(String Vorname, String Nachname, String token) throws org.apache.thrift.TException
- {
- getPersonData_args args = new getPersonData_args();
- args.setVorname(Vorname);
- args.setNachname(Nachname);
- args.setToken(token);
- sendBase("getPersonData", args);
- }
-
- public Map<String,String> recv_getPersonData() throws org.apache.thrift.TException
- {
- getPersonData_result result = new getPersonData_result();
- receiveBase(result, "getPersonData");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPersonData failed: unknown result");
- }
-
- public Map<String,String> getItemOwner(String itemID, String token) throws org.apache.thrift.TException
- {
- send_getItemOwner(itemID, token);
- return recv_getItemOwner();
- }
-
- public void send_getItemOwner(String itemID, String token) throws org.apache.thrift.TException
- {
- getItemOwner_args args = new getItemOwner_args();
- args.setItemID(itemID);
- args.setToken(token);
- sendBase("getItemOwner", args);
- }
-
- public Map<String,String> recv_getItemOwner() throws org.apache.thrift.TException
- {
- getItemOwner_result result = new getItemOwner_result();
- receiveBase(result, "getItemOwner");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemOwner failed: unknown result");
- }
-
- public void setPerson(String userID, String token, String institution) throws org.apache.thrift.TException
- {
- send_setPerson(userID, token, institution);
- recv_setPerson();
- }
-
- public void send_setPerson(String userID, String token, String institution) throws org.apache.thrift.TException
- {
- setPerson_args args = new setPerson_args();
- args.setUserID(userID);
- args.setToken(token);
- args.setInstitution(institution);
- sendBase("setPerson", args);
- }
-
- public void recv_setPerson() throws org.apache.thrift.TException
- {
- setPerson_result result = new setPerson_result();
- receiveBase(result, "setPerson");
- return;
- }
-
- public boolean writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String token, String Tel, String Fak, String lectureID, String university) throws org.apache.thrift.TException
- {
- send_writeLecturedata(name, shortdesc, desc, startDate, endDate, isActive, imagename, token, Tel, Fak, lectureID, university);
- return recv_writeLecturedata();
- }
-
- public void send_writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String token, String Tel, String Fak, String lectureID, String university) throws org.apache.thrift.TException
- {
- writeLecturedata_args args = new writeLecturedata_args();
- args.setName(name);
- args.setShortdesc(shortdesc);
- args.setDesc(desc);
- args.setStartDate(startDate);
- args.setEndDate(endDate);
- args.setIsActive(isActive);
- args.setImagename(imagename);
- args.setToken(token);
- args.setTel(Tel);
- args.setFak(Fak);
- args.setLectureID(lectureID);
- args.setUniversity(university);
- sendBase("writeLecturedata", args);
- }
-
- public boolean recv_writeLecturedata() throws org.apache.thrift.TException
- {
- writeLecturedata_result result = new writeLecturedata_result();
- receiveBase(result, "writeLecturedata");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeLecturedata failed: unknown result");
- }
-
- public boolean startFileCopy(String file, String token) throws org.apache.thrift.TException
- {
- send_startFileCopy(file, token);
- return recv_startFileCopy();
- }
-
- public void send_startFileCopy(String file, String token) throws org.apache.thrift.TException
- {
- startFileCopy_args args = new startFileCopy_args();
- args.setFile(file);
- args.setToken(token);
- sendBase("startFileCopy", args);
- }
-
- public boolean recv_startFileCopy() throws org.apache.thrift.TException
- {
- startFileCopy_result result = new startFileCopy_result();
- receiveBase(result, "startFileCopy");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startFileCopy failed: unknown result");
- }
-
- public Map<String,String> getImageData(String imageid, String imageversion, String token) throws org.apache.thrift.TException
- {
- send_getImageData(imageid, imageversion, token);
- return recv_getImageData();
- }
-
- public void send_getImageData(String imageid, String imageversion, String token) throws org.apache.thrift.TException
- {
- getImageData_args args = new getImageData_args();
- args.setImageid(imageid);
- args.setImageversion(imageversion);
- args.setToken(token);
- sendBase("getImageData", args);
- }
-
- public Map<String,String> recv_getImageData() throws org.apache.thrift.TException
- {
- getImageData_result result = new getImageData_result();
- receiveBase(result, "getImageData");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageData failed: unknown result");
- }
-
- public Map<String,String> getLectureData(String lectureid, String token) throws org.apache.thrift.TException
- {
- send_getLectureData(lectureid, token);
- return recv_getLectureData();
- }
-
- public void send_getLectureData(String lectureid, String token) throws org.apache.thrift.TException
- {
- getLectureData_args args = new getLectureData_args();
- args.setLectureid(lectureid);
- args.setToken(token);
- sendBase("getLectureData", args);
- }
-
- public Map<String,String> recv_getLectureData() throws org.apache.thrift.TException
- {
- getLectureData_result result = new getLectureData_result();
- receiveBase(result, "getLectureData");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureData failed: unknown result");
- }
-
- public boolean updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, String token) throws org.apache.thrift.TException
- {
- send_updateImageData(name, newName, desc, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode, os, token);
- return recv_updateImageData();
- }
-
- public void send_updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, String token) throws org.apache.thrift.TException
- {
- updateImageData_args args = new updateImageData_args();
- args.setName(name);
- args.setNewName(newName);
- args.setDesc(desc);
- args.setImage_path(image_path);
- args.setLicense(license);
- args.setInternet(internet);
- args.setRam(ram);
- args.setCpu(cpu);
- args.setId(id);
- args.setVersion(version);
- args.setIsTemplate(isTemplate);
- args.setFilesize(filesize);
- args.setShareMode(shareMode);
- args.setOs(os);
- args.setToken(token);
- sendBase("updateImageData", args);
- }
-
- public boolean recv_updateImageData() throws org.apache.thrift.TException
- {
- updateImageData_result result = new updateImageData_result();
- receiveBase(result, "updateImageData");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageData failed: unknown result");
- }
-
- public boolean deleteImageData(String id, String version, String token) throws org.apache.thrift.TException
- {
- send_deleteImageData(id, version, token);
- return recv_deleteImageData();
- }
-
- public void send_deleteImageData(String id, String version, String token) throws org.apache.thrift.TException
- {
- deleteImageData_args args = new deleteImageData_args();
- args.setId(id);
- args.setVersion(version);
- args.setToken(token);
- sendBase("deleteImageData", args);
- }
-
- public boolean recv_deleteImageData() throws org.apache.thrift.TException
- {
- deleteImageData_result result = new deleteImageData_result();
- receiveBase(result, "deleteImageData");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteImageData failed: unknown result");
- }
-
- public boolean updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imageid, String imageversion, String token, String Tel, String Fak, String id, String university) throws org.apache.thrift.TException
- {
- send_updateLecturedata(name, newName, shortdesc, desc, startDate, endDate, isActive, imageid, imageversion, token, Tel, Fak, id, university);
- return recv_updateLecturedata();
- }
-
- public void send_updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imageid, String imageversion, String token, String Tel, String Fak, String id, String university) throws org.apache.thrift.TException
- {
- updateLecturedata_args args = new updateLecturedata_args();
- args.setName(name);
- args.setNewName(newName);
- args.setShortdesc(shortdesc);
- args.setDesc(desc);
- args.setStartDate(startDate);
- args.setEndDate(endDate);
- args.setIsActive(isActive);
- args.setImageid(imageid);
- args.setImageversion(imageversion);
- args.setToken(token);
- args.setTel(Tel);
- args.setFak(Fak);
- args.setId(id);
- args.setUniversity(university);
- sendBase("updateLecturedata", args);
- }
-
- public boolean recv_updateLecturedata() throws org.apache.thrift.TException
- {
- updateLecturedata_result result = new updateLecturedata_result();
- receiveBase(result, "updateLecturedata");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateLecturedata failed: unknown result");
- }
-
- public boolean deleteImageServer(String id, String version, String token) throws org.apache.thrift.TException
- {
- send_deleteImageServer(id, version, token);
- return recv_deleteImageServer();
- }
-
- public void send_deleteImageServer(String id, String version, String token) throws org.apache.thrift.TException
- {
- deleteImageServer_args args = new deleteImageServer_args();
- args.setId(id);
- args.setVersion(version);
- args.setToken(token);
- sendBase("deleteImageServer", args);
- }
-
- public boolean recv_deleteImageServer() throws org.apache.thrift.TException
- {
- deleteImageServer_result result = new deleteImageServer_result();
- receiveBase(result, "deleteImageServer");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteImageServer failed: unknown result");
- }
-
- public boolean deleteImageByPath(String image_path) throws org.apache.thrift.TException
- {
- send_deleteImageByPath(image_path);
- return recv_deleteImageByPath();
- }
-
- public void send_deleteImageByPath(String image_path) throws org.apache.thrift.TException
- {
- deleteImageByPath_args args = new deleteImageByPath_args();
- args.setImage_path(image_path);
- sendBase("deleteImageByPath", args);
- }
-
- public boolean recv_deleteImageByPath() throws org.apache.thrift.TException
- {
- deleteImageByPath_result result = new deleteImageByPath_result();
- receiveBase(result, "deleteImageByPath");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteImageByPath failed: unknown result");
- }
-
- public boolean connectedToLecture(String id, String version, String token) throws org.apache.thrift.TException
- {
- send_connectedToLecture(id, version, token);
- return recv_connectedToLecture();
- }
-
- public void send_connectedToLecture(String id, String version, String token) throws org.apache.thrift.TException
- {
- connectedToLecture_args args = new connectedToLecture_args();
- args.setId(id);
- args.setVersion(version);
- args.setToken(token);
- sendBase("connectedToLecture", args);
- }
-
- public boolean recv_connectedToLecture() throws org.apache.thrift.TException
- {
- connectedToLecture_result result = new connectedToLecture_result();
- receiveBase(result, "connectedToLecture");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "connectedToLecture failed: unknown result");
- }
-
- public boolean deleteLecture(String id, String token, String university) throws org.apache.thrift.TException
- {
- send_deleteLecture(id, token, university);
- return recv_deleteLecture();
- }
-
- public void send_deleteLecture(String id, String token, String university) throws org.apache.thrift.TException
- {
- deleteLecture_args args = new deleteLecture_args();
- args.setId(id);
- args.setToken(token);
- args.setUniversity(university);
- sendBase("deleteLecture", args);
- }
-
- public boolean recv_deleteLecture() throws org.apache.thrift.TException
- {
- deleteLecture_result result = new deleteLecture_result();
- receiveBase(result, "deleteLecture");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteLecture failed: unknown result");
- }
-
- public boolean checkUser(String username, String token) throws org.apache.thrift.TException
- {
- send_checkUser(username, token);
- return recv_checkUser();
- }
-
- public void send_checkUser(String username, String token) throws org.apache.thrift.TException
- {
- checkUser_args args = new checkUser_args();
- args.setUsername(username);
- args.setToken(token);
- sendBase("checkUser", args);
- }
-
- public boolean recv_checkUser() throws org.apache.thrift.TException
- {
- checkUser_result result = new checkUser_result();
- receiveBase(result, "checkUser");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkUser failed: unknown result");
- }
-
- public boolean createUser(String token, String university) throws org.apache.thrift.TException
- {
- send_createUser(token, university);
- return recv_createUser();
- }
-
- public void send_createUser(String token, String university) throws org.apache.thrift.TException
- {
- createUser_args args = new createUser_args();
- args.setToken(token);
- args.setUniversity(university);
- sendBase("createUser", args);
- }
-
- public boolean recv_createUser() throws org.apache.thrift.TException
- {
- createUser_result result = new createUser_result();
- receiveBase(result, "createUser");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
- }
-
- public boolean writeImageRights(String imagename, String token, String role, String university, String userID) throws org.apache.thrift.TException
- {
- send_writeImageRights(imagename, token, role, university, userID);
- return recv_writeImageRights();
- }
-
- public void send_writeImageRights(String imagename, String token, String role, String university, String userID) throws org.apache.thrift.TException
- {
- writeImageRights_args args = new writeImageRights_args();
- args.setImagename(imagename);
- args.setToken(token);
- args.setRole(role);
- args.setUniversity(university);
- args.setUserID(userID);
- sendBase("writeImageRights", args);
- }
-
- public boolean recv_writeImageRights() throws org.apache.thrift.TException
- {
- writeImageRights_result result = new writeImageRights_result();
- receiveBase(result, "writeImageRights");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeImageRights failed: unknown result");
- }
-
- public boolean writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, String token) throws org.apache.thrift.TException
- {
- send_writeAdditionalImageRights(imageName, userID, isRead, isWrite, isLinkAllowed, isAdmin, token);
- return recv_writeAdditionalImageRights();
- }
-
- public void send_writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, String token) throws org.apache.thrift.TException
- {
- writeAdditionalImageRights_args args = new writeAdditionalImageRights_args();
- args.setImageName(imageName);
- args.setUserID(userID);
- args.setIsRead(isRead);
- args.setIsWrite(isWrite);
- args.setIsLinkAllowed(isLinkAllowed);
- args.setIsAdmin(isAdmin);
- args.setToken(token);
- sendBase("writeAdditionalImageRights", args);
- }
-
- public boolean recv_writeAdditionalImageRights() throws org.apache.thrift.TException
- {
- writeAdditionalImageRights_result result = new writeAdditionalImageRights_result();
- receiveBase(result, "writeAdditionalImageRights");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeAdditionalImageRights failed: unknown result");
- }
-
- public boolean writeLectureRights(String lectureID, String role, String token, String university, String userID) throws org.apache.thrift.TException
- {
- send_writeLectureRights(lectureID, role, token, university, userID);
- return recv_writeLectureRights();
- }
-
- public void send_writeLectureRights(String lectureID, String role, String token, String university, String userID) throws org.apache.thrift.TException
- {
- writeLectureRights_args args = new writeLectureRights_args();
- args.setLectureID(lectureID);
- args.setRole(role);
- args.setToken(token);
- args.setUniversity(university);
- args.setUserID(userID);
- sendBase("writeLectureRights", args);
- }
-
- public boolean recv_writeLectureRights() throws org.apache.thrift.TException
- {
- writeLectureRights_result result = new writeLectureRights_result();
- receiveBase(result, "writeLectureRights");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeLectureRights failed: unknown result");
- }
-
- public boolean writeAdditionalLectureRights(String lectureName, String userID, boolean isRead, boolean isWrite, boolean isAdmin, String token) throws org.apache.thrift.TException
- {
- send_writeAdditionalLectureRights(lectureName, userID, isRead, isWrite, isAdmin, token);
- return recv_writeAdditionalLectureRights();
- }
-
- public void send_writeAdditionalLectureRights(String lectureName, String userID, boolean isRead, boolean isWrite, boolean isAdmin, String token) throws org.apache.thrift.TException
- {
- writeAdditionalLectureRights_args args = new writeAdditionalLectureRights_args();
- args.setLectureName(lectureName);
- args.setUserID(userID);
- args.setIsRead(isRead);
- args.setIsWrite(isWrite);
- args.setIsAdmin(isAdmin);
- args.setToken(token);
- sendBase("writeAdditionalLectureRights", args);
- }
-
- public boolean recv_writeAdditionalLectureRights() throws org.apache.thrift.TException
- {
- writeAdditionalLectureRights_result result = new writeAdditionalLectureRights_result();
- receiveBase(result, "writeAdditionalLectureRights");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeAdditionalLectureRights failed: unknown result");
- }
-
- public List<Person> getAllOtherSatelliteUsers(List<String> userID, String token) throws org.apache.thrift.TException
- {
- send_getAllOtherSatelliteUsers(userID, token);
- return recv_getAllOtherSatelliteUsers();
- }
-
- public void send_getAllOtherSatelliteUsers(List<String> userID, String token) throws org.apache.thrift.TException
- {
- getAllOtherSatelliteUsers_args args = new getAllOtherSatelliteUsers_args();
- args.setUserID(userID);
- args.setToken(token);
- sendBase("getAllOtherSatelliteUsers", args);
- }
-
- public List<Person> recv_getAllOtherSatelliteUsers() throws org.apache.thrift.TException
- {
- getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_result();
- receiveBase(result, "getAllOtherSatelliteUsers");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOtherSatelliteUsers failed: unknown result");
- }
-
- public List<Person> getPermissionForUserAndImage(String token, String imageID, String userID) throws org.apache.thrift.TException
- {
- send_getPermissionForUserAndImage(token, imageID, userID);
- return recv_getPermissionForUserAndImage();
- }
-
- public void send_getPermissionForUserAndImage(String token, String imageID, String userID) throws org.apache.thrift.TException
- {
- getPermissionForUserAndImage_args args = new getPermissionForUserAndImage_args();
- args.setToken(token);
- args.setImageID(imageID);
- args.setUserID(userID);
- sendBase("getPermissionForUserAndImage", args);
- }
-
- public List<Person> recv_getPermissionForUserAndImage() throws org.apache.thrift.TException
- {
- getPermissionForUserAndImage_result result = new getPermissionForUserAndImage_result();
- receiveBase(result, "getPermissionForUserAndImage");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionForUserAndImage failed: unknown result");
- }
-
- public List<String> getAdditionalImageContacts(String imageID, String token) throws org.apache.thrift.TException
- {
- send_getAdditionalImageContacts(imageID, token);
- return recv_getAdditionalImageContacts();
- }
-
- public void send_getAdditionalImageContacts(String imageID, String token) throws org.apache.thrift.TException
- {
- getAdditionalImageContacts_args args = new getAdditionalImageContacts_args();
- args.setImageID(imageID);
- args.setToken(token);
- sendBase("getAdditionalImageContacts", args);
- }
-
- public List<String> recv_getAdditionalImageContacts() throws org.apache.thrift.TException
- {
- getAdditionalImageContacts_result result = new getAdditionalImageContacts_result();
- receiveBase(result, "getAdditionalImageContacts");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAdditionalImageContacts failed: unknown result");
- }
-
- public List<Person> getPermissionForUserAndLecture(String token, String lectureID, String userID) throws org.apache.thrift.TException
- {
- send_getPermissionForUserAndLecture(token, lectureID, userID);
- return recv_getPermissionForUserAndLecture();
- }
-
- public void send_getPermissionForUserAndLecture(String token, String lectureID, String userID) throws org.apache.thrift.TException
- {
- getPermissionForUserAndLecture_args args = new getPermissionForUserAndLecture_args();
- args.setToken(token);
- args.setLectureID(lectureID);
- args.setUserID(userID);
- sendBase("getPermissionForUserAndLecture", args);
- }
-
- public List<Person> recv_getPermissionForUserAndLecture() throws org.apache.thrift.TException
- {
- getPermissionForUserAndLecture_result result = new getPermissionForUserAndLecture_result();
- receiveBase(result, "getPermissionForUserAndLecture");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionForUserAndLecture failed: unknown result");
- }
-
- public void deleteAllAdditionalImagePermissions(String imageID, String token, String userID) throws org.apache.thrift.TException
- {
- send_deleteAllAdditionalImagePermissions(imageID, token, userID);
- recv_deleteAllAdditionalImagePermissions();
- }
-
- public void send_deleteAllAdditionalImagePermissions(String imageID, String token, String userID) throws org.apache.thrift.TException
- {
- deleteAllAdditionalImagePermissions_args args = new deleteAllAdditionalImagePermissions_args();
- args.setImageID(imageID);
- args.setToken(token);
- args.setUserID(userID);
- sendBase("deleteAllAdditionalImagePermissions", args);
- }
-
- public void recv_deleteAllAdditionalImagePermissions() throws org.apache.thrift.TException
- {
- deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_result();
- receiveBase(result, "deleteAllAdditionalImagePermissions");
- return;
- }
-
- public void deleteAllAdditionalLecturePermissions(String lectureID, String token, String userID) throws org.apache.thrift.TException
- {
- send_deleteAllAdditionalLecturePermissions(lectureID, token, userID);
- recv_deleteAllAdditionalLecturePermissions();
- }
-
- public void send_deleteAllAdditionalLecturePermissions(String lectureID, String token, String userID) throws org.apache.thrift.TException
- {
- deleteAllAdditionalLecturePermissions_args args = new deleteAllAdditionalLecturePermissions_args();
- args.setLectureID(lectureID);
- args.setToken(token);
- args.setUserID(userID);
- sendBase("deleteAllAdditionalLecturePermissions", args);
- }
-
- public void recv_deleteAllAdditionalLecturePermissions() throws org.apache.thrift.TException
- {
- deleteAllAdditionalLecturePermissions_result result = new deleteAllAdditionalLecturePermissions_result();
- receiveBase(result, "deleteAllAdditionalLecturePermissions");
- return;
- }
-
- public String getOsNameForGuestOs(String guestOS, String token) throws org.apache.thrift.TException
- {
- send_getOsNameForGuestOs(guestOS, token);
- return recv_getOsNameForGuestOs();
- }
-
- public void send_getOsNameForGuestOs(String guestOS, String token) throws org.apache.thrift.TException
- {
- getOsNameForGuestOs_args args = new getOsNameForGuestOs_args();
- args.setGuestOS(guestOS);
- args.setToken(token);
- sendBase("getOsNameForGuestOs", args);
- }
-
- public String recv_getOsNameForGuestOs() throws org.apache.thrift.TException
- {
- getOsNameForGuestOs_result result = new getOsNameForGuestOs_result();
- receiveBase(result, "getOsNameForGuestOs");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOsNameForGuestOs failed: unknown result");
- }
-
- public boolean userIsImageAdmin(String imageID, String token, String userID) throws org.apache.thrift.TException
- {
- send_userIsImageAdmin(imageID, token, userID);
- return recv_userIsImageAdmin();
- }
-
- public void send_userIsImageAdmin(String imageID, String token, String userID) throws org.apache.thrift.TException
- {
- userIsImageAdmin_args args = new userIsImageAdmin_args();
- args.setImageID(imageID);
- args.setToken(token);
- args.setUserID(userID);
- sendBase("userIsImageAdmin", args);
- }
-
- public boolean recv_userIsImageAdmin() throws org.apache.thrift.TException
- {
- userIsImageAdmin_result result = new userIsImageAdmin_result();
- receiveBase(result, "userIsImageAdmin");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "userIsImageAdmin failed: unknown result");
- }
-
- public boolean userIsLectureAdmin(String userID, String lectureID, String token) throws org.apache.thrift.TException
- {
- send_userIsLectureAdmin(userID, lectureID, token);
- return recv_userIsLectureAdmin();
- }
-
- public void send_userIsLectureAdmin(String userID, String lectureID, String token) throws org.apache.thrift.TException
- {
- userIsLectureAdmin_args args = new userIsLectureAdmin_args();
- args.setUserID(userID);
- args.setLectureID(lectureID);
- args.setToken(token);
- sendBase("userIsLectureAdmin", args);
- }
-
- public boolean recv_userIsLectureAdmin() throws org.apache.thrift.TException
- {
- userIsLectureAdmin_result result = new userIsLectureAdmin_result();
- receiveBase(result, "userIsLectureAdmin");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "userIsLectureAdmin failed: unknown result");
- }
-
- public String createRandomUUID(String token) throws org.apache.thrift.TException
- {
- send_createRandomUUID(token);
- return recv_createRandomUUID();
- }
-
- public void send_createRandomUUID(String token) throws org.apache.thrift.TException
- {
- createRandomUUID_args args = new createRandomUUID_args();
- args.setToken(token);
- sendBase("createRandomUUID", args);
- }
-
- public String recv_createRandomUUID() throws org.apache.thrift.TException
- {
- createRandomUUID_result result = new createRandomUUID_result();
- receiveBase(result, "createRandomUUID");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRandomUUID failed: unknown result");
- }
-
- public String getInstitutionByID(String institutionID) throws org.apache.thrift.TException
- {
- send_getInstitutionByID(institutionID);
- return recv_getInstitutionByID();
- }
-
- public void send_getInstitutionByID(String institutionID) throws org.apache.thrift.TException
- {
- getInstitutionByID_args args = new getInstitutionByID_args();
- args.setInstitutionID(institutionID);
- sendBase("getInstitutionByID", args);
- }
-
- public String recv_getInstitutionByID() throws org.apache.thrift.TException
- {
- getInstitutionByID_result result = new getInstitutionByID_result();
- receiveBase(result, "getInstitutionByID");
- if (result.isSetSuccess()) {
- return result.success;
- }
- throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInstitutionByID failed: unknown result");
- }
-
- }
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
- public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
- private org.apache.thrift.async.TAsyncClientManager clientManager;
- private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
- this.clientManager = clientManager;
- this.protocolFactory = protocolFactory;
- }
- public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
- return new AsyncClient(protocolFactory, clientManager, transport);
- }
- }
-
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
- super(protocolFactory, clientManager, transport);
- }
-
- public void getVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getVersion_call method_call = new getVersion_call(resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getVersion_args args = new getVersion_args();
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public long getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_getVersion();
- }
- }
-
- public void getFtpUser(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getFtpUser_call method_call = new getFtpUser_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getFtpUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getFtpUser_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFtpUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getFtpUser_args args = new getFtpUser_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public User 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_getFtpUser();
- }
- }
-
- public void authenticated(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- authenticated_call method_call = new authenticated_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class authenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public authenticated_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticated", org.apache.thrift.protocol.TMessageType.CALL, 0));
- authenticated_args args = new authenticated_args();
- args.setToken(token);
- 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_authenticated();
- }
- }
-
- public void setSessionInvalid(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- setSessionInvalid_call method_call = new setSessionInvalid_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class setSessionInvalid_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public setSessionInvalid_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setSessionInvalid", org.apache.thrift.protocol.TMessageType.CALL, 0));
- setSessionInvalid_args args = new setSessionInvalid_args();
- args.setToken(token);
- 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_setSessionInvalid();
- }
- }
-
- public void DeleteFtpUser(String user, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- DeleteFtpUser_call method_call = new DeleteFtpUser_call(user, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class DeleteFtpUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String user;
- private String token;
- public DeleteFtpUser_call(String user, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.user = user;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("DeleteFtpUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- DeleteFtpUser_args args = new DeleteFtpUser_args();
- args.setUser(user);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public long getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- return (new Client(prot)).recv_DeleteFtpUser();
- }
- }
-
- public void getPathOfImage(String image_id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getPathOfImage_call method_call = new getPathOfImage_call(image_id, version, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getPathOfImage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String image_id;
- private String version;
- private String token;
- public getPathOfImage_call(String image_id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.image_id = image_id;
- this.version = version;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPathOfImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getPathOfImage_args args = new getPathOfImage_args();
- args.setImage_id(image_id);
- args.setVersion(version);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String 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_getPathOfImage();
- }
- }
-
- public void setInstitution(String university, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- setInstitution_call method_call = new setInstitution_call(university, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class setInstitution_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String university;
- private String token;
- public setInstitution_call(String university, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.university = university;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setInstitution", org.apache.thrift.protocol.TMessageType.CALL, 0));
- setInstitution_args args = new setInstitution_args();
- args.setUniversity(university);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String 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_setInstitution();
- }
- }
-
- public void writeVLdata(String imagename, String desc, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- writeVLdata_call method_call = new writeVLdata_call(imagename, desc, Tel, Fak, license, internet, ram, cpu, imagePath, isTemplate, filesize, shareMode, os, uid, token, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class writeVLdata_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String imagename;
- private String desc;
- private String Tel;
- private String Fak;
- private boolean license;
- private boolean internet;
- private long ram;
- private long cpu;
- private String imagePath;
- private boolean isTemplate;
- private long filesize;
- private long shareMode;
- private String os;
- private String uid;
- private String token;
- private String userID;
- public writeVLdata_call(String imagename, String desc, String Tel, String Fak, boolean license, boolean internet, long ram, long cpu, String imagePath, boolean isTemplate, long filesize, long shareMode, String os, String uid, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.imagename = imagename;
- this.desc = desc;
- this.Tel = Tel;
- this.Fak = Fak;
- this.license = license;
- this.internet = internet;
- this.ram = ram;
- this.cpu = cpu;
- this.imagePath = imagePath;
- this.isTemplate = isTemplate;
- this.filesize = filesize;
- this.shareMode = shareMode;
- this.os = os;
- this.uid = uid;
- this.token = token;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeVLdata", org.apache.thrift.protocol.TMessageType.CALL, 0));
- writeVLdata_args args = new writeVLdata_args();
- args.setImagename(imagename);
- args.setDesc(desc);
- args.setTel(Tel);
- args.setFak(Fak);
- args.setLicense(license);
- args.setInternet(internet);
- args.setRam(ram);
- args.setCpu(cpu);
- args.setImagePath(imagePath);
- args.setIsTemplate(isTemplate);
- args.setFilesize(filesize);
- args.setShareMode(shareMode);
- args.setOs(os);
- args.setUid(uid);
- args.setToken(token);
- args.setUserID(userID);
- 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_writeVLdata();
- }
- }
-
- public void getImageListPermissionWrite(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImageListPermissionWrite_call method_call = new getImageListPermissionWrite_call(userID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImageListPermissionWrite_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userID;
- private String token;
- public getImageListPermissionWrite_call(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userID = userID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageListPermissionWrite", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImageListPermissionWrite_args args = new getImageListPermissionWrite_args();
- args.setUserID(userID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Image> 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_getImageListPermissionWrite();
- }
- }
-
- public void getImageListPermissionRead(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImageListPermissionRead_call method_call = new getImageListPermissionRead_call(userID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImageListPermissionRead_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userID;
- private String token;
- public getImageListPermissionRead_call(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userID = userID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageListPermissionRead", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImageListPermissionRead_args args = new getImageListPermissionRead_args();
- args.setUserID(userID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Image> 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_getImageListPermissionRead();
- }
- }
-
- public void getImageListPermissionLink(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImageListPermissionLink_call method_call = new getImageListPermissionLink_call(userID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImageListPermissionLink_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userID;
- private String token;
- public getImageListPermissionLink_call(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userID = userID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageListPermissionLink", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImageListPermissionLink_args args = new getImageListPermissionLink_args();
- args.setUserID(userID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Image> 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_getImageListPermissionLink();
- }
- }
-
- public void getImageListPermissionAdmin(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImageListPermissionAdmin_call method_call = new getImageListPermissionAdmin_call(userID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImageListPermissionAdmin_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userID;
- private String token;
- public getImageListPermissionAdmin_call(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userID = userID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageListPermissionAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImageListPermissionAdmin_args args = new getImageListPermissionAdmin_args();
- args.setUserID(userID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Image> 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_getImageListPermissionAdmin();
- }
- }
-
- public void getImageListAllTemplates(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImageListAllTemplates_call method_call = new getImageListAllTemplates_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImageListAllTemplates_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getImageListAllTemplates_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageListAllTemplates", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImageListAllTemplates_args args = new getImageListAllTemplates_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Image> 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_getImageListAllTemplates();
- }
- }
-
- public void getImageList(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImageList_call method_call = new getImageList_call(userID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userID;
- private String token;
- public getImageList_call(String userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userID = userID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageList", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImageList_args args = new getImageList_args();
- args.setUserID(userID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Image> 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_getImageList();
- }
- }
-
- public void getLectureList(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getLectureList_call method_call = new getLectureList_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getLectureList_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureList", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getLectureList_args args = new getLectureList_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Lecture> 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_getLectureList();
- }
- }
-
- public void getLectureListPermissionRead(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getLectureListPermissionRead_call method_call = new getLectureListPermissionRead_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getLectureListPermissionRead_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getLectureListPermissionRead_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureListPermissionRead", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getLectureListPermissionRead_args args = new getLectureListPermissionRead_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Lecture> 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_getLectureListPermissionRead();
- }
- }
-
- public void getLectureListPermissionWrite(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getLectureListPermissionWrite_call method_call = new getLectureListPermissionWrite_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getLectureListPermissionWrite_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getLectureListPermissionWrite_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureListPermissionWrite", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getLectureListPermissionWrite_args args = new getLectureListPermissionWrite_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Lecture> 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_getLectureListPermissionWrite();
- }
- }
-
- public void getLectureListPermissionAdmin(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getLectureListPermissionAdmin_call method_call = new getLectureListPermissionAdmin_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getLectureListPermissionAdmin_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getLectureListPermissionAdmin_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureListPermissionAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getLectureListPermissionAdmin_args args = new getLectureListPermissionAdmin_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Lecture> 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_getLectureListPermissionAdmin();
- }
- }
-
- public void getAllOS(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getAllOS_call method_call = new getAllOS_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getAllOS_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getAllOS_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllOS", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getAllOS_args args = new getAllOS_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<String> 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_getAllOS();
- }
- }
-
- public void getAllUniversities(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getAllUniversities_call method_call = new getAllUniversities_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getAllUniversities_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getAllUniversities_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUniversities", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getAllUniversities_args args = new getAllUniversities_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<String> 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_getAllUniversities();
- }
- }
-
- public void getPersonData(String Vorname, String Nachname, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getPersonData_call method_call = new getPersonData_call(Vorname, Nachname, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getPersonData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String Vorname;
- private String Nachname;
- private String token;
- public getPersonData_call(String Vorname, String Nachname, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.Vorname = Vorname;
- this.Nachname = Nachname;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPersonData", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getPersonData_args args = new getPersonData_args();
- args.setVorname(Vorname);
- args.setNachname(Nachname);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public Map<String,String> 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_getPersonData();
- }
- }
-
- public void getItemOwner(String itemID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getItemOwner_call method_call = new getItemOwner_call(itemID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getItemOwner_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String itemID;
- private String token;
- public getItemOwner_call(String itemID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.itemID = itemID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemOwner", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getItemOwner_args args = new getItemOwner_args();
- args.setItemID(itemID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public Map<String,String> 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_getItemOwner();
- }
- }
-
- public void setPerson(String userID, String token, String institution, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- setPerson_call method_call = new setPerson_call(userID, token, institution, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class setPerson_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userID;
- private String token;
- private String institution;
- public setPerson_call(String userID, String token, String institution, 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.userID = userID;
- this.token = token;
- this.institution = institution;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setPerson", org.apache.thrift.protocol.TMessageType.CALL, 0));
- setPerson_args args = new setPerson_args();
- args.setUserID(userID);
- args.setToken(token);
- args.setInstitution(institution);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_setPerson();
- }
- }
-
- public void writeLecturedata(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String token, String Tel, String Fak, String lectureID, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- writeLecturedata_call method_call = new writeLecturedata_call(name, shortdesc, desc, startDate, endDate, isActive, imagename, token, Tel, Fak, lectureID, university, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class writeLecturedata_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
- private String shortdesc;
- private String desc;
- private String startDate;
- private String endDate;
- private boolean isActive;
- private String imagename;
- private String token;
- private String Tel;
- private String Fak;
- private String lectureID;
- private String university;
- public writeLecturedata_call(String name, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imagename, String token, String Tel, String Fak, String lectureID, String university, 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.name = name;
- this.shortdesc = shortdesc;
- this.desc = desc;
- this.startDate = startDate;
- this.endDate = endDate;
- this.isActive = isActive;
- this.imagename = imagename;
- this.token = token;
- this.Tel = Tel;
- this.Fak = Fak;
- this.lectureID = lectureID;
- this.university = university;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeLecturedata", org.apache.thrift.protocol.TMessageType.CALL, 0));
- writeLecturedata_args args = new writeLecturedata_args();
- args.setName(name);
- args.setShortdesc(shortdesc);
- args.setDesc(desc);
- args.setStartDate(startDate);
- args.setEndDate(endDate);
- args.setIsActive(isActive);
- args.setImagename(imagename);
- args.setToken(token);
- args.setTel(Tel);
- args.setFak(Fak);
- args.setLectureID(lectureID);
- args.setUniversity(university);
- 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_writeLecturedata();
- }
- }
-
- public void startFileCopy(String file, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- startFileCopy_call method_call = new startFileCopy_call(file, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class startFileCopy_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String file;
- private String token;
- public startFileCopy_call(String file, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.file = file;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startFileCopy", org.apache.thrift.protocol.TMessageType.CALL, 0));
- startFileCopy_args args = new startFileCopy_args();
- args.setFile(file);
- args.setToken(token);
- 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_startFileCopy();
- }
- }
-
- public void getImageData(String imageid, String imageversion, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getImageData_call method_call = new getImageData_call(imageid, imageversion, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String imageid;
- private String imageversion;
- private String token;
- public getImageData_call(String imageid, String imageversion, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.imageid = imageid;
- this.imageversion = imageversion;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageData", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getImageData_args args = new getImageData_args();
- args.setImageid(imageid);
- args.setImageversion(imageversion);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public Map<String,String> 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_getImageData();
- }
- }
-
- public void getLectureData(String lectureid, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getLectureData_call method_call = new getLectureData_call(lectureid, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getLectureData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String lectureid;
- private String token;
- public getLectureData_call(String lectureid, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.lectureid = lectureid;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureData", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getLectureData_args args = new getLectureData_args();
- args.setLectureid(lectureid);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public Map<String,String> 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_getLectureData();
- }
- }
-
- public void updateImageData(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- updateImageData_call method_call = new updateImageData_call(name, newName, desc, image_path, license, internet, ram, cpu, id, version, isTemplate, filesize, shareMode, os, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class updateImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
- private String newName;
- private String desc;
- private String image_path;
- private boolean license;
- private boolean internet;
- private long ram;
- private long cpu;
- private String id;
- private String version;
- private boolean isTemplate;
- private long filesize;
- private long shareMode;
- private String os;
- private String token;
- public updateImageData_call(String name, String newName, String desc, String image_path, boolean license, boolean internet, long ram, long cpu, String id, String version, boolean isTemplate, long filesize, long shareMode, String os, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.name = name;
- this.newName = newName;
- this.desc = desc;
- this.image_path = image_path;
- this.license = license;
- this.internet = internet;
- this.ram = ram;
- this.cpu = cpu;
- this.id = id;
- this.version = version;
- this.isTemplate = isTemplate;
- this.filesize = filesize;
- this.shareMode = shareMode;
- this.os = os;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageData", org.apache.thrift.protocol.TMessageType.CALL, 0));
- updateImageData_args args = new updateImageData_args();
- args.setName(name);
- args.setNewName(newName);
- args.setDesc(desc);
- args.setImage_path(image_path);
- args.setLicense(license);
- args.setInternet(internet);
- args.setRam(ram);
- args.setCpu(cpu);
- args.setId(id);
- args.setVersion(version);
- args.setIsTemplate(isTemplate);
- args.setFilesize(filesize);
- args.setShareMode(shareMode);
- args.setOs(os);
- args.setToken(token);
- 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_updateImageData();
- }
- }
-
- public void deleteImageData(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteImageData_call method_call = new deleteImageData_call(id, version, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
- private String version;
- private String token;
- public deleteImageData_call(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.id = id;
- this.version = version;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageData", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteImageData_args args = new deleteImageData_args();
- args.setId(id);
- args.setVersion(version);
- args.setToken(token);
- 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_deleteImageData();
- }
- }
-
- public void updateLecturedata(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imageid, String imageversion, String token, String Tel, String Fak, String id, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- updateLecturedata_call method_call = new updateLecturedata_call(name, newName, shortdesc, desc, startDate, endDate, isActive, imageid, imageversion, token, Tel, Fak, id, university, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class updateLecturedata_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String name;
- private String newName;
- private String shortdesc;
- private String desc;
- private String startDate;
- private String endDate;
- private boolean isActive;
- private String imageid;
- private String imageversion;
- private String token;
- private String Tel;
- private String Fak;
- private String id;
- private String university;
- public updateLecturedata_call(String name, String newName, String shortdesc, String desc, String startDate, String endDate, boolean isActive, String imageid, String imageversion, String token, String Tel, String Fak, String id, String university, 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.name = name;
- this.newName = newName;
- this.shortdesc = shortdesc;
- this.desc = desc;
- this.startDate = startDate;
- this.endDate = endDate;
- this.isActive = isActive;
- this.imageid = imageid;
- this.imageversion = imageversion;
- this.token = token;
- this.Tel = Tel;
- this.Fak = Fak;
- this.id = id;
- this.university = university;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecturedata", org.apache.thrift.protocol.TMessageType.CALL, 0));
- updateLecturedata_args args = new updateLecturedata_args();
- args.setName(name);
- args.setNewName(newName);
- args.setShortdesc(shortdesc);
- args.setDesc(desc);
- args.setStartDate(startDate);
- args.setEndDate(endDate);
- args.setIsActive(isActive);
- args.setImageid(imageid);
- args.setImageversion(imageversion);
- args.setToken(token);
- args.setTel(Tel);
- args.setFak(Fak);
- args.setId(id);
- args.setUniversity(university);
- 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_updateLecturedata();
- }
- }
-
- public void deleteImageServer(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteImageServer_call method_call = new deleteImageServer_call(id, version, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteImageServer_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
- private String version;
- private String token;
- public deleteImageServer_call(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.id = id;
- this.version = version;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageServer", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteImageServer_args args = new deleteImageServer_args();
- args.setId(id);
- args.setVersion(version);
- args.setToken(token);
- 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_deleteImageServer();
- }
- }
-
- public void deleteImageByPath(String image_path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteImageByPath_call method_call = new deleteImageByPath_call(image_path, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteImageByPath_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String image_path;
- public deleteImageByPath_call(String image_path, 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.image_path = image_path;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageByPath", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteImageByPath_args args = new deleteImageByPath_args();
- args.setImage_path(image_path);
- 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_deleteImageByPath();
- }
- }
-
- public void connectedToLecture(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- connectedToLecture_call method_call = new connectedToLecture_call(id, version, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class connectedToLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
- private String version;
- private String token;
- public connectedToLecture_call(String id, String version, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.id = id;
- this.version = version;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("connectedToLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
- connectedToLecture_args args = new connectedToLecture_args();
- args.setId(id);
- args.setVersion(version);
- args.setToken(token);
- 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_connectedToLecture();
- }
- }
-
- public void deleteLecture(String id, String token, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteLecture_call method_call = new deleteLecture_call(id, token, university, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String id;
- private String token;
- private String university;
- public deleteLecture_call(String id, String token, String university, 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.id = id;
- this.token = token;
- this.university = university;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteLecture_args args = new deleteLecture_args();
- args.setId(id);
- args.setToken(token);
- args.setUniversity(university);
- 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_deleteLecture();
- }
- }
-
- public void checkUser(String username, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- checkUser_call method_call = new checkUser_call(username, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class checkUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String username;
- private String token;
- public checkUser_call(String username, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.username = username;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("checkUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- checkUser_args args = new checkUser_args();
- args.setUsername(username);
- args.setToken(token);
- 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_checkUser();
- }
- }
-
- public void createUser(String token, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- createUser_call method_call = new createUser_call(token, university, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class createUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- private String university;
- public createUser_call(String token, String university, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- this.university = university;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
- createUser_args args = new createUser_args();
- args.setToken(token);
- args.setUniversity(university);
- 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_createUser();
- }
- }
-
- public void writeImageRights(String imagename, String token, String role, String university, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- writeImageRights_call method_call = new writeImageRights_call(imagename, token, role, university, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class writeImageRights_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String imagename;
- private String token;
- private String role;
- private String university;
- private String userID;
- public writeImageRights_call(String imagename, String token, String role, String university, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.imagename = imagename;
- this.token = token;
- this.role = role;
- this.university = university;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImageRights", org.apache.thrift.protocol.TMessageType.CALL, 0));
- writeImageRights_args args = new writeImageRights_args();
- args.setImagename(imagename);
- args.setToken(token);
- args.setRole(role);
- args.setUniversity(university);
- args.setUserID(userID);
- 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_writeImageRights();
- }
- }
-
- public void writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- writeAdditionalImageRights_call method_call = new writeAdditionalImageRights_call(imageName, userID, isRead, isWrite, isLinkAllowed, isAdmin, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class writeAdditionalImageRights_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String imageName;
- private String userID;
- private boolean isRead;
- private boolean isWrite;
- private boolean isLinkAllowed;
- private boolean isAdmin;
- private String token;
- public writeAdditionalImageRights_call(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.imageName = imageName;
- this.userID = userID;
- this.isRead = isRead;
- this.isWrite = isWrite;
- this.isLinkAllowed = isLinkAllowed;
- this.isAdmin = isAdmin;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeAdditionalImageRights", org.apache.thrift.protocol.TMessageType.CALL, 0));
- writeAdditionalImageRights_args args = new writeAdditionalImageRights_args();
- args.setImageName(imageName);
- args.setUserID(userID);
- args.setIsRead(isRead);
- args.setIsWrite(isWrite);
- args.setIsLinkAllowed(isLinkAllowed);
- args.setIsAdmin(isAdmin);
- args.setToken(token);
- 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_writeAdditionalImageRights();
- }
- }
-
- public void writeLectureRights(String lectureID, String role, String token, String university, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- writeLectureRights_call method_call = new writeLectureRights_call(lectureID, role, token, university, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class writeLectureRights_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String lectureID;
- private String role;
- private String token;
- private String university;
- private String userID;
- public writeLectureRights_call(String lectureID, String role, String token, String university, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.lectureID = lectureID;
- this.role = role;
- this.token = token;
- this.university = university;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeLectureRights", org.apache.thrift.protocol.TMessageType.CALL, 0));
- writeLectureRights_args args = new writeLectureRights_args();
- args.setLectureID(lectureID);
- args.setRole(role);
- args.setToken(token);
- args.setUniversity(university);
- args.setUserID(userID);
- 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_writeLectureRights();
- }
- }
-
- public void writeAdditionalLectureRights(String lectureName, String userID, boolean isRead, boolean isWrite, boolean isAdmin, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- writeAdditionalLectureRights_call method_call = new writeAdditionalLectureRights_call(lectureName, userID, isRead, isWrite, isAdmin, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class writeAdditionalLectureRights_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String lectureName;
- private String userID;
- private boolean isRead;
- private boolean isWrite;
- private boolean isAdmin;
- private String token;
- public writeAdditionalLectureRights_call(String lectureName, String userID, boolean isRead, boolean isWrite, boolean isAdmin, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.lectureName = lectureName;
- this.userID = userID;
- this.isRead = isRead;
- this.isWrite = isWrite;
- this.isAdmin = isAdmin;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeAdditionalLectureRights", org.apache.thrift.protocol.TMessageType.CALL, 0));
- writeAdditionalLectureRights_args args = new writeAdditionalLectureRights_args();
- args.setLectureName(lectureName);
- args.setUserID(userID);
- args.setIsRead(isRead);
- args.setIsWrite(isWrite);
- args.setIsAdmin(isAdmin);
- args.setToken(token);
- 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_writeAdditionalLectureRights();
- }
- }
-
- public void getAllOtherSatelliteUsers(List<String> userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getAllOtherSatelliteUsers_call method_call = new getAllOtherSatelliteUsers_call(userID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getAllOtherSatelliteUsers_call extends org.apache.thrift.async.TAsyncMethodCall {
- private List<String> userID;
- private String token;
- public getAllOtherSatelliteUsers_call(List<String> userID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userID = userID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllOtherSatelliteUsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getAllOtherSatelliteUsers_args args = new getAllOtherSatelliteUsers_args();
- args.setUserID(userID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Person> 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_getAllOtherSatelliteUsers();
- }
- }
-
- public void getPermissionForUserAndImage(String token, String imageID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getPermissionForUserAndImage_call method_call = new getPermissionForUserAndImage_call(token, imageID, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getPermissionForUserAndImage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- private String imageID;
- private String userID;
- public getPermissionForUserAndImage_call(String token, String imageID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- this.imageID = imageID;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPermissionForUserAndImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getPermissionForUserAndImage_args args = new getPermissionForUserAndImage_args();
- args.setToken(token);
- args.setImageID(imageID);
- args.setUserID(userID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Person> 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_getPermissionForUserAndImage();
- }
- }
-
- public void getAdditionalImageContacts(String imageID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getAdditionalImageContacts_call method_call = new getAdditionalImageContacts_call(imageID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getAdditionalImageContacts_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String imageID;
- private String token;
- public getAdditionalImageContacts_call(String imageID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.imageID = imageID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAdditionalImageContacts", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getAdditionalImageContacts_args args = new getAdditionalImageContacts_args();
- args.setImageID(imageID);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<String> 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_getAdditionalImageContacts();
- }
- }
-
- public void getPermissionForUserAndLecture(String token, String lectureID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getPermissionForUserAndLecture_call method_call = new getPermissionForUserAndLecture_call(token, lectureID, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getPermissionForUserAndLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- private String lectureID;
- private String userID;
- public getPermissionForUserAndLecture_call(String token, String lectureID, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- this.lectureID = lectureID;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPermissionForUserAndLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getPermissionForUserAndLecture_args args = new getPermissionForUserAndLecture_args();
- args.setToken(token);
- args.setLectureID(lectureID);
- args.setUserID(userID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public List<Person> 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_getPermissionForUserAndLecture();
- }
- }
-
- public void deleteAllAdditionalImagePermissions(String imageID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteAllAdditionalImagePermissions_call method_call = new deleteAllAdditionalImagePermissions_call(imageID, token, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteAllAdditionalImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String imageID;
- private String token;
- private String userID;
- public deleteAllAdditionalImagePermissions_call(String imageID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.imageID = imageID;
- this.token = token;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllAdditionalImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteAllAdditionalImagePermissions_args args = new deleteAllAdditionalImagePermissions_args();
- args.setImageID(imageID);
- args.setToken(token);
- args.setUserID(userID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_deleteAllAdditionalImagePermissions();
- }
- }
-
- public void deleteAllAdditionalLecturePermissions(String lectureID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- deleteAllAdditionalLecturePermissions_call method_call = new deleteAllAdditionalLecturePermissions_call(lectureID, token, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class deleteAllAdditionalLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String lectureID;
- private String token;
- private String userID;
- public deleteAllAdditionalLecturePermissions_call(String lectureID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.lectureID = lectureID;
- this.token = token;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllAdditionalLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
- deleteAllAdditionalLecturePermissions_args args = new deleteAllAdditionalLecturePermissions_args();
- args.setLectureID(lectureID);
- args.setToken(token);
- args.setUserID(userID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public void getResult() throws org.apache.thrift.TException {
- if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
- }
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
- (new Client(prot)).recv_deleteAllAdditionalLecturePermissions();
- }
- }
-
- public void getOsNameForGuestOs(String guestOS, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getOsNameForGuestOs_call method_call = new getOsNameForGuestOs_call(guestOS, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getOsNameForGuestOs_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String guestOS;
- private String token;
- public getOsNameForGuestOs_call(String guestOS, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.guestOS = guestOS;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOsNameForGuestOs", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getOsNameForGuestOs_args args = new getOsNameForGuestOs_args();
- args.setGuestOS(guestOS);
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String 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_getOsNameForGuestOs();
- }
- }
-
- public void userIsImageAdmin(String imageID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- userIsImageAdmin_call method_call = new userIsImageAdmin_call(imageID, token, userID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class userIsImageAdmin_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String imageID;
- private String token;
- private String userID;
- public userIsImageAdmin_call(String imageID, String token, String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.imageID = imageID;
- this.token = token;
- this.userID = userID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("userIsImageAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0));
- userIsImageAdmin_args args = new userIsImageAdmin_args();
- args.setImageID(imageID);
- args.setToken(token);
- args.setUserID(userID);
- 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_userIsImageAdmin();
- }
- }
-
- public void userIsLectureAdmin(String userID, String lectureID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- userIsLectureAdmin_call method_call = new userIsLectureAdmin_call(userID, lectureID, token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class userIsLectureAdmin_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userID;
- private String lectureID;
- private String token;
- public userIsLectureAdmin_call(String userID, String lectureID, String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.userID = userID;
- this.lectureID = lectureID;
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("userIsLectureAdmin", org.apache.thrift.protocol.TMessageType.CALL, 0));
- userIsLectureAdmin_args args = new userIsLectureAdmin_args();
- args.setUserID(userID);
- args.setLectureID(lectureID);
- args.setToken(token);
- 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_userIsLectureAdmin();
- }
- }
-
- public void createRandomUUID(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- createRandomUUID_call method_call = new createRandomUUID_call(token, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class createRandomUUID_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public createRandomUUID_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
- super(client, protocolFactory, transport, resultHandler, false);
- this.token = token;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createRandomUUID", org.apache.thrift.protocol.TMessageType.CALL, 0));
- createRandomUUID_args args = new createRandomUUID_args();
- args.setToken(token);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String 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_createRandomUUID();
- }
- }
-
- public void getInstitutionByID(String institutionID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
- checkReady();
- getInstitutionByID_call method_call = new getInstitutionByID_call(institutionID, resultHandler, this, ___protocolFactory, ___transport);
- this.___currentMethod = method_call;
- ___manager.call(method_call);
- }
-
- public static class getInstitutionByID_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String institutionID;
- public getInstitutionByID_call(String institutionID, 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.institutionID = institutionID;
- }
-
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
- prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInstitutionByID", org.apache.thrift.protocol.TMessageType.CALL, 0));
- getInstitutionByID_args args = new getInstitutionByID_args();
- args.setInstitutionID(institutionID);
- args.write(prot);
- prot.writeMessageEnd();
- }
-
- public String 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_getInstitutionByID();
- }
- }
-
- }
-
- public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
-
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
- processMap.put("getVersion", new getVersion());
- processMap.put("getFtpUser", new getFtpUser());
- processMap.put("authenticated", new authenticated());
- processMap.put("setSessionInvalid", new setSessionInvalid());
- processMap.put("DeleteFtpUser", new DeleteFtpUser());
- processMap.put("getPathOfImage", new getPathOfImage());
- processMap.put("setInstitution", new setInstitution());
- processMap.put("writeVLdata", new writeVLdata());
- processMap.put("getImageListPermissionWrite", new getImageListPermissionWrite());
- processMap.put("getImageListPermissionRead", new getImageListPermissionRead());
- processMap.put("getImageListPermissionLink", new getImageListPermissionLink());
- processMap.put("getImageListPermissionAdmin", new getImageListPermissionAdmin());
- processMap.put("getImageListAllTemplates", new getImageListAllTemplates());
- processMap.put("getImageList", new getImageList());
- processMap.put("getLectureList", new getLectureList());
- processMap.put("getLectureListPermissionRead", new getLectureListPermissionRead());
- processMap.put("getLectureListPermissionWrite", new getLectureListPermissionWrite());
- processMap.put("getLectureListPermissionAdmin", new getLectureListPermissionAdmin());
- processMap.put("getAllOS", new getAllOS());
- processMap.put("getAllUniversities", new getAllUniversities());
- processMap.put("getPersonData", new getPersonData());
- processMap.put("getItemOwner", new getItemOwner());
- processMap.put("setPerson", new setPerson());
- processMap.put("writeLecturedata", new writeLecturedata());
- processMap.put("startFileCopy", new startFileCopy());
- processMap.put("getImageData", new getImageData());
- processMap.put("getLectureData", new getLectureData());
- processMap.put("updateImageData", new updateImageData());
- processMap.put("deleteImageData", new deleteImageData());
- processMap.put("updateLecturedata", new updateLecturedata());
- processMap.put("deleteImageServer", new deleteImageServer());
- processMap.put("deleteImageByPath", new deleteImageByPath());
- processMap.put("connectedToLecture", new connectedToLecture());
- processMap.put("deleteLecture", new deleteLecture());
- processMap.put("checkUser", new checkUser());
- processMap.put("createUser", new createUser());
- processMap.put("writeImageRights", new writeImageRights());
- processMap.put("writeAdditionalImageRights", new writeAdditionalImageRights());
- processMap.put("writeLectureRights", new writeLectureRights());
- processMap.put("writeAdditionalLectureRights", new writeAdditionalLectureRights());
- processMap.put("getAllOtherSatelliteUsers", new getAllOtherSatelliteUsers());
- processMap.put("getPermissionForUserAndImage", new getPermissionForUserAndImage());
- processMap.put("getAdditionalImageContacts", new getAdditionalImageContacts());
- processMap.put("getPermissionForUserAndLecture", new getPermissionForUserAndLecture());
- processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions());
- processMap.put("deleteAllAdditionalLecturePermissions", new deleteAllAdditionalLecturePermissions());
- processMap.put("getOsNameForGuestOs", new getOsNameForGuestOs());
- processMap.put("userIsImageAdmin", new userIsImageAdmin());
- processMap.put("userIsLectureAdmin", new userIsLectureAdmin());
- processMap.put("createRandomUUID", new createRandomUUID());
- processMap.put("getInstitutionByID", new getInstitutionByID());
- return processMap;
- }
-
- public static class getVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVersion_args> {
- public getVersion() {
- super("getVersion");
- }
-
- public getVersion_args getEmptyArgsInstance() {
- return new getVersion_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getVersion_result getResult(I iface, getVersion_args args) throws org.apache.thrift.TException {
- getVersion_result result = new getVersion_result();
- result.success = iface.getVersion();
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class getFtpUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFtpUser_args> {
- public getFtpUser() {
- super("getFtpUser");
- }
-
- public getFtpUser_args getEmptyArgsInstance() {
- return new getFtpUser_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getFtpUser_result getResult(I iface, getFtpUser_args args) throws org.apache.thrift.TException {
- getFtpUser_result result = new getFtpUser_result();
- result.success = iface.getFtpUser(args.token);
- return result;
- }
- }
-
- public static class authenticated<I extends Iface> extends org.apache.thrift.ProcessFunction<I, authenticated_args> {
- public authenticated() {
- super("authenticated");
- }
-
- public authenticated_args getEmptyArgsInstance() {
- return new authenticated_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public authenticated_result getResult(I iface, authenticated_args args) throws org.apache.thrift.TException {
- authenticated_result result = new authenticated_result();
- result.success = iface.authenticated(args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class setSessionInvalid<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setSessionInvalid_args> {
- public setSessionInvalid() {
- super("setSessionInvalid");
- }
-
- public setSessionInvalid_args getEmptyArgsInstance() {
- return new setSessionInvalid_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public setSessionInvalid_result getResult(I iface, setSessionInvalid_args args) throws org.apache.thrift.TException {
- setSessionInvalid_result result = new setSessionInvalid_result();
- result.success = iface.setSessionInvalid(args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class DeleteFtpUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, DeleteFtpUser_args> {
- public DeleteFtpUser() {
- super("DeleteFtpUser");
- }
-
- public DeleteFtpUser_args getEmptyArgsInstance() {
- return new DeleteFtpUser_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public DeleteFtpUser_result getResult(I iface, DeleteFtpUser_args args) throws org.apache.thrift.TException {
- DeleteFtpUser_result result = new DeleteFtpUser_result();
- result.success = iface.DeleteFtpUser(args.user, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class getPathOfImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPathOfImage_args> {
- public getPathOfImage() {
- super("getPathOfImage");
- }
-
- public getPathOfImage_args getEmptyArgsInstance() {
- return new getPathOfImage_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getPathOfImage_result getResult(I iface, getPathOfImage_args args) throws org.apache.thrift.TException {
- getPathOfImage_result result = new getPathOfImage_result();
- result.success = iface.getPathOfImage(args.image_id, args.version, args.token);
- return result;
- }
- }
-
- public static class setInstitution<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setInstitution_args> {
- public setInstitution() {
- super("setInstitution");
- }
-
- public setInstitution_args getEmptyArgsInstance() {
- return new setInstitution_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public setInstitution_result getResult(I iface, setInstitution_args args) throws org.apache.thrift.TException {
- setInstitution_result result = new setInstitution_result();
- result.success = iface.setInstitution(args.university, args.token);
- return result;
- }
- }
-
- public static class writeVLdata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeVLdata_args> {
- public writeVLdata() {
- super("writeVLdata");
- }
-
- public writeVLdata_args getEmptyArgsInstance() {
- return new writeVLdata_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public writeVLdata_result getResult(I iface, writeVLdata_args args) throws org.apache.thrift.TException {
- writeVLdata_result result = new writeVLdata_result();
- result.success = iface.writeVLdata(args.imagename, args.desc, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os, args.uid, args.token, args.userID);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class getImageListPermissionWrite<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageListPermissionWrite_args> {
- public getImageListPermissionWrite() {
- super("getImageListPermissionWrite");
- }
-
- public getImageListPermissionWrite_args getEmptyArgsInstance() {
- return new getImageListPermissionWrite_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImageListPermissionWrite_result getResult(I iface, getImageListPermissionWrite_args args) throws org.apache.thrift.TException {
- getImageListPermissionWrite_result result = new getImageListPermissionWrite_result();
- result.success = iface.getImageListPermissionWrite(args.userID, args.token);
- return result;
- }
- }
-
- public static class getImageListPermissionRead<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageListPermissionRead_args> {
- public getImageListPermissionRead() {
- super("getImageListPermissionRead");
- }
-
- public getImageListPermissionRead_args getEmptyArgsInstance() {
- return new getImageListPermissionRead_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImageListPermissionRead_result getResult(I iface, getImageListPermissionRead_args args) throws org.apache.thrift.TException {
- getImageListPermissionRead_result result = new getImageListPermissionRead_result();
- result.success = iface.getImageListPermissionRead(args.userID, args.token);
- return result;
- }
- }
-
- public static class getImageListPermissionLink<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageListPermissionLink_args> {
- public getImageListPermissionLink() {
- super("getImageListPermissionLink");
- }
-
- public getImageListPermissionLink_args getEmptyArgsInstance() {
- return new getImageListPermissionLink_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImageListPermissionLink_result getResult(I iface, getImageListPermissionLink_args args) throws org.apache.thrift.TException {
- getImageListPermissionLink_result result = new getImageListPermissionLink_result();
- result.success = iface.getImageListPermissionLink(args.userID, args.token);
- return result;
- }
- }
-
- public static class getImageListPermissionAdmin<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageListPermissionAdmin_args> {
- public getImageListPermissionAdmin() {
- super("getImageListPermissionAdmin");
- }
-
- public getImageListPermissionAdmin_args getEmptyArgsInstance() {
- return new getImageListPermissionAdmin_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImageListPermissionAdmin_result getResult(I iface, getImageListPermissionAdmin_args args) throws org.apache.thrift.TException {
- getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_result();
- result.success = iface.getImageListPermissionAdmin(args.userID, args.token);
- return result;
- }
- }
-
- public static class getImageListAllTemplates<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageListAllTemplates_args> {
- public getImageListAllTemplates() {
- super("getImageListAllTemplates");
- }
-
- public getImageListAllTemplates_args getEmptyArgsInstance() {
- return new getImageListAllTemplates_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImageListAllTemplates_result getResult(I iface, getImageListAllTemplates_args args) throws org.apache.thrift.TException {
- getImageListAllTemplates_result result = new getImageListAllTemplates_result();
- result.success = iface.getImageListAllTemplates(args.token);
- return result;
- }
- }
-
- public static class getImageList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageList_args> {
- public getImageList() {
- super("getImageList");
- }
-
- public getImageList_args getEmptyArgsInstance() {
- return new getImageList_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImageList_result getResult(I iface, getImageList_args args) throws org.apache.thrift.TException {
- getImageList_result result = new getImageList_result();
- result.success = iface.getImageList(args.userID, args.token);
- return result;
- }
- }
-
- public static class getLectureList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureList_args> {
- public getLectureList() {
- super("getLectureList");
- }
-
- public getLectureList_args getEmptyArgsInstance() {
- return new getLectureList_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException {
- getLectureList_result result = new getLectureList_result();
- result.success = iface.getLectureList(args.token);
- return result;
- }
- }
-
- public static class getLectureListPermissionRead<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureListPermissionRead_args> {
- public getLectureListPermissionRead() {
- super("getLectureListPermissionRead");
- }
-
- public getLectureListPermissionRead_args getEmptyArgsInstance() {
- return new getLectureListPermissionRead_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getLectureListPermissionRead_result getResult(I iface, getLectureListPermissionRead_args args) throws org.apache.thrift.TException {
- getLectureListPermissionRead_result result = new getLectureListPermissionRead_result();
- result.success = iface.getLectureListPermissionRead(args.token);
- return result;
- }
- }
-
- public static class getLectureListPermissionWrite<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureListPermissionWrite_args> {
- public getLectureListPermissionWrite() {
- super("getLectureListPermissionWrite");
- }
-
- public getLectureListPermissionWrite_args getEmptyArgsInstance() {
- return new getLectureListPermissionWrite_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getLectureListPermissionWrite_result getResult(I iface, getLectureListPermissionWrite_args args) throws org.apache.thrift.TException {
- getLectureListPermissionWrite_result result = new getLectureListPermissionWrite_result();
- result.success = iface.getLectureListPermissionWrite(args.token);
- return result;
- }
- }
-
- public static class getLectureListPermissionAdmin<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureListPermissionAdmin_args> {
- public getLectureListPermissionAdmin() {
- super("getLectureListPermissionAdmin");
- }
-
- public getLectureListPermissionAdmin_args getEmptyArgsInstance() {
- return new getLectureListPermissionAdmin_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getLectureListPermissionAdmin_result getResult(I iface, getLectureListPermissionAdmin_args args) throws org.apache.thrift.TException {
- getLectureListPermissionAdmin_result result = new getLectureListPermissionAdmin_result();
- result.success = iface.getLectureListPermissionAdmin(args.token);
- return result;
- }
- }
-
- public static class getAllOS<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllOS_args> {
- public getAllOS() {
- super("getAllOS");
- }
-
- public getAllOS_args getEmptyArgsInstance() {
- return new getAllOS_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getAllOS_result getResult(I iface, getAllOS_args args) throws org.apache.thrift.TException {
- getAllOS_result result = new getAllOS_result();
- result.success = iface.getAllOS(args.token);
- return result;
- }
- }
-
- public static class getAllUniversities<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUniversities_args> {
- public getAllUniversities() {
- super("getAllUniversities");
- }
-
- public getAllUniversities_args getEmptyArgsInstance() {
- return new getAllUniversities_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getAllUniversities_result getResult(I iface, getAllUniversities_args args) throws org.apache.thrift.TException {
- getAllUniversities_result result = new getAllUniversities_result();
- result.success = iface.getAllUniversities(args.token);
- return result;
- }
- }
-
- public static class getPersonData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPersonData_args> {
- public getPersonData() {
- super("getPersonData");
- }
-
- public getPersonData_args getEmptyArgsInstance() {
- return new getPersonData_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getPersonData_result getResult(I iface, getPersonData_args args) throws org.apache.thrift.TException {
- getPersonData_result result = new getPersonData_result();
- result.success = iface.getPersonData(args.Vorname, args.Nachname, args.token);
- return result;
- }
- }
-
- public static class getItemOwner<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemOwner_args> {
- public getItemOwner() {
- super("getItemOwner");
- }
-
- public getItemOwner_args getEmptyArgsInstance() {
- return new getItemOwner_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getItemOwner_result getResult(I iface, getItemOwner_args args) throws org.apache.thrift.TException {
- getItemOwner_result result = new getItemOwner_result();
- result.success = iface.getItemOwner(args.itemID, args.token);
- return result;
- }
- }
-
- public static class setPerson<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setPerson_args> {
- public setPerson() {
- super("setPerson");
- }
-
- public setPerson_args getEmptyArgsInstance() {
- return new setPerson_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public setPerson_result getResult(I iface, setPerson_args args) throws org.apache.thrift.TException {
- setPerson_result result = new setPerson_result();
- iface.setPerson(args.userID, args.token, args.institution);
- return result;
- }
- }
-
- public static class writeLecturedata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeLecturedata_args> {
- public writeLecturedata() {
- super("writeLecturedata");
- }
-
- public writeLecturedata_args getEmptyArgsInstance() {
- return new writeLecturedata_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public writeLecturedata_result getResult(I iface, writeLecturedata_args args) throws org.apache.thrift.TException {
- writeLecturedata_result result = new writeLecturedata_result();
- result.success = iface.writeLecturedata(args.name, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.token, args.Tel, args.Fak, args.lectureID, args.university);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class startFileCopy<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startFileCopy_args> {
- public startFileCopy() {
- super("startFileCopy");
- }
-
- public startFileCopy_args getEmptyArgsInstance() {
- return new startFileCopy_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public startFileCopy_result getResult(I iface, startFileCopy_args args) throws org.apache.thrift.TException {
- startFileCopy_result result = new startFileCopy_result();
- result.success = iface.startFileCopy(args.file, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class getImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageData_args> {
- public getImageData() {
- super("getImageData");
- }
-
- public getImageData_args getEmptyArgsInstance() {
- return new getImageData_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getImageData_result getResult(I iface, getImageData_args args) throws org.apache.thrift.TException {
- getImageData_result result = new getImageData_result();
- result.success = iface.getImageData(args.imageid, args.imageversion, args.token);
- return result;
- }
- }
-
- public static class getLectureData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureData_args> {
- public getLectureData() {
- super("getLectureData");
- }
-
- public getLectureData_args getEmptyArgsInstance() {
- return new getLectureData_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getLectureData_result getResult(I iface, getLectureData_args args) throws org.apache.thrift.TException {
- getLectureData_result result = new getLectureData_result();
- result.success = iface.getLectureData(args.lectureid, args.token);
- return result;
- }
- }
-
- public static class updateImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageData_args> {
- public updateImageData() {
- super("updateImageData");
- }
-
- public updateImageData_args getEmptyArgsInstance() {
- return new updateImageData_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public updateImageData_result getResult(I iface, updateImageData_args args) throws org.apache.thrift.TException {
- updateImageData_result result = new updateImageData_result();
- result.success = iface.updateImageData(args.name, args.newName, args.desc, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class deleteImageData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteImageData_args> {
- public deleteImageData() {
- super("deleteImageData");
- }
-
- public deleteImageData_args getEmptyArgsInstance() {
- return new deleteImageData_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public deleteImageData_result getResult(I iface, deleteImageData_args args) throws org.apache.thrift.TException {
- deleteImageData_result result = new deleteImageData_result();
- result.success = iface.deleteImageData(args.id, args.version, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class updateLecturedata<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateLecturedata_args> {
- public updateLecturedata() {
- super("updateLecturedata");
- }
-
- public updateLecturedata_args getEmptyArgsInstance() {
- return new updateLecturedata_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public updateLecturedata_result getResult(I iface, updateLecturedata_args args) throws org.apache.thrift.TException {
- updateLecturedata_result result = new updateLecturedata_result();
- result.success = iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imageid, args.imageversion, args.token, args.Tel, args.Fak, args.id, args.university);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class deleteImageServer<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteImageServer_args> {
- public deleteImageServer() {
- super("deleteImageServer");
- }
-
- public deleteImageServer_args getEmptyArgsInstance() {
- return new deleteImageServer_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public deleteImageServer_result getResult(I iface, deleteImageServer_args args) throws org.apache.thrift.TException {
- deleteImageServer_result result = new deleteImageServer_result();
- result.success = iface.deleteImageServer(args.id, args.version, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class deleteImageByPath<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteImageByPath_args> {
- public deleteImageByPath() {
- super("deleteImageByPath");
- }
-
- public deleteImageByPath_args getEmptyArgsInstance() {
- return new deleteImageByPath_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public deleteImageByPath_result getResult(I iface, deleteImageByPath_args args) throws org.apache.thrift.TException {
- deleteImageByPath_result result = new deleteImageByPath_result();
- result.success = iface.deleteImageByPath(args.image_path);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class connectedToLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, connectedToLecture_args> {
- public connectedToLecture() {
- super("connectedToLecture");
- }
-
- public connectedToLecture_args getEmptyArgsInstance() {
- return new connectedToLecture_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public connectedToLecture_result getResult(I iface, connectedToLecture_args args) throws org.apache.thrift.TException {
- connectedToLecture_result result = new connectedToLecture_result();
- result.success = iface.connectedToLecture(args.id, args.version, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class deleteLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteLecture_args> {
- public deleteLecture() {
- super("deleteLecture");
- }
-
- public deleteLecture_args getEmptyArgsInstance() {
- return new deleteLecture_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public deleteLecture_result getResult(I iface, deleteLecture_args args) throws org.apache.thrift.TException {
- deleteLecture_result result = new deleteLecture_result();
- result.success = iface.deleteLecture(args.id, args.token, args.university);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class checkUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, checkUser_args> {
- public checkUser() {
- super("checkUser");
- }
-
- public checkUser_args getEmptyArgsInstance() {
- return new checkUser_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public checkUser_result getResult(I iface, checkUser_args args) throws org.apache.thrift.TException {
- checkUser_result result = new checkUser_result();
- result.success = iface.checkUser(args.username, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class createUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createUser_args> {
- public createUser() {
- super("createUser");
- }
-
- public createUser_args getEmptyArgsInstance() {
- return new createUser_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public createUser_result getResult(I iface, createUser_args args) throws org.apache.thrift.TException {
- createUser_result result = new createUser_result();
- result.success = iface.createUser(args.token, args.university);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class writeImageRights<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeImageRights_args> {
- public writeImageRights() {
- super("writeImageRights");
- }
-
- public writeImageRights_args getEmptyArgsInstance() {
- return new writeImageRights_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public writeImageRights_result getResult(I iface, writeImageRights_args args) throws org.apache.thrift.TException {
- writeImageRights_result result = new writeImageRights_result();
- result.success = iface.writeImageRights(args.imagename, args.token, args.role, args.university, args.userID);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class writeAdditionalImageRights<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeAdditionalImageRights_args> {
- public writeAdditionalImageRights() {
- super("writeAdditionalImageRights");
- }
-
- public writeAdditionalImageRights_args getEmptyArgsInstance() {
- return new writeAdditionalImageRights_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public writeAdditionalImageRights_result getResult(I iface, writeAdditionalImageRights_args args) throws org.apache.thrift.TException {
- writeAdditionalImageRights_result result = new writeAdditionalImageRights_result();
- result.success = iface.writeAdditionalImageRights(args.imageName, args.userID, args.isRead, args.isWrite, args.isLinkAllowed, args.isAdmin, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class writeLectureRights<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeLectureRights_args> {
- public writeLectureRights() {
- super("writeLectureRights");
- }
-
- public writeLectureRights_args getEmptyArgsInstance() {
- return new writeLectureRights_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public writeLectureRights_result getResult(I iface, writeLectureRights_args args) throws org.apache.thrift.TException {
- writeLectureRights_result result = new writeLectureRights_result();
- result.success = iface.writeLectureRights(args.lectureID, args.role, args.token, args.university, args.userID);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class writeAdditionalLectureRights<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeAdditionalLectureRights_args> {
- public writeAdditionalLectureRights() {
- super("writeAdditionalLectureRights");
- }
-
- public writeAdditionalLectureRights_args getEmptyArgsInstance() {
- return new writeAdditionalLectureRights_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public writeAdditionalLectureRights_result getResult(I iface, writeAdditionalLectureRights_args args) throws org.apache.thrift.TException {
- writeAdditionalLectureRights_result result = new writeAdditionalLectureRights_result();
- result.success = iface.writeAdditionalLectureRights(args.lectureName, args.userID, args.isRead, args.isWrite, args.isAdmin, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class getAllOtherSatelliteUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllOtherSatelliteUsers_args> {
- public getAllOtherSatelliteUsers() {
- super("getAllOtherSatelliteUsers");
- }
-
- public getAllOtherSatelliteUsers_args getEmptyArgsInstance() {
- return new getAllOtherSatelliteUsers_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getAllOtherSatelliteUsers_result getResult(I iface, getAllOtherSatelliteUsers_args args) throws org.apache.thrift.TException {
- getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_result();
- result.success = iface.getAllOtherSatelliteUsers(args.userID, args.token);
- return result;
- }
- }
-
- public static class getPermissionForUserAndImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPermissionForUserAndImage_args> {
- public getPermissionForUserAndImage() {
- super("getPermissionForUserAndImage");
- }
-
- public getPermissionForUserAndImage_args getEmptyArgsInstance() {
- return new getPermissionForUserAndImage_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getPermissionForUserAndImage_result getResult(I iface, getPermissionForUserAndImage_args args) throws org.apache.thrift.TException {
- getPermissionForUserAndImage_result result = new getPermissionForUserAndImage_result();
- result.success = iface.getPermissionForUserAndImage(args.token, args.imageID, args.userID);
- return result;
- }
- }
-
- public static class getAdditionalImageContacts<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAdditionalImageContacts_args> {
- public getAdditionalImageContacts() {
- super("getAdditionalImageContacts");
- }
-
- public getAdditionalImageContacts_args getEmptyArgsInstance() {
- return new getAdditionalImageContacts_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getAdditionalImageContacts_result getResult(I iface, getAdditionalImageContacts_args args) throws org.apache.thrift.TException {
- getAdditionalImageContacts_result result = new getAdditionalImageContacts_result();
- result.success = iface.getAdditionalImageContacts(args.imageID, args.token);
- return result;
- }
- }
-
- public static class getPermissionForUserAndLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPermissionForUserAndLecture_args> {
- public getPermissionForUserAndLecture() {
- super("getPermissionForUserAndLecture");
- }
-
- public getPermissionForUserAndLecture_args getEmptyArgsInstance() {
- return new getPermissionForUserAndLecture_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getPermissionForUserAndLecture_result getResult(I iface, getPermissionForUserAndLecture_args args) throws org.apache.thrift.TException {
- getPermissionForUserAndLecture_result result = new getPermissionForUserAndLecture_result();
- result.success = iface.getPermissionForUserAndLecture(args.token, args.lectureID, args.userID);
- return result;
- }
- }
-
- public static class deleteAllAdditionalImagePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteAllAdditionalImagePermissions_args> {
- public deleteAllAdditionalImagePermissions() {
- super("deleteAllAdditionalImagePermissions");
- }
-
- public deleteAllAdditionalImagePermissions_args getEmptyArgsInstance() {
- return new deleteAllAdditionalImagePermissions_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public deleteAllAdditionalImagePermissions_result getResult(I iface, deleteAllAdditionalImagePermissions_args args) throws org.apache.thrift.TException {
- deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_result();
- iface.deleteAllAdditionalImagePermissions(args.imageID, args.token, args.userID);
- return result;
- }
- }
-
- public static class deleteAllAdditionalLecturePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteAllAdditionalLecturePermissions_args> {
- public deleteAllAdditionalLecturePermissions() {
- super("deleteAllAdditionalLecturePermissions");
- }
-
- public deleteAllAdditionalLecturePermissions_args getEmptyArgsInstance() {
- return new deleteAllAdditionalLecturePermissions_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public deleteAllAdditionalLecturePermissions_result getResult(I iface, deleteAllAdditionalLecturePermissions_args args) throws org.apache.thrift.TException {
- deleteAllAdditionalLecturePermissions_result result = new deleteAllAdditionalLecturePermissions_result();
- iface.deleteAllAdditionalLecturePermissions(args.lectureID, args.token, args.userID);
- return result;
- }
- }
-
- public static class getOsNameForGuestOs<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOsNameForGuestOs_args> {
- public getOsNameForGuestOs() {
- super("getOsNameForGuestOs");
- }
-
- public getOsNameForGuestOs_args getEmptyArgsInstance() {
- return new getOsNameForGuestOs_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getOsNameForGuestOs_result getResult(I iface, getOsNameForGuestOs_args args) throws org.apache.thrift.TException {
- getOsNameForGuestOs_result result = new getOsNameForGuestOs_result();
- result.success = iface.getOsNameForGuestOs(args.guestOS, args.token);
- return result;
- }
- }
-
- public static class userIsImageAdmin<I extends Iface> extends org.apache.thrift.ProcessFunction<I, userIsImageAdmin_args> {
- public userIsImageAdmin() {
- super("userIsImageAdmin");
- }
-
- public userIsImageAdmin_args getEmptyArgsInstance() {
- return new userIsImageAdmin_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public userIsImageAdmin_result getResult(I iface, userIsImageAdmin_args args) throws org.apache.thrift.TException {
- userIsImageAdmin_result result = new userIsImageAdmin_result();
- result.success = iface.userIsImageAdmin(args.imageID, args.token, args.userID);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class userIsLectureAdmin<I extends Iface> extends org.apache.thrift.ProcessFunction<I, userIsLectureAdmin_args> {
- public userIsLectureAdmin() {
- super("userIsLectureAdmin");
- }
-
- public userIsLectureAdmin_args getEmptyArgsInstance() {
- return new userIsLectureAdmin_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public userIsLectureAdmin_result getResult(I iface, userIsLectureAdmin_args args) throws org.apache.thrift.TException {
- userIsLectureAdmin_result result = new userIsLectureAdmin_result();
- result.success = iface.userIsLectureAdmin(args.userID, args.lectureID, args.token);
- result.setSuccessIsSet(true);
- return result;
- }
- }
-
- public static class createRandomUUID<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRandomUUID_args> {
- public createRandomUUID() {
- super("createRandomUUID");
- }
-
- public createRandomUUID_args getEmptyArgsInstance() {
- return new createRandomUUID_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public createRandomUUID_result getResult(I iface, createRandomUUID_args args) throws org.apache.thrift.TException {
- createRandomUUID_result result = new createRandomUUID_result();
- result.success = iface.createRandomUUID(args.token);
- return result;
- }
- }
-
- public static class getInstitutionByID<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInstitutionByID_args> {
- public getInstitutionByID() {
- super("getInstitutionByID");
- }
-
- public getInstitutionByID_args getEmptyArgsInstance() {
- return new getInstitutionByID_args();
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public getInstitutionByID_result getResult(I iface, getInstitutionByID_args args) throws org.apache.thrift.TException {
- getInstitutionByID_result result = new getInstitutionByID_result();
- result.success = iface.getInstitutionByID(args.institutionID);
- return result;
- }
- }
-
- }
-
- public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
- public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
- }
-
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- super(iface, getProcessMap(processMap));
- }
-
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
- processMap.put("getVersion", new getVersion());
- processMap.put("getFtpUser", new getFtpUser());
- processMap.put("authenticated", new authenticated());
- processMap.put("setSessionInvalid", new setSessionInvalid());
- processMap.put("DeleteFtpUser", new DeleteFtpUser());
- processMap.put("getPathOfImage", new getPathOfImage());
- processMap.put("setInstitution", new setInstitution());
- processMap.put("writeVLdata", new writeVLdata());
- processMap.put("getImageListPermissionWrite", new getImageListPermissionWrite());
- processMap.put("getImageListPermissionRead", new getImageListPermissionRead());
- processMap.put("getImageListPermissionLink", new getImageListPermissionLink());
- processMap.put("getImageListPermissionAdmin", new getImageListPermissionAdmin());
- processMap.put("getImageListAllTemplates", new getImageListAllTemplates());
- processMap.put("getImageList", new getImageList());
- processMap.put("getLectureList", new getLectureList());
- processMap.put("getLectureListPermissionRead", new getLectureListPermissionRead());
- processMap.put("getLectureListPermissionWrite", new getLectureListPermissionWrite());
- processMap.put("getLectureListPermissionAdmin", new getLectureListPermissionAdmin());
- processMap.put("getAllOS", new getAllOS());
- processMap.put("getAllUniversities", new getAllUniversities());
- processMap.put("getPersonData", new getPersonData());
- processMap.put("getItemOwner", new getItemOwner());
- processMap.put("setPerson", new setPerson());
- processMap.put("writeLecturedata", new writeLecturedata());
- processMap.put("startFileCopy", new startFileCopy());
- processMap.put("getImageData", new getImageData());
- processMap.put("getLectureData", new getLectureData());
- processMap.put("updateImageData", new updateImageData());
- processMap.put("deleteImageData", new deleteImageData());
- processMap.put("updateLecturedata", new updateLecturedata());
- processMap.put("deleteImageServer", new deleteImageServer());
- processMap.put("deleteImageByPath", new deleteImageByPath());
- processMap.put("connectedToLecture", new connectedToLecture());
- processMap.put("deleteLecture", new deleteLecture());
- processMap.put("checkUser", new checkUser());
- processMap.put("createUser", new createUser());
- processMap.put("writeImageRights", new writeImageRights());
- processMap.put("writeAdditionalImageRights", new writeAdditionalImageRights());
- processMap.put("writeLectureRights", new writeLectureRights());
- processMap.put("writeAdditionalLectureRights", new writeAdditionalLectureRights());
- processMap.put("getAllOtherSatelliteUsers", new getAllOtherSatelliteUsers());
- processMap.put("getPermissionForUserAndImage", new getPermissionForUserAndImage());
- processMap.put("getAdditionalImageContacts", new getAdditionalImageContacts());
- processMap.put("getPermissionForUserAndLecture", new getPermissionForUserAndLecture());
- processMap.put("deleteAllAdditionalImagePermissions", new deleteAllAdditionalImagePermissions());
- processMap.put("deleteAllAdditionalLecturePermissions", new deleteAllAdditionalLecturePermissions());
- processMap.put("getOsNameForGuestOs", new getOsNameForGuestOs());
- processMap.put("userIsImageAdmin", new userIsImageAdmin());
- processMap.put("userIsLectureAdmin", new userIsLectureAdmin());
- processMap.put("createRandomUUID", new createRandomUUID());
- processMap.put("getInstitutionByID", new getInstitutionByID());
- return processMap;
- }
-
- public static class getVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVersion_args, Long> {
- public getVersion() {
- super("getVersion");
- }
-
- public getVersion_args getEmptyArgsInstance() {
- return new getVersion_args();
- }
-
- public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Long>() {
- public void onComplete(Long o) {
- getVersion_result result = new getVersion_result();
- result.success = o;
- result.setSuccessIsSet(true);
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getVersion_result result = new getVersion_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
- iface.getVersion(resultHandler);
- }
- }
-
- public static class getFtpUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getFtpUser_args, User> {
- public getFtpUser() {
- super("getFtpUser");
- }
-
- public getFtpUser_args getEmptyArgsInstance() {
- return new getFtpUser_args();
- }
-
- public AsyncMethodCallback<User> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<User>() {
- public void onComplete(User o) {
- getFtpUser_result result = new getFtpUser_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getFtpUser_result result = new getFtpUser_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, getFtpUser_args args, org.apache.thrift.async.AsyncMethodCallback<User> resultHandler) throws TException {
- iface.getFtpUser(args.token,resultHandler);
- }
- }
-
- public static class authenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, authenticated_args, Boolean> {
- public authenticated() {
- super("authenticated");
- }
-
- public authenticated_args getEmptyArgsInstance() {
- return new authenticated_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- authenticated_result result = new authenticated_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;
- authenticated_result result = new authenticated_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, authenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.authenticated(args.token,resultHandler);
- }
- }
-
- public static class setSessionInvalid<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setSessionInvalid_args, Boolean> {
- public setSessionInvalid() {
- super("setSessionInvalid");
- }
-
- public setSessionInvalid_args getEmptyArgsInstance() {
- return new setSessionInvalid_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- setSessionInvalid_result result = new setSessionInvalid_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;
- setSessionInvalid_result result = new setSessionInvalid_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, setSessionInvalid_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.setSessionInvalid(args.token,resultHandler);
- }
- }
-
- public static class DeleteFtpUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, DeleteFtpUser_args, Long> {
- public DeleteFtpUser() {
- super("DeleteFtpUser");
- }
-
- public DeleteFtpUser_args getEmptyArgsInstance() {
- return new DeleteFtpUser_args();
- }
-
- public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Long>() {
- public void onComplete(Long o) {
- DeleteFtpUser_result result = new DeleteFtpUser_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;
- DeleteFtpUser_result result = new DeleteFtpUser_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, DeleteFtpUser_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
- iface.DeleteFtpUser(args.user, args.token,resultHandler);
- }
- }
-
- public static class getPathOfImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPathOfImage_args, String> {
- public getPathOfImage() {
- super("getPathOfImage");
- }
-
- public getPathOfImage_args getEmptyArgsInstance() {
- return new getPathOfImage_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- getPathOfImage_result result = new getPathOfImage_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getPathOfImage_result result = new getPathOfImage_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, getPathOfImage_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.getPathOfImage(args.image_id, args.version, args.token,resultHandler);
- }
- }
-
- public static class setInstitution<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setInstitution_args, String> {
- public setInstitution() {
- super("setInstitution");
- }
-
- public setInstitution_args getEmptyArgsInstance() {
- return new setInstitution_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- setInstitution_result result = new setInstitution_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- setInstitution_result result = new setInstitution_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, setInstitution_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.setInstitution(args.university, args.token,resultHandler);
- }
- }
-
- public static class writeVLdata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeVLdata_args, Boolean> {
- public writeVLdata() {
- super("writeVLdata");
- }
-
- public writeVLdata_args getEmptyArgsInstance() {
- return new writeVLdata_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- writeVLdata_result result = new writeVLdata_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;
- writeVLdata_result result = new writeVLdata_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, writeVLdata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeVLdata(args.imagename, args.desc, args.Tel, args.Fak, args.license, args.internet, args.ram, args.cpu, args.imagePath, args.isTemplate, args.filesize, args.shareMode, args.os, args.uid, args.token, args.userID,resultHandler);
- }
- }
-
- public static class getImageListPermissionWrite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageListPermissionWrite_args, List<Image>> {
- public getImageListPermissionWrite() {
- super("getImageListPermissionWrite");
- }
-
- public getImageListPermissionWrite_args getEmptyArgsInstance() {
- return new getImageListPermissionWrite_args();
- }
-
- public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Image>>() {
- public void onComplete(List<Image> o) {
- getImageListPermissionWrite_result result = new getImageListPermissionWrite_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImageListPermissionWrite_result result = new getImageListPermissionWrite_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, getImageListPermissionWrite_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException {
- iface.getImageListPermissionWrite(args.userID, args.token,resultHandler);
- }
- }
-
- public static class getImageListPermissionRead<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageListPermissionRead_args, List<Image>> {
- public getImageListPermissionRead() {
- super("getImageListPermissionRead");
- }
-
- public getImageListPermissionRead_args getEmptyArgsInstance() {
- return new getImageListPermissionRead_args();
- }
-
- public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Image>>() {
- public void onComplete(List<Image> o) {
- getImageListPermissionRead_result result = new getImageListPermissionRead_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImageListPermissionRead_result result = new getImageListPermissionRead_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, getImageListPermissionRead_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException {
- iface.getImageListPermissionRead(args.userID, args.token,resultHandler);
- }
- }
-
- public static class getImageListPermissionLink<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageListPermissionLink_args, List<Image>> {
- public getImageListPermissionLink() {
- super("getImageListPermissionLink");
- }
-
- public getImageListPermissionLink_args getEmptyArgsInstance() {
- return new getImageListPermissionLink_args();
- }
-
- public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Image>>() {
- public void onComplete(List<Image> o) {
- getImageListPermissionLink_result result = new getImageListPermissionLink_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImageListPermissionLink_result result = new getImageListPermissionLink_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, getImageListPermissionLink_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException {
- iface.getImageListPermissionLink(args.userID, args.token,resultHandler);
- }
- }
-
- public static class getImageListPermissionAdmin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageListPermissionAdmin_args, List<Image>> {
- public getImageListPermissionAdmin() {
- super("getImageListPermissionAdmin");
- }
-
- public getImageListPermissionAdmin_args getEmptyArgsInstance() {
- return new getImageListPermissionAdmin_args();
- }
-
- public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Image>>() {
- public void onComplete(List<Image> o) {
- getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImageListPermissionAdmin_result result = new getImageListPermissionAdmin_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, getImageListPermissionAdmin_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException {
- iface.getImageListPermissionAdmin(args.userID, args.token,resultHandler);
- }
- }
-
- public static class getImageListAllTemplates<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageListAllTemplates_args, List<Image>> {
- public getImageListAllTemplates() {
- super("getImageListAllTemplates");
- }
-
- public getImageListAllTemplates_args getEmptyArgsInstance() {
- return new getImageListAllTemplates_args();
- }
-
- public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Image>>() {
- public void onComplete(List<Image> o) {
- getImageListAllTemplates_result result = new getImageListAllTemplates_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImageListAllTemplates_result result = new getImageListAllTemplates_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, getImageListAllTemplates_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException {
- iface.getImageListAllTemplates(args.token,resultHandler);
- }
- }
-
- public static class getImageList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageList_args, List<Image>> {
- public getImageList() {
- super("getImageList");
- }
-
- public getImageList_args getEmptyArgsInstance() {
- return new getImageList_args();
- }
-
- public AsyncMethodCallback<List<Image>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Image>>() {
- public void onComplete(List<Image> o) {
- getImageList_result result = new getImageList_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImageList_result result = new getImageList_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<List<Image>> resultHandler) throws TException {
- iface.getImageList(args.userID, args.token,resultHandler);
- }
- }
-
- public static class getLectureList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureList_args, List<Lecture>> {
- public getLectureList() {
- super("getLectureList");
- }
-
- public getLectureList_args getEmptyArgsInstance() {
- return new getLectureList_args();
- }
-
- public AsyncMethodCallback<List<Lecture>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Lecture>>() {
- public void onComplete(List<Lecture> o) {
- getLectureList_result result = new getLectureList_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getLectureList_result result = new getLectureList_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback<List<Lecture>> resultHandler) throws TException {
- iface.getLectureList(args.token,resultHandler);
- }
- }
-
- public static class getLectureListPermissionRead<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureListPermissionRead_args, List<Lecture>> {
- public getLectureListPermissionRead() {
- super("getLectureListPermissionRead");
- }
-
- public getLectureListPermissionRead_args getEmptyArgsInstance() {
- return new getLectureListPermissionRead_args();
- }
-
- public AsyncMethodCallback<List<Lecture>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Lecture>>() {
- public void onComplete(List<Lecture> o) {
- getLectureListPermissionRead_result result = new getLectureListPermissionRead_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getLectureListPermissionRead_result result = new getLectureListPermissionRead_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, getLectureListPermissionRead_args args, org.apache.thrift.async.AsyncMethodCallback<List<Lecture>> resultHandler) throws TException {
- iface.getLectureListPermissionRead(args.token,resultHandler);
- }
- }
-
- public static class getLectureListPermissionWrite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureListPermissionWrite_args, List<Lecture>> {
- public getLectureListPermissionWrite() {
- super("getLectureListPermissionWrite");
- }
-
- public getLectureListPermissionWrite_args getEmptyArgsInstance() {
- return new getLectureListPermissionWrite_args();
- }
-
- public AsyncMethodCallback<List<Lecture>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Lecture>>() {
- public void onComplete(List<Lecture> o) {
- getLectureListPermissionWrite_result result = new getLectureListPermissionWrite_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getLectureListPermissionWrite_result result = new getLectureListPermissionWrite_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, getLectureListPermissionWrite_args args, org.apache.thrift.async.AsyncMethodCallback<List<Lecture>> resultHandler) throws TException {
- iface.getLectureListPermissionWrite(args.token,resultHandler);
- }
- }
-
- public static class getLectureListPermissionAdmin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureListPermissionAdmin_args, List<Lecture>> {
- public getLectureListPermissionAdmin() {
- super("getLectureListPermissionAdmin");
- }
-
- public getLectureListPermissionAdmin_args getEmptyArgsInstance() {
- return new getLectureListPermissionAdmin_args();
- }
-
- public AsyncMethodCallback<List<Lecture>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Lecture>>() {
- public void onComplete(List<Lecture> o) {
- getLectureListPermissionAdmin_result result = new getLectureListPermissionAdmin_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getLectureListPermissionAdmin_result result = new getLectureListPermissionAdmin_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, getLectureListPermissionAdmin_args args, org.apache.thrift.async.AsyncMethodCallback<List<Lecture>> resultHandler) throws TException {
- iface.getLectureListPermissionAdmin(args.token,resultHandler);
- }
- }
-
- public static class getAllOS<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllOS_args, List<String>> {
- public getAllOS() {
- super("getAllOS");
- }
-
- public getAllOS_args getEmptyArgsInstance() {
- return new getAllOS_args();
- }
-
- public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<String>>() {
- public void onComplete(List<String> o) {
- getAllOS_result result = new getAllOS_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getAllOS_result result = new getAllOS_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, getAllOS_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
- iface.getAllOS(args.token,resultHandler);
- }
- }
-
- public static class getAllUniversities<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUniversities_args, List<String>> {
- public getAllUniversities() {
- super("getAllUniversities");
- }
-
- public getAllUniversities_args getEmptyArgsInstance() {
- return new getAllUniversities_args();
- }
-
- public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<String>>() {
- public void onComplete(List<String> o) {
- getAllUniversities_result result = new getAllUniversities_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getAllUniversities_result result = new getAllUniversities_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, getAllUniversities_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
- iface.getAllUniversities(args.token,resultHandler);
- }
- }
-
- public static class getPersonData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPersonData_args, Map<String,String>> {
- public getPersonData() {
- super("getPersonData");
- }
-
- public getPersonData_args getEmptyArgsInstance() {
- return new getPersonData_args();
- }
-
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getPersonData_result result = new getPersonData_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getPersonData_result result = new getPersonData_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, getPersonData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getPersonData(args.Vorname, args.Nachname, args.token,resultHandler);
- }
- }
-
- public static class getItemOwner<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getItemOwner_args, Map<String,String>> {
- public getItemOwner() {
- super("getItemOwner");
- }
-
- public getItemOwner_args getEmptyArgsInstance() {
- return new getItemOwner_args();
- }
-
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getItemOwner_result result = new getItemOwner_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getItemOwner_result result = new getItemOwner_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, getItemOwner_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getItemOwner(args.itemID, args.token,resultHandler);
- }
- }
-
- public static class setPerson<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setPerson_args, Void> {
- public setPerson() {
- super("setPerson");
- }
-
- public setPerson_args getEmptyArgsInstance() {
- return new setPerson_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- setPerson_result result = new setPerson_result();
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- setPerson_result result = new setPerson_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, setPerson_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.setPerson(args.userID, args.token, args.institution,resultHandler);
- }
- }
-
- public static class writeLecturedata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeLecturedata_args, Boolean> {
- public writeLecturedata() {
- super("writeLecturedata");
- }
-
- public writeLecturedata_args getEmptyArgsInstance() {
- return new writeLecturedata_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- writeLecturedata_result result = new writeLecturedata_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;
- writeLecturedata_result result = new writeLecturedata_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, writeLecturedata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeLecturedata(args.name, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imagename, args.token, args.Tel, args.Fak, args.lectureID, args.university,resultHandler);
- }
- }
-
- public static class startFileCopy<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startFileCopy_args, Boolean> {
- public startFileCopy() {
- super("startFileCopy");
- }
-
- public startFileCopy_args getEmptyArgsInstance() {
- return new startFileCopy_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- startFileCopy_result result = new startFileCopy_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;
- startFileCopy_result result = new startFileCopy_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, startFileCopy_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.startFileCopy(args.file, args.token,resultHandler);
- }
- }
-
- public static class getImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageData_args, Map<String,String>> {
- public getImageData() {
- super("getImageData");
- }
-
- public getImageData_args getEmptyArgsInstance() {
- return new getImageData_args();
- }
-
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getImageData_result result = new getImageData_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getImageData_result result = new getImageData_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, getImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getImageData(args.imageid, args.imageversion, args.token,resultHandler);
- }
- }
-
- public static class getLectureData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureData_args, Map<String,String>> {
- public getLectureData() {
- super("getLectureData");
- }
-
- public getLectureData_args getEmptyArgsInstance() {
- return new getLectureData_args();
- }
-
- public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,String>>() {
- public void onComplete(Map<String,String> o) {
- getLectureData_result result = new getLectureData_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getLectureData_result result = new getLectureData_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, getLectureData_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException {
- iface.getLectureData(args.lectureid, args.token,resultHandler);
- }
- }
-
- public static class updateImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageData_args, Boolean> {
- public updateImageData() {
- super("updateImageData");
- }
-
- public updateImageData_args getEmptyArgsInstance() {
- return new updateImageData_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateImageData_result result = new updateImageData_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;
- updateImageData_result result = new updateImageData_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, updateImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateImageData(args.name, args.newName, args.desc, args.image_path, args.license, args.internet, args.ram, args.cpu, args.id, args.version, args.isTemplate, args.filesize, args.shareMode, args.os, args.token,resultHandler);
- }
- }
-
- public static class deleteImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteImageData_args, Boolean> {
- public deleteImageData() {
- super("deleteImageData");
- }
-
- public deleteImageData_args getEmptyArgsInstance() {
- return new deleteImageData_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteImageData_result result = new deleteImageData_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;
- deleteImageData_result result = new deleteImageData_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, deleteImageData_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteImageData(args.id, args.version, args.token,resultHandler);
- }
- }
-
- public static class updateLecturedata<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateLecturedata_args, Boolean> {
- public updateLecturedata() {
- super("updateLecturedata");
- }
-
- public updateLecturedata_args getEmptyArgsInstance() {
- return new updateLecturedata_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- updateLecturedata_result result = new updateLecturedata_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;
- updateLecturedata_result result = new updateLecturedata_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, updateLecturedata_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.updateLecturedata(args.name, args.newName, args.shortdesc, args.desc, args.startDate, args.endDate, args.isActive, args.imageid, args.imageversion, args.token, args.Tel, args.Fak, args.id, args.university,resultHandler);
- }
- }
-
- public static class deleteImageServer<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteImageServer_args, Boolean> {
- public deleteImageServer() {
- super("deleteImageServer");
- }
-
- public deleteImageServer_args getEmptyArgsInstance() {
- return new deleteImageServer_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteImageServer_result result = new deleteImageServer_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;
- deleteImageServer_result result = new deleteImageServer_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, deleteImageServer_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteImageServer(args.id, args.version, args.token,resultHandler);
- }
- }
-
- public static class deleteImageByPath<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteImageByPath_args, Boolean> {
- public deleteImageByPath() {
- super("deleteImageByPath");
- }
-
- public deleteImageByPath_args getEmptyArgsInstance() {
- return new deleteImageByPath_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteImageByPath_result result = new deleteImageByPath_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;
- deleteImageByPath_result result = new deleteImageByPath_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, deleteImageByPath_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteImageByPath(args.image_path,resultHandler);
- }
- }
-
- public static class connectedToLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, connectedToLecture_args, Boolean> {
- public connectedToLecture() {
- super("connectedToLecture");
- }
-
- public connectedToLecture_args getEmptyArgsInstance() {
- return new connectedToLecture_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- connectedToLecture_result result = new connectedToLecture_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;
- connectedToLecture_result result = new connectedToLecture_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, connectedToLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.connectedToLecture(args.id, args.version, args.token,resultHandler);
- }
- }
-
- public static class deleteLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteLecture_args, Boolean> {
- public deleteLecture() {
- super("deleteLecture");
- }
-
- public deleteLecture_args getEmptyArgsInstance() {
- return new deleteLecture_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- deleteLecture_result result = new deleteLecture_result();
- result.success = o;
- result.setSuccessIsSet(true);
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- deleteLecture_result result = new deleteLecture_result();
- {
- msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
- }
- try {
- fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
- }
- fb.close();
- }
- };
- }
-
- protected boolean isOneway() {
- return false;
- }
-
- public void start(I iface, deleteLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.deleteLecture(args.id, args.token, args.university,resultHandler);
- }
- }
-
- public static class checkUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkUser_args, Boolean> {
- public checkUser() {
- super("checkUser");
- }
-
- public checkUser_args getEmptyArgsInstance() {
- return new checkUser_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- checkUser_result result = new checkUser_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;
- checkUser_result result = new checkUser_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, checkUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.checkUser(args.username, args.token,resultHandler);
- }
- }
-
- public static class createUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createUser_args, Boolean> {
- public createUser() {
- super("createUser");
- }
-
- public createUser_args getEmptyArgsInstance() {
- return new createUser_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- createUser_result result = new createUser_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;
- createUser_result result = new createUser_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, createUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.createUser(args.token, args.university,resultHandler);
- }
- }
-
- public static class writeImageRights<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeImageRights_args, Boolean> {
- public writeImageRights() {
- super("writeImageRights");
- }
-
- public writeImageRights_args getEmptyArgsInstance() {
- return new writeImageRights_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- writeImageRights_result result = new writeImageRights_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;
- writeImageRights_result result = new writeImageRights_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, writeImageRights_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeImageRights(args.imagename, args.token, args.role, args.university, args.userID,resultHandler);
- }
- }
-
- public static class writeAdditionalImageRights<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeAdditionalImageRights_args, Boolean> {
- public writeAdditionalImageRights() {
- super("writeAdditionalImageRights");
- }
-
- public writeAdditionalImageRights_args getEmptyArgsInstance() {
- return new writeAdditionalImageRights_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- writeAdditionalImageRights_result result = new writeAdditionalImageRights_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;
- writeAdditionalImageRights_result result = new writeAdditionalImageRights_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, writeAdditionalImageRights_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeAdditionalImageRights(args.imageName, args.userID, args.isRead, args.isWrite, args.isLinkAllowed, args.isAdmin, args.token,resultHandler);
- }
- }
-
- public static class writeLectureRights<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeLectureRights_args, Boolean> {
- public writeLectureRights() {
- super("writeLectureRights");
- }
-
- public writeLectureRights_args getEmptyArgsInstance() {
- return new writeLectureRights_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- writeLectureRights_result result = new writeLectureRights_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;
- writeLectureRights_result result = new writeLectureRights_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, writeLectureRights_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeLectureRights(args.lectureID, args.role, args.token, args.university, args.userID,resultHandler);
- }
- }
-
- public static class writeAdditionalLectureRights<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeAdditionalLectureRights_args, Boolean> {
- public writeAdditionalLectureRights() {
- super("writeAdditionalLectureRights");
- }
-
- public writeAdditionalLectureRights_args getEmptyArgsInstance() {
- return new writeAdditionalLectureRights_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- writeAdditionalLectureRights_result result = new writeAdditionalLectureRights_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;
- writeAdditionalLectureRights_result result = new writeAdditionalLectureRights_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, writeAdditionalLectureRights_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.writeAdditionalLectureRights(args.lectureName, args.userID, args.isRead, args.isWrite, args.isAdmin, args.token,resultHandler);
- }
- }
-
- public static class getAllOtherSatelliteUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllOtherSatelliteUsers_args, List<Person>> {
- public getAllOtherSatelliteUsers() {
- super("getAllOtherSatelliteUsers");
- }
-
- public getAllOtherSatelliteUsers_args getEmptyArgsInstance() {
- return new getAllOtherSatelliteUsers_args();
- }
-
- public AsyncMethodCallback<List<Person>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Person>>() {
- public void onComplete(List<Person> o) {
- getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_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, getAllOtherSatelliteUsers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Person>> resultHandler) throws TException {
- iface.getAllOtherSatelliteUsers(args.userID, args.token,resultHandler);
- }
- }
-
- public static class getPermissionForUserAndImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPermissionForUserAndImage_args, List<Person>> {
- public getPermissionForUserAndImage() {
- super("getPermissionForUserAndImage");
- }
-
- public getPermissionForUserAndImage_args getEmptyArgsInstance() {
- return new getPermissionForUserAndImage_args();
- }
-
- public AsyncMethodCallback<List<Person>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Person>>() {
- public void onComplete(List<Person> o) {
- getPermissionForUserAndImage_result result = new getPermissionForUserAndImage_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getPermissionForUserAndImage_result result = new getPermissionForUserAndImage_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, getPermissionForUserAndImage_args args, org.apache.thrift.async.AsyncMethodCallback<List<Person>> resultHandler) throws TException {
- iface.getPermissionForUserAndImage(args.token, args.imageID, args.userID,resultHandler);
- }
- }
-
- public static class getAdditionalImageContacts<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAdditionalImageContacts_args, List<String>> {
- public getAdditionalImageContacts() {
- super("getAdditionalImageContacts");
- }
-
- public getAdditionalImageContacts_args getEmptyArgsInstance() {
- return new getAdditionalImageContacts_args();
- }
-
- public AsyncMethodCallback<List<String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<String>>() {
- public void onComplete(List<String> o) {
- getAdditionalImageContacts_result result = new getAdditionalImageContacts_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getAdditionalImageContacts_result result = new getAdditionalImageContacts_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, getAdditionalImageContacts_args args, org.apache.thrift.async.AsyncMethodCallback<List<String>> resultHandler) throws TException {
- iface.getAdditionalImageContacts(args.imageID, args.token,resultHandler);
- }
- }
-
- public static class getPermissionForUserAndLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPermissionForUserAndLecture_args, List<Person>> {
- public getPermissionForUserAndLecture() {
- super("getPermissionForUserAndLecture");
- }
-
- public getPermissionForUserAndLecture_args getEmptyArgsInstance() {
- return new getPermissionForUserAndLecture_args();
- }
-
- public AsyncMethodCallback<List<Person>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Person>>() {
- public void onComplete(List<Person> o) {
- getPermissionForUserAndLecture_result result = new getPermissionForUserAndLecture_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getPermissionForUserAndLecture_result result = new getPermissionForUserAndLecture_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, getPermissionForUserAndLecture_args args, org.apache.thrift.async.AsyncMethodCallback<List<Person>> resultHandler) throws TException {
- iface.getPermissionForUserAndLecture(args.token, args.lectureID, args.userID,resultHandler);
- }
- }
-
- public static class deleteAllAdditionalImagePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteAllAdditionalImagePermissions_args, Void> {
- public deleteAllAdditionalImagePermissions() {
- super("deleteAllAdditionalImagePermissions");
- }
-
- public deleteAllAdditionalImagePermissions_args getEmptyArgsInstance() {
- return new deleteAllAdditionalImagePermissions_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_result();
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- deleteAllAdditionalImagePermissions_result result = new deleteAllAdditionalImagePermissions_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, deleteAllAdditionalImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.deleteAllAdditionalImagePermissions(args.imageID, args.token, args.userID,resultHandler);
- }
- }
-
- public static class deleteAllAdditionalLecturePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteAllAdditionalLecturePermissions_args, Void> {
- public deleteAllAdditionalLecturePermissions() {
- super("deleteAllAdditionalLecturePermissions");
- }
-
- public deleteAllAdditionalLecturePermissions_args getEmptyArgsInstance() {
- return new deleteAllAdditionalLecturePermissions_args();
- }
-
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
- public void onComplete(Void o) {
- deleteAllAdditionalLecturePermissions_result result = new deleteAllAdditionalLecturePermissions_result();
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- deleteAllAdditionalLecturePermissions_result result = new deleteAllAdditionalLecturePermissions_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, deleteAllAdditionalLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.deleteAllAdditionalLecturePermissions(args.lectureID, args.token, args.userID,resultHandler);
- }
- }
-
- public static class getOsNameForGuestOs<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOsNameForGuestOs_args, String> {
- public getOsNameForGuestOs() {
- super("getOsNameForGuestOs");
- }
-
- public getOsNameForGuestOs_args getEmptyArgsInstance() {
- return new getOsNameForGuestOs_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- getOsNameForGuestOs_result result = new getOsNameForGuestOs_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getOsNameForGuestOs_result result = new getOsNameForGuestOs_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, getOsNameForGuestOs_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.getOsNameForGuestOs(args.guestOS, args.token,resultHandler);
- }
- }
-
- public static class userIsImageAdmin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, userIsImageAdmin_args, Boolean> {
- public userIsImageAdmin() {
- super("userIsImageAdmin");
- }
-
- public userIsImageAdmin_args getEmptyArgsInstance() {
- return new userIsImageAdmin_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- userIsImageAdmin_result result = new userIsImageAdmin_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;
- userIsImageAdmin_result result = new userIsImageAdmin_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, userIsImageAdmin_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.userIsImageAdmin(args.imageID, args.token, args.userID,resultHandler);
- }
- }
-
- public static class userIsLectureAdmin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, userIsLectureAdmin_args, Boolean> {
- public userIsLectureAdmin() {
- super("userIsLectureAdmin");
- }
-
- public userIsLectureAdmin_args getEmptyArgsInstance() {
- return new userIsLectureAdmin_args();
- }
-
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
- userIsLectureAdmin_result result = new userIsLectureAdmin_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;
- userIsLectureAdmin_result result = new userIsLectureAdmin_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, userIsLectureAdmin_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
- iface.userIsLectureAdmin(args.userID, args.lectureID, args.token,resultHandler);
- }
- }
-
- public static class createRandomUUID<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createRandomUUID_args, String> {
- public createRandomUUID() {
- super("createRandomUUID");
- }
-
- public createRandomUUID_args getEmptyArgsInstance() {
- return new createRandomUUID_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- createRandomUUID_result result = new createRandomUUID_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- createRandomUUID_result result = new createRandomUUID_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, createRandomUUID_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.createRandomUUID(args.token,resultHandler);
- }
- }
-
- public static class getInstitutionByID<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getInstitutionByID_args, String> {
- public getInstitutionByID() {
- super("getInstitutionByID");
- }
-
- public getInstitutionByID_args getEmptyArgsInstance() {
- return new getInstitutionByID_args();
- }
-
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
- final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
- getInstitutionByID_result result = new getInstitutionByID_result();
- result.success = o;
- try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
- }
- fb.close();
- }
- public void onError(Exception e) {
- byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
- getInstitutionByID_result result = new getInstitutionByID_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, getInstitutionByID_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
- iface.getInstitutionByID(args.institutionID,resultHandler);
- }
- }
-
- }
-
- public static class getVersion_args implements org.apache.thrift.TBase<getVersion_args, getVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getVersion_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_args");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVersion_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVersion_argsTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_args.class, metaDataMap);
- }
-
- public getVersion_args() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getVersion_args(getVersion_args other) {
- }
-
- public getVersion_args deepCopy() {
- return new getVersion_args(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getVersion_args)
- return this.equals((getVersion_args)that);
- return false;
- }
-
- public boolean equals(getVersion_args that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getVersion_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVersion_args(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getVersion_argsStandardSchemeFactory implements SchemeFactory {
- public getVersion_argsStandardScheme getScheme() {
- return new getVersion_argsStandardScheme();
- }
- }
-
- private static class getVersion_argsStandardScheme extends StandardScheme<getVersion_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getVersion_argsTupleSchemeFactory implements SchemeFactory {
- public getVersion_argsTupleScheme getScheme() {
- return new getVersion_argsTupleScheme();
- }
- }
-
- private static class getVersion_argsTupleScheme extends TupleScheme<getVersion_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
- }
-
- public static class getVersion_result implements org.apache.thrift.TBase<getVersion_result, getVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getVersion_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVersion_resultTupleSchemeFactory());
- }
-
- public long success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_result.class, metaDataMap);
- }
-
- public getVersion_result() {
- }
-
- public getVersion_result(
- long success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getVersion_result(getVersion_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public getVersion_result deepCopy() {
- return new getVersion_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = 0;
- }
-
- public long getSuccess() {
- return this.success;
- }
-
- public getVersion_result setSuccess(long success) {
- this.success = success;
- setSuccessIsSet(true);
- return this;
- }
-
- public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return Long.valueOf(getSuccess());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getVersion_result)
- return this.equals((getVersion_result)that);
- return false;
- }
-
- public boolean equals(getVersion_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getVersion_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVersion_result(");
- boolean first = true;
-
- sb.append("success:");
- sb.append(this.success);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getVersion_resultStandardSchemeFactory implements SchemeFactory {
- public getVersion_resultStandardScheme getScheme() {
- return new getVersion_resultStandardScheme();
- }
- }
-
- private static class getVersion_resultStandardScheme extends StandardScheme<getVersion_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.success = iprot.readI64();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeI64(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getVersion_resultTupleSchemeFactory implements SchemeFactory {
- public getVersion_resultTupleScheme getScheme() {
- return new getVersion_resultTupleScheme();
- }
- }
-
- private static class getVersion_resultTupleScheme extends TupleScheme<getVersion_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeI64(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readI64();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getFtpUser_args implements org.apache.thrift.TBase<getFtpUser_args, getFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFtpUser_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getFtpUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getFtpUser_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFtpUser_args.class, metaDataMap);
- }
-
- public getFtpUser_args() {
- }
-
- public getFtpUser_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getFtpUser_args(getFtpUser_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getFtpUser_args deepCopy() {
- return new getFtpUser_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getFtpUser_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getFtpUser_args)
- return this.equals((getFtpUser_args)that);
- return false;
- }
-
- public boolean equals(getFtpUser_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getFtpUser_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getFtpUser_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getFtpUser_argsStandardSchemeFactory implements SchemeFactory {
- public getFtpUser_argsStandardScheme getScheme() {
- return new getFtpUser_argsStandardScheme();
- }
- }
-
- private static class getFtpUser_argsStandardScheme extends StandardScheme<getFtpUser_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getFtpUser_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getFtpUser_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getFtpUser_argsTupleSchemeFactory implements SchemeFactory {
- public getFtpUser_argsTupleScheme getScheme() {
- return new getFtpUser_argsTupleScheme();
- }
- }
-
- private static class getFtpUser_argsTupleScheme extends TupleScheme<getFtpUser_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getFtpUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getFtpUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getFtpUser_result implements org.apache.thrift.TBase<getFtpUser_result, getFtpUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFtpUser_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getFtpUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getFtpUser_resultTupleSchemeFactory());
- }
-
- public User success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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, User.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFtpUser_result.class, metaDataMap);
- }
-
- public getFtpUser_result() {
- }
-
- public getFtpUser_result(
- User success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getFtpUser_result(getFtpUser_result other) {
- if (other.isSetSuccess()) {
- this.success = new User(other.success);
- }
- }
-
- public getFtpUser_result deepCopy() {
- return new getFtpUser_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public User getSuccess() {
- return this.success;
- }
-
- public getFtpUser_result setSuccess(User success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((User)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getFtpUser_result)
- return this.equals((getFtpUser_result)that);
- return false;
- }
-
- public boolean equals(getFtpUser_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getFtpUser_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("getFtpUser_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- if (success != null) {
- success.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getFtpUser_resultStandardSchemeFactory implements SchemeFactory {
- public getFtpUser_resultStandardScheme getScheme() {
- return new getFtpUser_resultStandardScheme();
- }
- }
-
- private static class getFtpUser_resultStandardScheme extends StandardScheme<getFtpUser_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getFtpUser_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 User();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getFtpUser_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- struct.success.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getFtpUser_resultTupleSchemeFactory implements SchemeFactory {
- public getFtpUser_resultTupleScheme getScheme() {
- return new getFtpUser_resultTupleScheme();
- }
- }
-
- private static class getFtpUser_resultTupleScheme extends TupleScheme<getFtpUser_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getFtpUser_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()) {
- struct.success.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getFtpUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = new User();
- struct.success.read(iprot);
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class authenticated_args implements org.apache.thrift.TBase<authenticated_args, authenticated_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticated_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticated_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new authenticated_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new authenticated_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticated_args.class, metaDataMap);
- }
-
- public authenticated_args() {
- }
-
- public authenticated_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public authenticated_args(authenticated_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public authenticated_args deepCopy() {
- return new authenticated_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public authenticated_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof authenticated_args)
- return this.equals((authenticated_args)that);
- return false;
- }
-
- public boolean equals(authenticated_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(authenticated_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("authenticated_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class authenticated_argsStandardSchemeFactory implements SchemeFactory {
- public authenticated_argsStandardScheme getScheme() {
- return new authenticated_argsStandardScheme();
- }
- }
-
- private static class authenticated_argsStandardScheme extends StandardScheme<authenticated_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, authenticated_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, authenticated_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class authenticated_argsTupleSchemeFactory implements SchemeFactory {
- public authenticated_argsTupleScheme getScheme() {
- return new authenticated_argsTupleScheme();
- }
- }
-
- private static class authenticated_argsTupleScheme extends TupleScheme<authenticated_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, authenticated_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, authenticated_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class authenticated_result implements org.apache.thrift.TBase<authenticated_result, authenticated_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticated_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticated_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new authenticated_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new authenticated_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticated_result.class, metaDataMap);
- }
-
- public authenticated_result() {
- }
-
- public authenticated_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public authenticated_result(authenticated_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public authenticated_result deepCopy() {
- return new authenticated_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public authenticated_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 authenticated_result)
- return this.equals((authenticated_result)that);
- return false;
- }
-
- public boolean equals(authenticated_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(authenticated_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("authenticated_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 authenticated_resultStandardSchemeFactory implements SchemeFactory {
- public authenticated_resultStandardScheme getScheme() {
- return new authenticated_resultStandardScheme();
- }
- }
-
- private static class authenticated_resultStandardScheme extends StandardScheme<authenticated_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, authenticated_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, authenticated_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 authenticated_resultTupleSchemeFactory implements SchemeFactory {
- public authenticated_resultTupleScheme getScheme() {
- return new authenticated_resultTupleScheme();
- }
- }
-
- private static class authenticated_resultTupleScheme extends TupleScheme<authenticated_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, authenticated_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, authenticated_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class setSessionInvalid_args implements org.apache.thrift.TBase<setSessionInvalid_args, setSessionInvalid_args._Fields>, java.io.Serializable, Cloneable, Comparable<setSessionInvalid_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setSessionInvalid_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setSessionInvalid_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setSessionInvalid_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setSessionInvalid_args.class, metaDataMap);
- }
-
- public setSessionInvalid_args() {
- }
-
- public setSessionInvalid_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public setSessionInvalid_args(setSessionInvalid_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public setSessionInvalid_args deepCopy() {
- return new setSessionInvalid_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public setSessionInvalid_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof setSessionInvalid_args)
- return this.equals((setSessionInvalid_args)that);
- return false;
- }
-
- public boolean equals(setSessionInvalid_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(setSessionInvalid_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setSessionInvalid_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class setSessionInvalid_argsStandardSchemeFactory implements SchemeFactory {
- public setSessionInvalid_argsStandardScheme getScheme() {
- return new setSessionInvalid_argsStandardScheme();
- }
- }
-
- private static class setSessionInvalid_argsStandardScheme extends StandardScheme<setSessionInvalid_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, setSessionInvalid_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, setSessionInvalid_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class setSessionInvalid_argsTupleSchemeFactory implements SchemeFactory {
- public setSessionInvalid_argsTupleScheme getScheme() {
- return new setSessionInvalid_argsTupleScheme();
- }
- }
-
- private static class setSessionInvalid_argsTupleScheme extends TupleScheme<setSessionInvalid_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, setSessionInvalid_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, setSessionInvalid_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class setSessionInvalid_result implements org.apache.thrift.TBase<setSessionInvalid_result, setSessionInvalid_result._Fields>, java.io.Serializable, Cloneable, Comparable<setSessionInvalid_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setSessionInvalid_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setSessionInvalid_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setSessionInvalid_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setSessionInvalid_result.class, metaDataMap);
- }
-
- public setSessionInvalid_result() {
- }
-
- public setSessionInvalid_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public setSessionInvalid_result(setSessionInvalid_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public setSessionInvalid_result deepCopy() {
- return new setSessionInvalid_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public setSessionInvalid_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 setSessionInvalid_result)
- return this.equals((setSessionInvalid_result)that);
- return false;
- }
-
- public boolean equals(setSessionInvalid_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(setSessionInvalid_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("setSessionInvalid_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 setSessionInvalid_resultStandardSchemeFactory implements SchemeFactory {
- public setSessionInvalid_resultStandardScheme getScheme() {
- return new setSessionInvalid_resultStandardScheme();
- }
- }
-
- private static class setSessionInvalid_resultStandardScheme extends StandardScheme<setSessionInvalid_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, setSessionInvalid_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, setSessionInvalid_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 setSessionInvalid_resultTupleSchemeFactory implements SchemeFactory {
- public setSessionInvalid_resultTupleScheme getScheme() {
- return new setSessionInvalid_resultTupleScheme();
- }
- }
-
- private static class setSessionInvalid_resultTupleScheme extends TupleScheme<setSessionInvalid_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, setSessionInvalid_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, setSessionInvalid_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class DeleteFtpUser_args implements org.apache.thrift.TBase<DeleteFtpUser_args, DeleteFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<DeleteFtpUser_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeleteFtpUser_args");
-
- private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DeleteFtpUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DeleteFtpUser_argsTupleSchemeFactory());
- }
-
- public String user; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER((short)1, "user"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER
- return USER;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DeleteFtpUser_args.class, metaDataMap);
- }
-
- public DeleteFtpUser_args() {
- }
-
- public DeleteFtpUser_args(
- String user,
- String token)
- {
- this();
- this.user = user;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public DeleteFtpUser_args(DeleteFtpUser_args other) {
- if (other.isSetUser()) {
- this.user = other.user;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public DeleteFtpUser_args deepCopy() {
- return new DeleteFtpUser_args(this);
- }
-
- @Override
- public void clear() {
- this.user = null;
- this.token = null;
- }
-
- public String getUser() {
- return this.user;
- }
-
- public DeleteFtpUser_args setUser(String user) {
- this.user = user;
- return this;
- }
-
- public void unsetUser() {
- this.user = null;
- }
-
- /** Returns true if field user is set (has been assigned a value) and false otherwise */
- public boolean isSetUser() {
- return this.user != null;
- }
-
- public void setUserIsSet(boolean value) {
- if (!value) {
- this.user = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public DeleteFtpUser_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER:
- if (value == null) {
- unsetUser();
- } else {
- setUser((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER:
- return getUser();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER:
- return isSetUser();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof DeleteFtpUser_args)
- return this.equals((DeleteFtpUser_args)that);
- return false;
- }
-
- public boolean equals(DeleteFtpUser_args that) {
- if (that == null)
- return false;
-
- boolean this_present_user = true && this.isSetUser();
- boolean that_present_user = true && that.isSetUser();
- if (this_present_user || that_present_user) {
- if (!(this_present_user && that_present_user))
- return false;
- if (!this.user.equals(that.user))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(DeleteFtpUser_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUser()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("DeleteFtpUser_args(");
- boolean first = true;
-
- sb.append("user:");
- if (this.user == null) {
- sb.append("null");
- } else {
- sb.append(this.user);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class DeleteFtpUser_argsStandardSchemeFactory implements SchemeFactory {
- public DeleteFtpUser_argsStandardScheme getScheme() {
- return new DeleteFtpUser_argsStandardScheme();
- }
- }
-
- private static class DeleteFtpUser_argsStandardScheme extends StandardScheme<DeleteFtpUser_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, DeleteFtpUser_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.user = iprot.readString();
- struct.setUserIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, DeleteFtpUser_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.user != null) {
- oprot.writeFieldBegin(USER_FIELD_DESC);
- oprot.writeString(struct.user);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class DeleteFtpUser_argsTupleSchemeFactory implements SchemeFactory {
- public DeleteFtpUser_argsTupleScheme getScheme() {
- return new DeleteFtpUser_argsTupleScheme();
- }
- }
-
- private static class DeleteFtpUser_argsTupleScheme extends TupleScheme<DeleteFtpUser_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, DeleteFtpUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUser()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUser()) {
- oprot.writeString(struct.user);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, DeleteFtpUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.user = iprot.readString();
- struct.setUserIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class DeleteFtpUser_result implements org.apache.thrift.TBase<DeleteFtpUser_result, DeleteFtpUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<DeleteFtpUser_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeleteFtpUser_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DeleteFtpUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DeleteFtpUser_resultTupleSchemeFactory());
- }
-
- public long success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DeleteFtpUser_result.class, metaDataMap);
- }
-
- public DeleteFtpUser_result() {
- }
-
- public DeleteFtpUser_result(
- long success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public DeleteFtpUser_result(DeleteFtpUser_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public DeleteFtpUser_result deepCopy() {
- return new DeleteFtpUser_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = 0;
- }
-
- public long getSuccess() {
- return this.success;
- }
-
- public DeleteFtpUser_result setSuccess(long success) {
- this.success = success;
- setSuccessIsSet(true);
- return this;
- }
-
- public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return Long.valueOf(getSuccess());
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof DeleteFtpUser_result)
- return this.equals((DeleteFtpUser_result)that);
- return false;
- }
-
- public boolean equals(DeleteFtpUser_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(DeleteFtpUser_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("DeleteFtpUser_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 DeleteFtpUser_resultStandardSchemeFactory implements SchemeFactory {
- public DeleteFtpUser_resultStandardScheme getScheme() {
- return new DeleteFtpUser_resultStandardScheme();
- }
- }
-
- private static class DeleteFtpUser_resultStandardScheme extends StandardScheme<DeleteFtpUser_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, DeleteFtpUser_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.success = iprot.readI64();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, DeleteFtpUser_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeI64(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class DeleteFtpUser_resultTupleSchemeFactory implements SchemeFactory {
- public DeleteFtpUser_resultTupleScheme getScheme() {
- return new DeleteFtpUser_resultTupleScheme();
- }
- }
-
- private static class DeleteFtpUser_resultTupleScheme extends TupleScheme<DeleteFtpUser_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, DeleteFtpUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeI64(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, DeleteFtpUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readI64();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPathOfImage_args implements org.apache.thrift.TBase<getPathOfImage_args, getPathOfImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPathOfImage_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathOfImage_args");
-
- private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("image_id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPathOfImage_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPathOfImage_argsTupleSchemeFactory());
- }
-
- public String image_id; // required
- public String version; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGE_ID((short)1, "image_id"),
- VERSION((short)2, "version"),
- TOKEN((short)3, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGE_ID
- return IMAGE_ID;
- case 2: // VERSION
- return VERSION;
- case 3: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("image_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathOfImage_args.class, metaDataMap);
- }
-
- public getPathOfImage_args() {
- }
-
- public getPathOfImage_args(
- String image_id,
- String version,
- String token)
- {
- this();
- this.image_id = image_id;
- this.version = version;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPathOfImage_args(getPathOfImage_args other) {
- if (other.isSetImage_id()) {
- this.image_id = other.image_id;
- }
- if (other.isSetVersion()) {
- this.version = other.version;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getPathOfImage_args deepCopy() {
- return new getPathOfImage_args(this);
- }
-
- @Override
- public void clear() {
- this.image_id = null;
- this.version = null;
- this.token = null;
- }
-
- public String getImage_id() {
- return this.image_id;
- }
-
- public getPathOfImage_args setImage_id(String image_id) {
- this.image_id = image_id;
- return this;
- }
-
- public void unsetImage_id() {
- this.image_id = null;
- }
-
- /** Returns true if field image_id is set (has been assigned a value) and false otherwise */
- public boolean isSetImage_id() {
- return this.image_id != null;
- }
-
- public void setImage_idIsSet(boolean value) {
- if (!value) {
- this.image_id = null;
- }
- }
-
- public String getVersion() {
- return this.version;
- }
-
- public getPathOfImage_args setVersion(String version) {
- this.version = version;
- return this;
- }
-
- public void unsetVersion() {
- this.version = null;
- }
-
- /** Returns true if field version is set (has been assigned a value) and false otherwise */
- public boolean isSetVersion() {
- return this.version != null;
- }
-
- public void setVersionIsSet(boolean value) {
- if (!value) {
- this.version = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getPathOfImage_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGE_ID:
- if (value == null) {
- unsetImage_id();
- } else {
- setImage_id((String)value);
- }
- break;
-
- case VERSION:
- if (value == null) {
- unsetVersion();
- } else {
- setVersion((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGE_ID:
- return getImage_id();
-
- case VERSION:
- return getVersion();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGE_ID:
- return isSetImage_id();
- case VERSION:
- return isSetVersion();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPathOfImage_args)
- return this.equals((getPathOfImage_args)that);
- return false;
- }
-
- public boolean equals(getPathOfImage_args that) {
- if (that == null)
- return false;
-
- boolean this_present_image_id = true && this.isSetImage_id();
- boolean that_present_image_id = true && that.isSetImage_id();
- if (this_present_image_id || that_present_image_id) {
- if (!(this_present_image_id && that_present_image_id))
- return false;
- if (!this.image_id.equals(that.image_id))
- return false;
- }
-
- boolean this_present_version = true && this.isSetVersion();
- boolean that_present_version = true && that.isSetVersion();
- if (this_present_version || that_present_version) {
- if (!(this_present_version && that_present_version))
- return false;
- if (!this.version.equals(that.version))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPathOfImage_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImage_id()).compareTo(other.isSetImage_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImage_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_id, other.image_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVersion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPathOfImage_args(");
- boolean first = true;
-
- sb.append("image_id:");
- if (this.image_id == null) {
- sb.append("null");
- } else {
- sb.append(this.image_id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("version:");
- if (this.version == null) {
- sb.append("null");
- } else {
- sb.append(this.version);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPathOfImage_argsStandardSchemeFactory implements SchemeFactory {
- public getPathOfImage_argsStandardScheme getScheme() {
- return new getPathOfImage_argsStandardScheme();
- }
- }
-
- private static class getPathOfImage_argsStandardScheme extends StandardScheme<getPathOfImage_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPathOfImage_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: // IMAGE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.image_id = iprot.readString();
- struct.setImage_idIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPathOfImage_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.image_id != null) {
- oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC);
- oprot.writeString(struct.image_id);
- oprot.writeFieldEnd();
- }
- if (struct.version != null) {
- oprot.writeFieldBegin(VERSION_FIELD_DESC);
- oprot.writeString(struct.version);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPathOfImage_argsTupleSchemeFactory implements SchemeFactory {
- public getPathOfImage_argsTupleScheme getScheme() {
- return new getPathOfImage_argsTupleScheme();
- }
- }
-
- private static class getPathOfImage_argsTupleScheme extends TupleScheme<getPathOfImage_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPathOfImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImage_id()) {
- optionals.set(0);
- }
- if (struct.isSetVersion()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetImage_id()) {
- oprot.writeString(struct.image_id);
- }
- if (struct.isSetVersion()) {
- oprot.writeString(struct.version);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPathOfImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.image_id = iprot.readString();
- struct.setImage_idIsSet(true);
- }
- if (incoming.get(1)) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPathOfImage_result implements org.apache.thrift.TBase<getPathOfImage_result, getPathOfImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPathOfImage_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathOfImage_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPathOfImage_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPathOfImage_resultTupleSchemeFactory());
- }
-
- public String success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathOfImage_result.class, metaDataMap);
- }
-
- public getPathOfImage_result() {
- }
-
- public getPathOfImage_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPathOfImage_result(getPathOfImage_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
- }
-
- public getPathOfImage_result deepCopy() {
- return new getPathOfImage_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public String getSuccess() {
- return this.success;
- }
-
- public getPathOfImage_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPathOfImage_result)
- return this.equals((getPathOfImage_result)that);
- return false;
- }
-
- public boolean equals(getPathOfImage_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPathOfImage_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("getPathOfImage_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPathOfImage_resultStandardSchemeFactory implements SchemeFactory {
- public getPathOfImage_resultStandardScheme getScheme() {
- return new getPathOfImage_resultStandardScheme();
- }
- }
-
- private static class getPathOfImage_resultStandardScheme extends StandardScheme<getPathOfImage_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPathOfImage_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPathOfImage_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPathOfImage_resultTupleSchemeFactory implements SchemeFactory {
- public getPathOfImage_resultTupleScheme getScheme() {
- return new getPathOfImage_resultTupleScheme();
- }
- }
-
- private static class getPathOfImage_resultTupleScheme extends TupleScheme<getPathOfImage_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPathOfImage_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.writeString(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPathOfImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class setInstitution_args implements org.apache.thrift.TBase<setInstitution_args, setInstitution_args._Fields>, java.io.Serializable, Cloneable, Comparable<setInstitution_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setInstitution_args");
-
- private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setInstitution_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setInstitution_argsTupleSchemeFactory());
- }
-
- public String university; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- UNIVERSITY((short)1, "university"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // UNIVERSITY
- return UNIVERSITY;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setInstitution_args.class, metaDataMap);
- }
-
- public setInstitution_args() {
- }
-
- public setInstitution_args(
- String university,
- String token)
- {
- this();
- this.university = university;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public setInstitution_args(setInstitution_args other) {
- if (other.isSetUniversity()) {
- this.university = other.university;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public setInstitution_args deepCopy() {
- return new setInstitution_args(this);
- }
-
- @Override
- public void clear() {
- this.university = null;
- this.token = null;
- }
-
- public String getUniversity() {
- return this.university;
- }
-
- public setInstitution_args setUniversity(String university) {
- this.university = university;
- return this;
- }
-
- public void unsetUniversity() {
- this.university = null;
- }
-
- /** Returns true if field university is set (has been assigned a value) and false otherwise */
- public boolean isSetUniversity() {
- return this.university != null;
- }
-
- public void setUniversityIsSet(boolean value) {
- if (!value) {
- this.university = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public setInstitution_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case UNIVERSITY:
- if (value == null) {
- unsetUniversity();
- } else {
- setUniversity((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case UNIVERSITY:
- return getUniversity();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case UNIVERSITY:
- return isSetUniversity();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof setInstitution_args)
- return this.equals((setInstitution_args)that);
- return false;
- }
-
- public boolean equals(setInstitution_args that) {
- if (that == null)
- return false;
-
- boolean this_present_university = true && this.isSetUniversity();
- boolean that_present_university = true && that.isSetUniversity();
- if (this_present_university || that_present_university) {
- if (!(this_present_university && that_present_university))
- return false;
- if (!this.university.equals(that.university))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(setInstitution_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUniversity()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setInstitution_args(");
- boolean first = true;
-
- sb.append("university:");
- if (this.university == null) {
- sb.append("null");
- } else {
- sb.append(this.university);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class setInstitution_argsStandardSchemeFactory implements SchemeFactory {
- public setInstitution_argsStandardScheme getScheme() {
- return new setInstitution_argsStandardScheme();
- }
- }
-
- private static class setInstitution_argsStandardScheme extends StandardScheme<setInstitution_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, setInstitution_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: // UNIVERSITY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, setInstitution_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.university != null) {
- oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
- oprot.writeString(struct.university);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class setInstitution_argsTupleSchemeFactory implements SchemeFactory {
- public setInstitution_argsTupleScheme getScheme() {
- return new setInstitution_argsTupleScheme();
- }
- }
-
- private static class setInstitution_argsTupleScheme extends TupleScheme<setInstitution_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, setInstitution_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUniversity()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUniversity()) {
- oprot.writeString(struct.university);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, setInstitution_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class setInstitution_result implements org.apache.thrift.TBase<setInstitution_result, setInstitution_result._Fields>, java.io.Serializable, Cloneable, Comparable<setInstitution_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setInstitution_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setInstitution_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setInstitution_resultTupleSchemeFactory());
- }
-
- public String success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setInstitution_result.class, metaDataMap);
- }
-
- public setInstitution_result() {
- }
-
- public setInstitution_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public setInstitution_result(setInstitution_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
- }
-
- public setInstitution_result deepCopy() {
- return new setInstitution_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public String getSuccess() {
- return this.success;
- }
-
- public setInstitution_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof setInstitution_result)
- return this.equals((setInstitution_result)that);
- return false;
- }
-
- public boolean equals(setInstitution_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(setInstitution_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("setInstitution_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class setInstitution_resultStandardSchemeFactory implements SchemeFactory {
- public setInstitution_resultStandardScheme getScheme() {
- return new setInstitution_resultStandardScheme();
- }
- }
-
- private static class setInstitution_resultStandardScheme extends StandardScheme<setInstitution_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, setInstitution_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, setInstitution_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class setInstitution_resultTupleSchemeFactory implements SchemeFactory {
- public setInstitution_resultTupleScheme getScheme() {
- return new setInstitution_resultTupleScheme();
- }
- }
-
- private static class setInstitution_resultTupleScheme extends TupleScheme<setInstitution_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, setInstitution_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.writeString(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, setInstitution_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeVLdata_args implements org.apache.thrift.TBase<writeVLdata_args, writeVLdata_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeVLdata_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeVLdata_args");
-
- private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)9);
- private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)10);
- private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)11);
- private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)12);
- private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)13);
- private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("imagePath", org.apache.thrift.protocol.TType.STRING, (short)14);
- private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)15);
- private static final org.apache.thrift.protocol.TField FILESIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("filesize", org.apache.thrift.protocol.TType.I64, (short)16);
- private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I64, (short)17);
- private static final org.apache.thrift.protocol.TField OS_FIELD_DESC = new org.apache.thrift.protocol.TField("os", org.apache.thrift.protocol.TType.STRING, (short)18);
- private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("uid", org.apache.thrift.protocol.TType.STRING, (short)19);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)20);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)21);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeVLdata_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeVLdata_argsTupleSchemeFactory());
- }
-
- public String imagename; // required
- public String desc; // required
- public String Tel; // required
- public String Fak; // required
- public boolean license; // required
- public boolean internet; // required
- public long ram; // required
- public long cpu; // required
- public String imagePath; // required
- public boolean isTemplate; // required
- public long filesize; // required
- public long shareMode; // required
- public String os; // required
- public String uid; // required
- public String token; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGENAME((short)1, "imagename"),
- DESC((short)2, "desc"),
- TEL((short)8, "Tel"),
- FAK((short)9, "Fak"),
- LICENSE((short)10, "license"),
- INTERNET((short)11, "internet"),
- RAM((short)12, "ram"),
- CPU((short)13, "cpu"),
- IMAGE_PATH((short)14, "imagePath"),
- IS_TEMPLATE((short)15, "isTemplate"),
- FILESIZE((short)16, "filesize"),
- SHARE_MODE((short)17, "shareMode"),
- OS((short)18, "os"),
- UID((short)19, "uid"),
- TOKEN((short)20, "token"),
- USER_ID((short)21, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGENAME
- return IMAGENAME;
- case 2: // DESC
- return DESC;
- case 8: // TEL
- return TEL;
- case 9: // FAK
- return FAK;
- case 10: // LICENSE
- return LICENSE;
- case 11: // INTERNET
- return INTERNET;
- case 12: // RAM
- return RAM;
- case 13: // CPU
- return CPU;
- case 14: // IMAGE_PATH
- return IMAGE_PATH;
- case 15: // IS_TEMPLATE
- return IS_TEMPLATE;
- case 16: // FILESIZE
- return FILESIZE;
- case 17: // SHARE_MODE
- return SHARE_MODE;
- case 18: // OS
- return OS;
- case 19: // UID
- return UID;
- case 20: // TOKEN
- return TOKEN;
- case 21: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __LICENSE_ISSET_ID = 0;
- private static final int __INTERNET_ISSET_ID = 1;
- private static final int __RAM_ISSET_ID = 2;
- private static final int __CPU_ISSET_ID = 3;
- private static final int __ISTEMPLATE_ISSET_ID = 4;
- private static final int __FILESIZE_ISSET_ID = 5;
- private static final int __SHAREMODE_ISSET_ID = 6;
- 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.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TEL, new org.apache.thrift.meta_data.FieldMetaData("Tel", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FAK, new org.apache.thrift.meta_data.FieldMetaData("Fak", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LICENSE, new org.apache.thrift.meta_data.FieldMetaData("license", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.INTERNET, new org.apache.thrift.meta_data.FieldMetaData("internet", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.RAM, new org.apache.thrift.meta_data.FieldMetaData("ram", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- tmpMap.put(_Fields.CPU, new org.apache.thrift.meta_data.FieldMetaData("cpu", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("imagePath", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.FILESIZE, new org.apache.thrift.meta_data.FieldMetaData("filesize", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- tmpMap.put(_Fields.OS, new org.apache.thrift.meta_data.FieldMetaData("os", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("uid", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeVLdata_args.class, metaDataMap);
- }
-
- public writeVLdata_args() {
- }
-
- public writeVLdata_args(
- String imagename,
- String desc,
- String Tel,
- String Fak,
- boolean license,
- boolean internet,
- long ram,
- long cpu,
- String imagePath,
- boolean isTemplate,
- long filesize,
- long shareMode,
- String os,
- String uid,
- String token,
- String userID)
- {
- this();
- this.imagename = imagename;
- this.desc = desc;
- this.Tel = Tel;
- this.Fak = Fak;
- this.license = license;
- setLicenseIsSet(true);
- this.internet = internet;
- setInternetIsSet(true);
- this.ram = ram;
- setRamIsSet(true);
- this.cpu = cpu;
- setCpuIsSet(true);
- this.imagePath = imagePath;
- this.isTemplate = isTemplate;
- setIsTemplateIsSet(true);
- this.filesize = filesize;
- setFilesizeIsSet(true);
- this.shareMode = shareMode;
- setShareModeIsSet(true);
- this.os = os;
- this.uid = uid;
- this.token = token;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeVLdata_args(writeVLdata_args other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetImagename()) {
- this.imagename = other.imagename;
- }
- if (other.isSetDesc()) {
- this.desc = other.desc;
- }
- if (other.isSetTel()) {
- this.Tel = other.Tel;
- }
- if (other.isSetFak()) {
- this.Fak = other.Fak;
- }
- this.license = other.license;
- this.internet = other.internet;
- this.ram = other.ram;
- this.cpu = other.cpu;
- if (other.isSetImagePath()) {
- this.imagePath = other.imagePath;
- }
- this.isTemplate = other.isTemplate;
- this.filesize = other.filesize;
- this.shareMode = other.shareMode;
- if (other.isSetOs()) {
- this.os = other.os;
- }
- if (other.isSetUid()) {
- this.uid = other.uid;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public writeVLdata_args deepCopy() {
- return new writeVLdata_args(this);
- }
-
- @Override
- public void clear() {
- this.imagename = null;
- this.desc = null;
- this.Tel = null;
- this.Fak = null;
- setLicenseIsSet(false);
- this.license = false;
- setInternetIsSet(false);
- this.internet = false;
- setRamIsSet(false);
- this.ram = 0;
- setCpuIsSet(false);
- this.cpu = 0;
- this.imagePath = null;
- setIsTemplateIsSet(false);
- this.isTemplate = false;
- setFilesizeIsSet(false);
- this.filesize = 0;
- setShareModeIsSet(false);
- this.shareMode = 0;
- this.os = null;
- this.uid = null;
- this.token = null;
- this.userID = null;
- }
-
- public String getImagename() {
- return this.imagename;
- }
-
- public writeVLdata_args setImagename(String imagename) {
- this.imagename = imagename;
- return this;
- }
-
- public void unsetImagename() {
- this.imagename = null;
- }
-
- /** Returns true if field imagename is set (has been assigned a value) and false otherwise */
- public boolean isSetImagename() {
- return this.imagename != null;
- }
-
- public void setImagenameIsSet(boolean value) {
- if (!value) {
- this.imagename = null;
- }
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public writeVLdata_args setDesc(String desc) {
- this.desc = desc;
- return this;
- }
-
- public void unsetDesc() {
- this.desc = null;
- }
-
- /** Returns true if field desc is set (has been assigned a value) and false otherwise */
- public boolean isSetDesc() {
- return this.desc != null;
- }
-
- public void setDescIsSet(boolean value) {
- if (!value) {
- this.desc = null;
- }
- }
-
- public String getTel() {
- return this.Tel;
- }
-
- public writeVLdata_args setTel(String Tel) {
- this.Tel = Tel;
- return this;
- }
-
- public void unsetTel() {
- this.Tel = null;
- }
-
- /** Returns true if field Tel is set (has been assigned a value) and false otherwise */
- public boolean isSetTel() {
- return this.Tel != null;
- }
-
- public void setTelIsSet(boolean value) {
- if (!value) {
- this.Tel = null;
- }
- }
-
- public String getFak() {
- return this.Fak;
- }
-
- public writeVLdata_args setFak(String Fak) {
- this.Fak = Fak;
- return this;
- }
-
- public void unsetFak() {
- this.Fak = null;
- }
-
- /** Returns true if field Fak is set (has been assigned a value) and false otherwise */
- public boolean isSetFak() {
- return this.Fak != null;
- }
-
- public void setFakIsSet(boolean value) {
- if (!value) {
- this.Fak = null;
- }
- }
-
- public boolean isLicense() {
- return this.license;
- }
-
- public writeVLdata_args setLicense(boolean license) {
- this.license = license;
- setLicenseIsSet(true);
- return this;
- }
-
- public void unsetLicense() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LICENSE_ISSET_ID);
- }
-
- /** Returns true if field license is set (has been assigned a value) and false otherwise */
- public boolean isSetLicense() {
- return EncodingUtils.testBit(__isset_bitfield, __LICENSE_ISSET_ID);
- }
-
- public void setLicenseIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LICENSE_ISSET_ID, value);
- }
-
- public boolean isInternet() {
- return this.internet;
- }
-
- public writeVLdata_args setInternet(boolean internet) {
- this.internet = internet;
- setInternetIsSet(true);
- return this;
- }
-
- public void unsetInternet() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INTERNET_ISSET_ID);
- }
-
- /** Returns true if field internet is set (has been assigned a value) and false otherwise */
- public boolean isSetInternet() {
- return EncodingUtils.testBit(__isset_bitfield, __INTERNET_ISSET_ID);
- }
-
- public void setInternetIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INTERNET_ISSET_ID, value);
- }
-
- public long getRam() {
- return this.ram;
- }
-
- public writeVLdata_args setRam(long ram) {
- this.ram = ram;
- setRamIsSet(true);
- return this;
- }
-
- public void unsetRam() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RAM_ISSET_ID);
- }
-
- /** Returns true if field ram is set (has been assigned a value) and false otherwise */
- public boolean isSetRam() {
- return EncodingUtils.testBit(__isset_bitfield, __RAM_ISSET_ID);
- }
-
- public void setRamIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RAM_ISSET_ID, value);
- }
-
- public long getCpu() {
- return this.cpu;
- }
-
- public writeVLdata_args setCpu(long cpu) {
- this.cpu = cpu;
- setCpuIsSet(true);
- return this;
- }
-
- public void unsetCpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID);
- }
-
- /** Returns true if field cpu is set (has been assigned a value) and false otherwise */
- public boolean isSetCpu() {
- return EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID);
- }
-
- public void setCpuIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value);
- }
-
- public String getImagePath() {
- return this.imagePath;
- }
-
- public writeVLdata_args setImagePath(String imagePath) {
- this.imagePath = imagePath;
- return this;
- }
-
- public void unsetImagePath() {
- this.imagePath = null;
- }
-
- /** Returns true if field imagePath is set (has been assigned a value) and false otherwise */
- public boolean isSetImagePath() {
- return this.imagePath != null;
- }
-
- public void setImagePathIsSet(boolean value) {
- if (!value) {
- this.imagePath = null;
- }
- }
-
- public boolean isIsTemplate() {
- return this.isTemplate;
- }
-
- public writeVLdata_args setIsTemplate(boolean isTemplate) {
- this.isTemplate = isTemplate;
- setIsTemplateIsSet(true);
- return this;
- }
-
- public void unsetIsTemplate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
- }
-
- /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */
- public boolean isSetIsTemplate() {
- return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
- }
-
- public void setIsTemplateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
- }
-
- public long getFilesize() {
- return this.filesize;
- }
-
- public writeVLdata_args setFilesize(long filesize) {
- this.filesize = filesize;
- setFilesizeIsSet(true);
- return this;
- }
-
- public void unsetFilesize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
- }
-
- /** Returns true if field filesize is set (has been assigned a value) and false otherwise */
- public boolean isSetFilesize() {
- return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
- }
-
- public void setFilesizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
- }
-
- public long getShareMode() {
- return this.shareMode;
- }
-
- public writeVLdata_args setShareMode(long shareMode) {
- this.shareMode = shareMode;
- setShareModeIsSet(true);
- return this;
- }
-
- public void unsetShareMode() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREMODE_ISSET_ID);
- }
-
- /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */
- public boolean isSetShareMode() {
- return EncodingUtils.testBit(__isset_bitfield, __SHAREMODE_ISSET_ID);
- }
-
- public void setShareModeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREMODE_ISSET_ID, value);
- }
-
- public String getOs() {
- return this.os;
- }
-
- public writeVLdata_args setOs(String os) {
- this.os = os;
- return this;
- }
-
- public void unsetOs() {
- this.os = null;
- }
-
- /** Returns true if field os is set (has been assigned a value) and false otherwise */
- public boolean isSetOs() {
- return this.os != null;
- }
-
- public void setOsIsSet(boolean value) {
- if (!value) {
- this.os = null;
- }
- }
-
- public String getUid() {
- return this.uid;
- }
-
- public writeVLdata_args setUid(String uid) {
- this.uid = uid;
- return this;
- }
-
- public void unsetUid() {
- this.uid = null;
- }
-
- /** Returns true if field uid is set (has been assigned a value) and false otherwise */
- public boolean isSetUid() {
- return this.uid != null;
- }
-
- public void setUidIsSet(boolean value) {
- if (!value) {
- this.uid = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public writeVLdata_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public writeVLdata_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGENAME:
- if (value == null) {
- unsetImagename();
- } else {
- setImagename((String)value);
- }
- break;
-
- case DESC:
- if (value == null) {
- unsetDesc();
- } else {
- setDesc((String)value);
- }
- break;
-
- case TEL:
- if (value == null) {
- unsetTel();
- } else {
- setTel((String)value);
- }
- break;
-
- case FAK:
- if (value == null) {
- unsetFak();
- } else {
- setFak((String)value);
- }
- break;
-
- case LICENSE:
- if (value == null) {
- unsetLicense();
- } else {
- setLicense((Boolean)value);
- }
- break;
-
- case INTERNET:
- if (value == null) {
- unsetInternet();
- } else {
- setInternet((Boolean)value);
- }
- break;
-
- case RAM:
- if (value == null) {
- unsetRam();
- } else {
- setRam((Long)value);
- }
- break;
-
- case CPU:
- if (value == null) {
- unsetCpu();
- } else {
- setCpu((Long)value);
- }
- break;
-
- case IMAGE_PATH:
- if (value == null) {
- unsetImagePath();
- } else {
- setImagePath((String)value);
- }
- break;
-
- case IS_TEMPLATE:
- if (value == null) {
- unsetIsTemplate();
- } else {
- setIsTemplate((Boolean)value);
- }
- break;
-
- case FILESIZE:
- if (value == null) {
- unsetFilesize();
- } else {
- setFilesize((Long)value);
- }
- break;
-
- case SHARE_MODE:
- if (value == null) {
- unsetShareMode();
- } else {
- setShareMode((Long)value);
- }
- break;
-
- case OS:
- if (value == null) {
- unsetOs();
- } else {
- setOs((String)value);
- }
- break;
-
- case UID:
- if (value == null) {
- unsetUid();
- } else {
- setUid((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGENAME:
- return getImagename();
-
- case DESC:
- return getDesc();
-
- case TEL:
- return getTel();
-
- case FAK:
- return getFak();
-
- case LICENSE:
- return Boolean.valueOf(isLicense());
-
- case INTERNET:
- return Boolean.valueOf(isInternet());
-
- case RAM:
- return Long.valueOf(getRam());
-
- case CPU:
- return Long.valueOf(getCpu());
-
- case IMAGE_PATH:
- return getImagePath();
-
- case IS_TEMPLATE:
- return Boolean.valueOf(isIsTemplate());
-
- case FILESIZE:
- return Long.valueOf(getFilesize());
-
- case SHARE_MODE:
- return Long.valueOf(getShareMode());
-
- case OS:
- return getOs();
-
- case UID:
- return getUid();
-
- case TOKEN:
- return getToken();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGENAME:
- return isSetImagename();
- case DESC:
- return isSetDesc();
- case TEL:
- return isSetTel();
- case FAK:
- return isSetFak();
- case LICENSE:
- return isSetLicense();
- case INTERNET:
- return isSetInternet();
- case RAM:
- return isSetRam();
- case CPU:
- return isSetCpu();
- case IMAGE_PATH:
- return isSetImagePath();
- case IS_TEMPLATE:
- return isSetIsTemplate();
- case FILESIZE:
- return isSetFilesize();
- case SHARE_MODE:
- return isSetShareMode();
- case OS:
- return isSetOs();
- case UID:
- return isSetUid();
- case TOKEN:
- return isSetToken();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof writeVLdata_args)
- return this.equals((writeVLdata_args)that);
- return false;
- }
-
- public boolean equals(writeVLdata_args that) {
- if (that == null)
- return false;
-
- boolean this_present_imagename = true && this.isSetImagename();
- boolean that_present_imagename = true && that.isSetImagename();
- if (this_present_imagename || that_present_imagename) {
- if (!(this_present_imagename && that_present_imagename))
- return false;
- if (!this.imagename.equals(that.imagename))
- return false;
- }
-
- boolean this_present_desc = true && this.isSetDesc();
- boolean that_present_desc = true && that.isSetDesc();
- if (this_present_desc || that_present_desc) {
- if (!(this_present_desc && that_present_desc))
- return false;
- if (!this.desc.equals(that.desc))
- return false;
- }
-
- boolean this_present_Tel = true && this.isSetTel();
- boolean that_present_Tel = true && that.isSetTel();
- if (this_present_Tel || that_present_Tel) {
- if (!(this_present_Tel && that_present_Tel))
- return false;
- if (!this.Tel.equals(that.Tel))
- return false;
- }
-
- boolean this_present_Fak = true && this.isSetFak();
- boolean that_present_Fak = true && that.isSetFak();
- if (this_present_Fak || that_present_Fak) {
- if (!(this_present_Fak && that_present_Fak))
- return false;
- if (!this.Fak.equals(that.Fak))
- return false;
- }
-
- boolean this_present_license = true;
- boolean that_present_license = true;
- if (this_present_license || that_present_license) {
- if (!(this_present_license && that_present_license))
- return false;
- if (this.license != that.license)
- return false;
- }
-
- boolean this_present_internet = true;
- boolean that_present_internet = true;
- if (this_present_internet || that_present_internet) {
- if (!(this_present_internet && that_present_internet))
- return false;
- if (this.internet != that.internet)
- return false;
- }
-
- boolean this_present_ram = true;
- boolean that_present_ram = true;
- if (this_present_ram || that_present_ram) {
- if (!(this_present_ram && that_present_ram))
- return false;
- if (this.ram != that.ram)
- return false;
- }
-
- boolean this_present_cpu = true;
- boolean that_present_cpu = true;
- if (this_present_cpu || that_present_cpu) {
- if (!(this_present_cpu && that_present_cpu))
- return false;
- if (this.cpu != that.cpu)
- return false;
- }
-
- boolean this_present_imagePath = true && this.isSetImagePath();
- boolean that_present_imagePath = true && that.isSetImagePath();
- if (this_present_imagePath || that_present_imagePath) {
- if (!(this_present_imagePath && that_present_imagePath))
- return false;
- if (!this.imagePath.equals(that.imagePath))
- return false;
- }
-
- boolean this_present_isTemplate = true;
- boolean that_present_isTemplate = true;
- if (this_present_isTemplate || that_present_isTemplate) {
- if (!(this_present_isTemplate && that_present_isTemplate))
- return false;
- if (this.isTemplate != that.isTemplate)
- return false;
- }
-
- boolean this_present_filesize = true;
- boolean that_present_filesize = true;
- if (this_present_filesize || that_present_filesize) {
- if (!(this_present_filesize && that_present_filesize))
- return false;
- if (this.filesize != that.filesize)
- return false;
- }
-
- boolean this_present_shareMode = true;
- boolean that_present_shareMode = true;
- if (this_present_shareMode || that_present_shareMode) {
- if (!(this_present_shareMode && that_present_shareMode))
- return false;
- if (this.shareMode != that.shareMode)
- return false;
- }
-
- boolean this_present_os = true && this.isSetOs();
- boolean that_present_os = true && that.isSetOs();
- if (this_present_os || that_present_os) {
- if (!(this_present_os && that_present_os))
- return false;
- if (!this.os.equals(that.os))
- return false;
- }
-
- boolean this_present_uid = true && this.isSetUid();
- boolean that_present_uid = true && that.isSetUid();
- if (this_present_uid || that_present_uid) {
- if (!(this_present_uid && that_present_uid))
- return false;
- if (!this.uid.equals(that.uid))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(writeVLdata_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImagename()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDesc()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetTel()).compareTo(other.isSetTel());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTel()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Tel, other.Tel);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFak()).compareTo(other.isSetFak());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFak()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Fak, other.Fak);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLicense()).compareTo(other.isSetLicense());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLicense()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.license, other.license);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetInternet()).compareTo(other.isSetInternet());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetInternet()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internet, other.internet);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetRam()).compareTo(other.isSetRam());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRam()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ram, other.ram);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCpu()).compareTo(other.isSetCpu());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCpu()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpu, other.cpu);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImagePath()).compareTo(other.isSetImagePath());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImagePath()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagePath, other.imagePath);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsTemplate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFilesize()).compareTo(other.isSetFilesize());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFilesize()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesize, other.filesize);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetShareMode()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOs()).compareTo(other.isSetOs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.os, other.os);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUid()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uid, other.uid);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeVLdata_args(");
- boolean first = true;
-
- sb.append("imagename:");
- if (this.imagename == null) {
- sb.append("null");
- } else {
- sb.append(this.imagename);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("desc:");
- if (this.desc == null) {
- sb.append("null");
- } else {
- sb.append(this.desc);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Tel:");
- if (this.Tel == null) {
- sb.append("null");
- } else {
- sb.append(this.Tel);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Fak:");
- if (this.Fak == null) {
- sb.append("null");
- } else {
- sb.append(this.Fak);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("license:");
- sb.append(this.license);
- first = false;
- if (!first) sb.append(", ");
- sb.append("internet:");
- sb.append(this.internet);
- first = false;
- if (!first) sb.append(", ");
- sb.append("ram:");
- sb.append(this.ram);
- first = false;
- if (!first) sb.append(", ");
- sb.append("cpu:");
- sb.append(this.cpu);
- first = false;
- if (!first) sb.append(", ");
- sb.append("imagePath:");
- if (this.imagePath == null) {
- sb.append("null");
- } else {
- sb.append(this.imagePath);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isTemplate:");
- sb.append(this.isTemplate);
- first = false;
- if (!first) sb.append(", ");
- sb.append("filesize:");
- sb.append(this.filesize);
- first = false;
- if (!first) sb.append(", ");
- sb.append("shareMode:");
- sb.append(this.shareMode);
- first = false;
- if (!first) sb.append(", ");
- sb.append("os:");
- if (this.os == null) {
- sb.append("null");
- } else {
- sb.append(this.os);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("uid:");
- if (this.uid == null) {
- sb.append("null");
- } else {
- sb.append(this.uid);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // 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 writeVLdata_argsStandardSchemeFactory implements SchemeFactory {
- public writeVLdata_argsStandardScheme getScheme() {
- return new writeVLdata_argsStandardScheme();
- }
- }
-
- private static class writeVLdata_argsStandardScheme extends StandardScheme<writeVLdata_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeVLdata_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: // IMAGENAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // DESC
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // TEL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Tel = iprot.readString();
- struct.setTelIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // FAK
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Fak = iprot.readString();
- struct.setFakIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // LICENSE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.license = iprot.readBool();
- struct.setLicenseIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // INTERNET
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.internet = iprot.readBool();
- struct.setInternetIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 12: // RAM
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.ram = iprot.readI64();
- struct.setRamIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 13: // CPU
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.cpu = iprot.readI64();
- struct.setCpuIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 14: // IMAGE_PATH
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imagePath = iprot.readString();
- struct.setImagePathIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 15: // IS_TEMPLATE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isTemplate = iprot.readBool();
- struct.setIsTemplateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 16: // FILESIZE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.filesize = iprot.readI64();
- struct.setFilesizeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 17: // SHARE_MODE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.shareMode = iprot.readI64();
- struct.setShareModeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 18: // OS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.os = iprot.readString();
- struct.setOsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 19: // UID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.uid = iprot.readString();
- struct.setUidIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 20: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 21: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, writeVLdata_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.imagename != null) {
- oprot.writeFieldBegin(IMAGENAME_FIELD_DESC);
- oprot.writeString(struct.imagename);
- oprot.writeFieldEnd();
- }
- if (struct.desc != null) {
- oprot.writeFieldBegin(DESC_FIELD_DESC);
- oprot.writeString(struct.desc);
- oprot.writeFieldEnd();
- }
- if (struct.Tel != null) {
- oprot.writeFieldBegin(TEL_FIELD_DESC);
- oprot.writeString(struct.Tel);
- oprot.writeFieldEnd();
- }
- if (struct.Fak != null) {
- oprot.writeFieldBegin(FAK_FIELD_DESC);
- oprot.writeString(struct.Fak);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(LICENSE_FIELD_DESC);
- oprot.writeBool(struct.license);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(INTERNET_FIELD_DESC);
- oprot.writeBool(struct.internet);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(RAM_FIELD_DESC);
- oprot.writeI64(struct.ram);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(CPU_FIELD_DESC);
- oprot.writeI64(struct.cpu);
- oprot.writeFieldEnd();
- if (struct.imagePath != null) {
- oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC);
- oprot.writeString(struct.imagePath);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC);
- oprot.writeBool(struct.isTemplate);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(FILESIZE_FIELD_DESC);
- oprot.writeI64(struct.filesize);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC);
- oprot.writeI64(struct.shareMode);
- oprot.writeFieldEnd();
- if (struct.os != null) {
- oprot.writeFieldBegin(OS_FIELD_DESC);
- oprot.writeString(struct.os);
- oprot.writeFieldEnd();
- }
- if (struct.uid != null) {
- oprot.writeFieldBegin(UID_FIELD_DESC);
- oprot.writeString(struct.uid);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class writeVLdata_argsTupleSchemeFactory implements SchemeFactory {
- public writeVLdata_argsTupleScheme getScheme() {
- return new writeVLdata_argsTupleScheme();
- }
- }
-
- private static class writeVLdata_argsTupleScheme extends TupleScheme<writeVLdata_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeVLdata_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImagename()) {
- optionals.set(0);
- }
- if (struct.isSetDesc()) {
- optionals.set(1);
- }
- if (struct.isSetTel()) {
- optionals.set(2);
- }
- if (struct.isSetFak()) {
- optionals.set(3);
- }
- if (struct.isSetLicense()) {
- optionals.set(4);
- }
- if (struct.isSetInternet()) {
- optionals.set(5);
- }
- if (struct.isSetRam()) {
- optionals.set(6);
- }
- if (struct.isSetCpu()) {
- optionals.set(7);
- }
- if (struct.isSetImagePath()) {
- optionals.set(8);
- }
- if (struct.isSetIsTemplate()) {
- optionals.set(9);
- }
- if (struct.isSetFilesize()) {
- optionals.set(10);
- }
- if (struct.isSetShareMode()) {
- optionals.set(11);
- }
- if (struct.isSetOs()) {
- optionals.set(12);
- }
- if (struct.isSetUid()) {
- optionals.set(13);
- }
- if (struct.isSetToken()) {
- optionals.set(14);
- }
- if (struct.isSetUserID()) {
- optionals.set(15);
- }
- oprot.writeBitSet(optionals, 16);
- if (struct.isSetImagename()) {
- oprot.writeString(struct.imagename);
- }
- if (struct.isSetDesc()) {
- oprot.writeString(struct.desc);
- }
- if (struct.isSetTel()) {
- oprot.writeString(struct.Tel);
- }
- if (struct.isSetFak()) {
- oprot.writeString(struct.Fak);
- }
- if (struct.isSetLicense()) {
- oprot.writeBool(struct.license);
- }
- if (struct.isSetInternet()) {
- oprot.writeBool(struct.internet);
- }
- if (struct.isSetRam()) {
- oprot.writeI64(struct.ram);
- }
- if (struct.isSetCpu()) {
- oprot.writeI64(struct.cpu);
- }
- if (struct.isSetImagePath()) {
- oprot.writeString(struct.imagePath);
- }
- if (struct.isSetIsTemplate()) {
- oprot.writeBool(struct.isTemplate);
- }
- if (struct.isSetFilesize()) {
- oprot.writeI64(struct.filesize);
- }
- if (struct.isSetShareMode()) {
- oprot.writeI64(struct.shareMode);
- }
- if (struct.isSetOs()) {
- oprot.writeString(struct.os);
- }
- if (struct.isSetUid()) {
- oprot.writeString(struct.uid);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, writeVLdata_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(16);
- if (incoming.get(0)) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- }
- if (incoming.get(2)) {
- struct.Tel = iprot.readString();
- struct.setTelIsSet(true);
- }
- if (incoming.get(3)) {
- struct.Fak = iprot.readString();
- struct.setFakIsSet(true);
- }
- if (incoming.get(4)) {
- struct.license = iprot.readBool();
- struct.setLicenseIsSet(true);
- }
- if (incoming.get(5)) {
- struct.internet = iprot.readBool();
- struct.setInternetIsSet(true);
- }
- if (incoming.get(6)) {
- struct.ram = iprot.readI64();
- struct.setRamIsSet(true);
- }
- if (incoming.get(7)) {
- struct.cpu = iprot.readI64();
- struct.setCpuIsSet(true);
- }
- if (incoming.get(8)) {
- struct.imagePath = iprot.readString();
- struct.setImagePathIsSet(true);
- }
- if (incoming.get(9)) {
- struct.isTemplate = iprot.readBool();
- struct.setIsTemplateIsSet(true);
- }
- if (incoming.get(10)) {
- struct.filesize = iprot.readI64();
- struct.setFilesizeIsSet(true);
- }
- if (incoming.get(11)) {
- struct.shareMode = iprot.readI64();
- struct.setShareModeIsSet(true);
- }
- if (incoming.get(12)) {
- struct.os = iprot.readString();
- struct.setOsIsSet(true);
- }
- if (incoming.get(13)) {
- struct.uid = iprot.readString();
- struct.setUidIsSet(true);
- }
- if (incoming.get(14)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(15)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeVLdata_result implements org.apache.thrift.TBase<writeVLdata_result, writeVLdata_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeVLdata_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeVLdata_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeVLdata_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeVLdata_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeVLdata_result.class, metaDataMap);
- }
-
- public writeVLdata_result() {
- }
-
- public writeVLdata_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeVLdata_result(writeVLdata_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public writeVLdata_result deepCopy() {
- return new writeVLdata_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public writeVLdata_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 writeVLdata_result)
- return this.equals((writeVLdata_result)that);
- return false;
- }
-
- public boolean equals(writeVLdata_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(writeVLdata_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("writeVLdata_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 writeVLdata_resultStandardSchemeFactory implements SchemeFactory {
- public writeVLdata_resultStandardScheme getScheme() {
- return new writeVLdata_resultStandardScheme();
- }
- }
-
- private static class writeVLdata_resultStandardScheme extends StandardScheme<writeVLdata_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeVLdata_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, writeVLdata_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 writeVLdata_resultTupleSchemeFactory implements SchemeFactory {
- public writeVLdata_resultTupleScheme getScheme() {
- return new writeVLdata_resultTupleScheme();
- }
- }
-
- private static class writeVLdata_resultTupleScheme extends TupleScheme<writeVLdata_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeVLdata_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, writeVLdata_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionWrite_args implements org.apache.thrift.TBase<getImageListPermissionWrite_args, getImageListPermissionWrite_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionWrite_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionWrite_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionWrite_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionWrite_argsTupleSchemeFactory());
- }
-
- public String userID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionWrite_args.class, metaDataMap);
- }
-
- public getImageListPermissionWrite_args() {
- }
-
- public getImageListPermissionWrite_args(
- String userID,
- String token)
- {
- this();
- this.userID = userID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionWrite_args(getImageListPermissionWrite_args other) {
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getImageListPermissionWrite_args deepCopy() {
- return new getImageListPermissionWrite_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.token = null;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public getImageListPermissionWrite_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getImageListPermissionWrite_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionWrite_args)
- return this.equals((getImageListPermissionWrite_args)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionWrite_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionWrite_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageListPermissionWrite_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionWrite_argsStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionWrite_argsStandardScheme getScheme() {
- return new getImageListPermissionWrite_argsStandardScheme();
- }
- }
-
- private static class getImageListPermissionWrite_argsStandardScheme extends StandardScheme<getImageListPermissionWrite_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionWrite_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionWrite_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionWrite_argsTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionWrite_argsTupleScheme getScheme() {
- return new getImageListPermissionWrite_argsTupleScheme();
- }
- }
-
- private static class getImageListPermissionWrite_argsTupleScheme extends TupleScheme<getImageListPermissionWrite_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionWrite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionWrite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionWrite_result implements org.apache.thrift.TBase<getImageListPermissionWrite_result, getImageListPermissionWrite_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionWrite_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionWrite_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionWrite_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionWrite_resultTupleSchemeFactory());
- }
-
- public List<Image> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Image.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionWrite_result.class, metaDataMap);
- }
-
- public getImageListPermissionWrite_result() {
- }
-
- public getImageListPermissionWrite_result(
- List<Image> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionWrite_result(getImageListPermissionWrite_result other) {
- if (other.isSetSuccess()) {
- List<Image> __this__success = new ArrayList<Image>(other.success.size());
- for (Image other_element : other.success) {
- __this__success.add(new Image(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getImageListPermissionWrite_result deepCopy() {
- return new getImageListPermissionWrite_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Image> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Image elem) {
- if (this.success == null) {
- this.success = new ArrayList<Image>();
- }
- this.success.add(elem);
- }
-
- public List<Image> getSuccess() {
- return this.success;
- }
-
- public getImageListPermissionWrite_result setSuccess(List<Image> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Image>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionWrite_result)
- return this.equals((getImageListPermissionWrite_result)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionWrite_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionWrite_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("getImageListPermissionWrite_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionWrite_resultStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionWrite_resultStandardScheme getScheme() {
- return new getImageListPermissionWrite_resultStandardScheme();
- }
- }
-
- private static class getImageListPermissionWrite_resultStandardScheme extends StandardScheme<getImageListPermissionWrite_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionWrite_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.success = new ArrayList<Image>(_list0.size);
- for (int _i1 = 0; _i1 < _list0.size; ++_i1)
- {
- Image _elem2;
- _elem2 = new Image();
- _elem2.read(iprot);
- struct.success.add(_elem2);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionWrite_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Image _iter3 : struct.success)
- {
- _iter3.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionWrite_resultTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionWrite_resultTupleScheme getScheme() {
- return new getImageListPermissionWrite_resultTupleScheme();
- }
- }
-
- private static class getImageListPermissionWrite_resultTupleScheme extends TupleScheme<getImageListPermissionWrite_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionWrite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Image _iter4 : struct.success)
- {
- _iter4.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionWrite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Image>(_list5.size);
- for (int _i6 = 0; _i6 < _list5.size; ++_i6)
- {
- Image _elem7;
- _elem7 = new Image();
- _elem7.read(iprot);
- struct.success.add(_elem7);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionRead_args implements org.apache.thrift.TBase<getImageListPermissionRead_args, getImageListPermissionRead_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionRead_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionRead_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionRead_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionRead_argsTupleSchemeFactory());
- }
-
- public String userID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionRead_args.class, metaDataMap);
- }
-
- public getImageListPermissionRead_args() {
- }
-
- public getImageListPermissionRead_args(
- String userID,
- String token)
- {
- this();
- this.userID = userID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionRead_args(getImageListPermissionRead_args other) {
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getImageListPermissionRead_args deepCopy() {
- return new getImageListPermissionRead_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.token = null;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public getImageListPermissionRead_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getImageListPermissionRead_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionRead_args)
- return this.equals((getImageListPermissionRead_args)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionRead_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionRead_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageListPermissionRead_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionRead_argsStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionRead_argsStandardScheme getScheme() {
- return new getImageListPermissionRead_argsStandardScheme();
- }
- }
-
- private static class getImageListPermissionRead_argsStandardScheme extends StandardScheme<getImageListPermissionRead_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionRead_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionRead_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionRead_argsTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionRead_argsTupleScheme getScheme() {
- return new getImageListPermissionRead_argsTupleScheme();
- }
- }
-
- private static class getImageListPermissionRead_argsTupleScheme extends TupleScheme<getImageListPermissionRead_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionRead_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionRead_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionRead_result implements org.apache.thrift.TBase<getImageListPermissionRead_result, getImageListPermissionRead_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionRead_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionRead_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionRead_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionRead_resultTupleSchemeFactory());
- }
-
- public List<Image> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Image.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionRead_result.class, metaDataMap);
- }
-
- public getImageListPermissionRead_result() {
- }
-
- public getImageListPermissionRead_result(
- List<Image> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionRead_result(getImageListPermissionRead_result other) {
- if (other.isSetSuccess()) {
- List<Image> __this__success = new ArrayList<Image>(other.success.size());
- for (Image other_element : other.success) {
- __this__success.add(new Image(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getImageListPermissionRead_result deepCopy() {
- return new getImageListPermissionRead_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Image> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Image elem) {
- if (this.success == null) {
- this.success = new ArrayList<Image>();
- }
- this.success.add(elem);
- }
-
- public List<Image> getSuccess() {
- return this.success;
- }
-
- public getImageListPermissionRead_result setSuccess(List<Image> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Image>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionRead_result)
- return this.equals((getImageListPermissionRead_result)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionRead_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionRead_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("getImageListPermissionRead_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionRead_resultStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionRead_resultStandardScheme getScheme() {
- return new getImageListPermissionRead_resultStandardScheme();
- }
- }
-
- private static class getImageListPermissionRead_resultStandardScheme extends StandardScheme<getImageListPermissionRead_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionRead_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.success = new ArrayList<Image>(_list8.size);
- for (int _i9 = 0; _i9 < _list8.size; ++_i9)
- {
- Image _elem10;
- _elem10 = new Image();
- _elem10.read(iprot);
- struct.success.add(_elem10);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionRead_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Image _iter11 : struct.success)
- {
- _iter11.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionRead_resultTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionRead_resultTupleScheme getScheme() {
- return new getImageListPermissionRead_resultTupleScheme();
- }
- }
-
- private static class getImageListPermissionRead_resultTupleScheme extends TupleScheme<getImageListPermissionRead_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionRead_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Image _iter12 : struct.success)
- {
- _iter12.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionRead_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Image>(_list13.size);
- for (int _i14 = 0; _i14 < _list13.size; ++_i14)
- {
- Image _elem15;
- _elem15 = new Image();
- _elem15.read(iprot);
- struct.success.add(_elem15);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionLink_args implements org.apache.thrift.TBase<getImageListPermissionLink_args, getImageListPermissionLink_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionLink_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionLink_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionLink_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionLink_argsTupleSchemeFactory());
- }
-
- public String userID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionLink_args.class, metaDataMap);
- }
-
- public getImageListPermissionLink_args() {
- }
-
- public getImageListPermissionLink_args(
- String userID,
- String token)
- {
- this();
- this.userID = userID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionLink_args(getImageListPermissionLink_args other) {
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getImageListPermissionLink_args deepCopy() {
- return new getImageListPermissionLink_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.token = null;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public getImageListPermissionLink_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getImageListPermissionLink_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionLink_args)
- return this.equals((getImageListPermissionLink_args)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionLink_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionLink_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageListPermissionLink_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionLink_argsStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionLink_argsStandardScheme getScheme() {
- return new getImageListPermissionLink_argsStandardScheme();
- }
- }
-
- private static class getImageListPermissionLink_argsStandardScheme extends StandardScheme<getImageListPermissionLink_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionLink_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionLink_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionLink_argsTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionLink_argsTupleScheme getScheme() {
- return new getImageListPermissionLink_argsTupleScheme();
- }
- }
-
- private static class getImageListPermissionLink_argsTupleScheme extends TupleScheme<getImageListPermissionLink_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionLink_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionLink_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionLink_result implements org.apache.thrift.TBase<getImageListPermissionLink_result, getImageListPermissionLink_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionLink_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionLink_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionLink_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionLink_resultTupleSchemeFactory());
- }
-
- public List<Image> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Image.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionLink_result.class, metaDataMap);
- }
-
- public getImageListPermissionLink_result() {
- }
-
- public getImageListPermissionLink_result(
- List<Image> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionLink_result(getImageListPermissionLink_result other) {
- if (other.isSetSuccess()) {
- List<Image> __this__success = new ArrayList<Image>(other.success.size());
- for (Image other_element : other.success) {
- __this__success.add(new Image(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getImageListPermissionLink_result deepCopy() {
- return new getImageListPermissionLink_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Image> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Image elem) {
- if (this.success == null) {
- this.success = new ArrayList<Image>();
- }
- this.success.add(elem);
- }
-
- public List<Image> getSuccess() {
- return this.success;
- }
-
- public getImageListPermissionLink_result setSuccess(List<Image> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Image>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionLink_result)
- return this.equals((getImageListPermissionLink_result)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionLink_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionLink_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("getImageListPermissionLink_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionLink_resultStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionLink_resultStandardScheme getScheme() {
- return new getImageListPermissionLink_resultStandardScheme();
- }
- }
-
- private static class getImageListPermissionLink_resultStandardScheme extends StandardScheme<getImageListPermissionLink_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionLink_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.success = new ArrayList<Image>(_list16.size);
- for (int _i17 = 0; _i17 < _list16.size; ++_i17)
- {
- Image _elem18;
- _elem18 = new Image();
- _elem18.read(iprot);
- struct.success.add(_elem18);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionLink_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Image _iter19 : struct.success)
- {
- _iter19.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionLink_resultTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionLink_resultTupleScheme getScheme() {
- return new getImageListPermissionLink_resultTupleScheme();
- }
- }
-
- private static class getImageListPermissionLink_resultTupleScheme extends TupleScheme<getImageListPermissionLink_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionLink_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Image _iter20 : struct.success)
- {
- _iter20.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionLink_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Image>(_list21.size);
- for (int _i22 = 0; _i22 < _list21.size; ++_i22)
- {
- Image _elem23;
- _elem23 = new Image();
- _elem23.read(iprot);
- struct.success.add(_elem23);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionAdmin_args implements org.apache.thrift.TBase<getImageListPermissionAdmin_args, getImageListPermissionAdmin_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionAdmin_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionAdmin_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionAdmin_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionAdmin_argsTupleSchemeFactory());
- }
-
- public String userID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionAdmin_args.class, metaDataMap);
- }
-
- public getImageListPermissionAdmin_args() {
- }
-
- public getImageListPermissionAdmin_args(
- String userID,
- String token)
- {
- this();
- this.userID = userID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionAdmin_args(getImageListPermissionAdmin_args other) {
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getImageListPermissionAdmin_args deepCopy() {
- return new getImageListPermissionAdmin_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.token = null;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public getImageListPermissionAdmin_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getImageListPermissionAdmin_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionAdmin_args)
- return this.equals((getImageListPermissionAdmin_args)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionAdmin_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionAdmin_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageListPermissionAdmin_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionAdmin_argsStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionAdmin_argsStandardScheme getScheme() {
- return new getImageListPermissionAdmin_argsStandardScheme();
- }
- }
-
- private static class getImageListPermissionAdmin_argsStandardScheme extends StandardScheme<getImageListPermissionAdmin_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionAdmin_argsTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionAdmin_argsTupleScheme getScheme() {
- return new getImageListPermissionAdmin_argsTupleScheme();
- }
- }
-
- private static class getImageListPermissionAdmin_argsTupleScheme extends TupleScheme<getImageListPermissionAdmin_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListPermissionAdmin_result implements org.apache.thrift.TBase<getImageListPermissionAdmin_result, getImageListPermissionAdmin_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListPermissionAdmin_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListPermissionAdmin_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListPermissionAdmin_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListPermissionAdmin_resultTupleSchemeFactory());
- }
-
- public List<Image> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Image.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListPermissionAdmin_result.class, metaDataMap);
- }
-
- public getImageListPermissionAdmin_result() {
- }
-
- public getImageListPermissionAdmin_result(
- List<Image> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListPermissionAdmin_result(getImageListPermissionAdmin_result other) {
- if (other.isSetSuccess()) {
- List<Image> __this__success = new ArrayList<Image>(other.success.size());
- for (Image other_element : other.success) {
- __this__success.add(new Image(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getImageListPermissionAdmin_result deepCopy() {
- return new getImageListPermissionAdmin_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Image> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Image elem) {
- if (this.success == null) {
- this.success = new ArrayList<Image>();
- }
- this.success.add(elem);
- }
-
- public List<Image> getSuccess() {
- return this.success;
- }
-
- public getImageListPermissionAdmin_result setSuccess(List<Image> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Image>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListPermissionAdmin_result)
- return this.equals((getImageListPermissionAdmin_result)that);
- return false;
- }
-
- public boolean equals(getImageListPermissionAdmin_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListPermissionAdmin_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("getImageListPermissionAdmin_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListPermissionAdmin_resultStandardSchemeFactory implements SchemeFactory {
- public getImageListPermissionAdmin_resultStandardScheme getScheme() {
- return new getImageListPermissionAdmin_resultStandardScheme();
- }
- }
-
- private static class getImageListPermissionAdmin_resultStandardScheme extends StandardScheme<getImageListPermissionAdmin_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
- struct.success = new ArrayList<Image>(_list24.size);
- for (int _i25 = 0; _i25 < _list24.size; ++_i25)
- {
- Image _elem26;
- _elem26 = new Image();
- _elem26.read(iprot);
- struct.success.add(_elem26);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Image _iter27 : struct.success)
- {
- _iter27.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListPermissionAdmin_resultTupleSchemeFactory implements SchemeFactory {
- public getImageListPermissionAdmin_resultTupleScheme getScheme() {
- return new getImageListPermissionAdmin_resultTupleScheme();
- }
- }
-
- private static class getImageListPermissionAdmin_resultTupleScheme extends TupleScheme<getImageListPermissionAdmin_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Image _iter28 : struct.success)
- {
- _iter28.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Image>(_list29.size);
- for (int _i30 = 0; _i30 < _list29.size; ++_i30)
- {
- Image _elem31;
- _elem31 = new Image();
- _elem31.read(iprot);
- struct.success.add(_elem31);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListAllTemplates_args implements org.apache.thrift.TBase<getImageListAllTemplates_args, getImageListAllTemplates_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListAllTemplates_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListAllTemplates_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListAllTemplates_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListAllTemplates_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListAllTemplates_args.class, metaDataMap);
- }
-
- public getImageListAllTemplates_args() {
- }
-
- public getImageListAllTemplates_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListAllTemplates_args(getImageListAllTemplates_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getImageListAllTemplates_args deepCopy() {
- return new getImageListAllTemplates_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getImageListAllTemplates_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListAllTemplates_args)
- return this.equals((getImageListAllTemplates_args)that);
- return false;
- }
-
- public boolean equals(getImageListAllTemplates_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListAllTemplates_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageListAllTemplates_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListAllTemplates_argsStandardSchemeFactory implements SchemeFactory {
- public getImageListAllTemplates_argsStandardScheme getScheme() {
- return new getImageListAllTemplates_argsStandardScheme();
- }
- }
-
- private static class getImageListAllTemplates_argsStandardScheme extends StandardScheme<getImageListAllTemplates_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListAllTemplates_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListAllTemplates_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListAllTemplates_argsTupleSchemeFactory implements SchemeFactory {
- public getImageListAllTemplates_argsTupleScheme getScheme() {
- return new getImageListAllTemplates_argsTupleScheme();
- }
- }
-
- private static class getImageListAllTemplates_argsTupleScheme extends TupleScheme<getImageListAllTemplates_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListAllTemplates_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListAllTemplates_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageListAllTemplates_result implements org.apache.thrift.TBase<getImageListAllTemplates_result, getImageListAllTemplates_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageListAllTemplates_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageListAllTemplates_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageListAllTemplates_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageListAllTemplates_resultTupleSchemeFactory());
- }
-
- public List<Image> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Image.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageListAllTemplates_result.class, metaDataMap);
- }
-
- public getImageListAllTemplates_result() {
- }
-
- public getImageListAllTemplates_result(
- List<Image> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageListAllTemplates_result(getImageListAllTemplates_result other) {
- if (other.isSetSuccess()) {
- List<Image> __this__success = new ArrayList<Image>(other.success.size());
- for (Image other_element : other.success) {
- __this__success.add(new Image(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getImageListAllTemplates_result deepCopy() {
- return new getImageListAllTemplates_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Image> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Image elem) {
- if (this.success == null) {
- this.success = new ArrayList<Image>();
- }
- this.success.add(elem);
- }
-
- public List<Image> getSuccess() {
- return this.success;
- }
-
- public getImageListAllTemplates_result setSuccess(List<Image> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Image>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageListAllTemplates_result)
- return this.equals((getImageListAllTemplates_result)that);
- return false;
- }
-
- public boolean equals(getImageListAllTemplates_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageListAllTemplates_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("getImageListAllTemplates_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageListAllTemplates_resultStandardSchemeFactory implements SchemeFactory {
- public getImageListAllTemplates_resultStandardScheme getScheme() {
- return new getImageListAllTemplates_resultStandardScheme();
- }
- }
-
- private static class getImageListAllTemplates_resultStandardScheme extends StandardScheme<getImageListAllTemplates_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageListAllTemplates_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
- struct.success = new ArrayList<Image>(_list32.size);
- for (int _i33 = 0; _i33 < _list32.size; ++_i33)
- {
- Image _elem34;
- _elem34 = new Image();
- _elem34.read(iprot);
- struct.success.add(_elem34);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageListAllTemplates_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Image _iter35 : struct.success)
- {
- _iter35.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageListAllTemplates_resultTupleSchemeFactory implements SchemeFactory {
- public getImageListAllTemplates_resultTupleScheme getScheme() {
- return new getImageListAllTemplates_resultTupleScheme();
- }
- }
-
- private static class getImageListAllTemplates_resultTupleScheme extends TupleScheme<getImageListAllTemplates_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageListAllTemplates_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Image _iter36 : struct.success)
- {
- _iter36.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageListAllTemplates_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Image>(_list37.size);
- for (int _i38 = 0; _i38 < _list37.size; ++_i38)
- {
- Image _elem39;
- _elem39 = new Image();
- _elem39.read(iprot);
- struct.success.add(_elem39);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageList_args implements org.apache.thrift.TBase<getImageList_args, getImageList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageList_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageList_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageList_argsTupleSchemeFactory());
- }
-
- public String userID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_args.class, metaDataMap);
- }
-
- public getImageList_args() {
- }
-
- public getImageList_args(
- String userID,
- String token)
- {
- this();
- this.userID = userID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageList_args(getImageList_args other) {
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getImageList_args deepCopy() {
- return new getImageList_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.token = null;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public getImageList_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getImageList_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageList_args)
- return this.equals((getImageList_args)that);
- return false;
- }
-
- public boolean equals(getImageList_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageList_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageList_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageList_argsStandardSchemeFactory implements SchemeFactory {
- public getImageList_argsStandardScheme getScheme() {
- return new getImageList_argsStandardScheme();
- }
- }
-
- private static class getImageList_argsStandardScheme extends StandardScheme<getImageList_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageList_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageList_argsTupleSchemeFactory implements SchemeFactory {
- public getImageList_argsTupleScheme getScheme() {
- return new getImageList_argsTupleScheme();
- }
- }
-
- private static class getImageList_argsTupleScheme extends TupleScheme<getImageList_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageList_result implements org.apache.thrift.TBase<getImageList_result, getImageList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageList_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageList_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageList_resultTupleSchemeFactory());
- }
-
- public List<Image> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Image.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_result.class, metaDataMap);
- }
-
- public getImageList_result() {
- }
-
- public getImageList_result(
- List<Image> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageList_result(getImageList_result other) {
- if (other.isSetSuccess()) {
- List<Image> __this__success = new ArrayList<Image>(other.success.size());
- for (Image other_element : other.success) {
- __this__success.add(new Image(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getImageList_result deepCopy() {
- return new getImageList_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Image> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Image elem) {
- if (this.success == null) {
- this.success = new ArrayList<Image>();
- }
- this.success.add(elem);
- }
-
- public List<Image> getSuccess() {
- return this.success;
- }
-
- public getImageList_result setSuccess(List<Image> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Image>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageList_result)
- return this.equals((getImageList_result)that);
- return false;
- }
-
- public boolean equals(getImageList_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageList_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageList_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageList_resultStandardSchemeFactory implements SchemeFactory {
- public getImageList_resultStandardScheme getScheme() {
- return new getImageList_resultStandardScheme();
- }
- }
-
- private static class getImageList_resultStandardScheme extends StandardScheme<getImageList_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
- struct.success = new ArrayList<Image>(_list40.size);
- for (int _i41 = 0; _i41 < _list40.size; ++_i41)
- {
- Image _elem42;
- _elem42 = new Image();
- _elem42.read(iprot);
- struct.success.add(_elem42);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageList_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Image _iter43 : struct.success)
- {
- _iter43.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageList_resultTupleSchemeFactory implements SchemeFactory {
- public getImageList_resultTupleScheme getScheme() {
- return new getImageList_resultTupleScheme();
- }
- }
-
- private static class getImageList_resultTupleScheme extends TupleScheme<getImageList_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Image _iter44 : struct.success)
- {
- _iter44.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Image>(_list45.size);
- for (int _i46 = 0; _i46 < _list45.size; ++_i46)
- {
- Image _elem47;
- _elem47 = new Image();
- _elem47.read(iprot);
- struct.success.add(_elem47);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureList_args implements org.apache.thrift.TBase<getLectureList_args, getLectureList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureList_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureList_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap);
- }
-
- public getLectureList_args() {
- }
-
- public getLectureList_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureList_args(getLectureList_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getLectureList_args deepCopy() {
- return new getLectureList_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getLectureList_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureList_args)
- return this.equals((getLectureList_args)that);
- return false;
- }
-
- public boolean equals(getLectureList_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureList_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureList_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureList_argsStandardSchemeFactory implements SchemeFactory {
- public getLectureList_argsStandardScheme getScheme() {
- return new getLectureList_argsStandardScheme();
- }
- }
-
- private static class getLectureList_argsStandardScheme extends StandardScheme<getLectureList_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory {
- public getLectureList_argsTupleScheme getScheme() {
- return new getLectureList_argsTupleScheme();
- }
- }
-
- private static class getLectureList_argsTupleScheme extends TupleScheme<getLectureList_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureList_result implements org.apache.thrift.TBase<getLectureList_result, getLectureList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory());
- }
-
- public List<Lecture> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap);
- }
-
- public getLectureList_result() {
- }
-
- public getLectureList_result(
- List<Lecture> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureList_result(getLectureList_result other) {
- if (other.isSetSuccess()) {
- List<Lecture> __this__success = new ArrayList<Lecture>(other.success.size());
- for (Lecture other_element : other.success) {
- __this__success.add(new Lecture(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getLectureList_result deepCopy() {
- return new getLectureList_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Lecture> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Lecture elem) {
- if (this.success == null) {
- this.success = new ArrayList<Lecture>();
- }
- this.success.add(elem);
- }
-
- public List<Lecture> getSuccess() {
- return this.success;
- }
-
- public getLectureList_result setSuccess(List<Lecture> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Lecture>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureList_result)
- return this.equals((getLectureList_result)that);
- return false;
- }
-
- public boolean equals(getLectureList_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureList_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureList_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureList_resultStandardSchemeFactory implements SchemeFactory {
- public getLectureList_resultStandardScheme getScheme() {
- return new getLectureList_resultStandardScheme();
- }
- }
-
- private static class getLectureList_resultStandardScheme extends StandardScheme<getLectureList_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
- struct.success = new ArrayList<Lecture>(_list48.size);
- for (int _i49 = 0; _i49 < _list48.size; ++_i49)
- {
- Lecture _elem50;
- _elem50 = new Lecture();
- _elem50.read(iprot);
- struct.success.add(_elem50);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Lecture _iter51 : struct.success)
- {
- _iter51.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory {
- public getLectureList_resultTupleScheme getScheme() {
- return new getLectureList_resultTupleScheme();
- }
- }
-
- private static class getLectureList_resultTupleScheme extends TupleScheme<getLectureList_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Lecture _iter52 : struct.success)
- {
- _iter52.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Lecture>(_list53.size);
- for (int _i54 = 0; _i54 < _list53.size; ++_i54)
- {
- Lecture _elem55;
- _elem55 = new Lecture();
- _elem55.read(iprot);
- struct.success.add(_elem55);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureListPermissionRead_args implements org.apache.thrift.TBase<getLectureListPermissionRead_args, getLectureListPermissionRead_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureListPermissionRead_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureListPermissionRead_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureListPermissionRead_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureListPermissionRead_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionRead_args.class, metaDataMap);
- }
-
- public getLectureListPermissionRead_args() {
- }
-
- public getLectureListPermissionRead_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureListPermissionRead_args(getLectureListPermissionRead_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getLectureListPermissionRead_args deepCopy() {
- return new getLectureListPermissionRead_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getLectureListPermissionRead_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureListPermissionRead_args)
- return this.equals((getLectureListPermissionRead_args)that);
- return false;
- }
-
- public boolean equals(getLectureListPermissionRead_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureListPermissionRead_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureListPermissionRead_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureListPermissionRead_argsStandardSchemeFactory implements SchemeFactory {
- public getLectureListPermissionRead_argsStandardScheme getScheme() {
- return new getLectureListPermissionRead_argsStandardScheme();
- }
- }
-
- private static class getLectureListPermissionRead_argsStandardScheme extends StandardScheme<getLectureListPermissionRead_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureListPermissionRead_argsTupleSchemeFactory implements SchemeFactory {
- public getLectureListPermissionRead_argsTupleScheme getScheme() {
- return new getLectureListPermissionRead_argsTupleScheme();
- }
- }
-
- private static class getLectureListPermissionRead_argsTupleScheme extends TupleScheme<getLectureListPermissionRead_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureListPermissionRead_result implements org.apache.thrift.TBase<getLectureListPermissionRead_result, getLectureListPermissionRead_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureListPermissionRead_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureListPermissionRead_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureListPermissionRead_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureListPermissionRead_resultTupleSchemeFactory());
- }
-
- public List<Lecture> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionRead_result.class, metaDataMap);
- }
-
- public getLectureListPermissionRead_result() {
- }
-
- public getLectureListPermissionRead_result(
- List<Lecture> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureListPermissionRead_result(getLectureListPermissionRead_result other) {
- if (other.isSetSuccess()) {
- List<Lecture> __this__success = new ArrayList<Lecture>(other.success.size());
- for (Lecture other_element : other.success) {
- __this__success.add(new Lecture(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getLectureListPermissionRead_result deepCopy() {
- return new getLectureListPermissionRead_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Lecture> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Lecture elem) {
- if (this.success == null) {
- this.success = new ArrayList<Lecture>();
- }
- this.success.add(elem);
- }
-
- public List<Lecture> getSuccess() {
- return this.success;
- }
-
- public getLectureListPermissionRead_result setSuccess(List<Lecture> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Lecture>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureListPermissionRead_result)
- return this.equals((getLectureListPermissionRead_result)that);
- return false;
- }
-
- public boolean equals(getLectureListPermissionRead_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureListPermissionRead_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("getLectureListPermissionRead_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureListPermissionRead_resultStandardSchemeFactory implements SchemeFactory {
- public getLectureListPermissionRead_resultStandardScheme getScheme() {
- return new getLectureListPermissionRead_resultStandardScheme();
- }
- }
-
- private static class getLectureListPermissionRead_resultStandardScheme extends StandardScheme<getLectureListPermissionRead_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
- struct.success = new ArrayList<Lecture>(_list56.size);
- for (int _i57 = 0; _i57 < _list56.size; ++_i57)
- {
- Lecture _elem58;
- _elem58 = new Lecture();
- _elem58.read(iprot);
- struct.success.add(_elem58);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Lecture _iter59 : struct.success)
- {
- _iter59.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureListPermissionRead_resultTupleSchemeFactory implements SchemeFactory {
- public getLectureListPermissionRead_resultTupleScheme getScheme() {
- return new getLectureListPermissionRead_resultTupleScheme();
- }
- }
-
- private static class getLectureListPermissionRead_resultTupleScheme extends TupleScheme<getLectureListPermissionRead_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Lecture _iter60 : struct.success)
- {
- _iter60.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionRead_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Lecture>(_list61.size);
- for (int _i62 = 0; _i62 < _list61.size; ++_i62)
- {
- Lecture _elem63;
- _elem63 = new Lecture();
- _elem63.read(iprot);
- struct.success.add(_elem63);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureListPermissionWrite_args implements org.apache.thrift.TBase<getLectureListPermissionWrite_args, getLectureListPermissionWrite_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureListPermissionWrite_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureListPermissionWrite_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureListPermissionWrite_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureListPermissionWrite_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionWrite_args.class, metaDataMap);
- }
-
- public getLectureListPermissionWrite_args() {
- }
-
- public getLectureListPermissionWrite_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureListPermissionWrite_args(getLectureListPermissionWrite_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getLectureListPermissionWrite_args deepCopy() {
- return new getLectureListPermissionWrite_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getLectureListPermissionWrite_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureListPermissionWrite_args)
- return this.equals((getLectureListPermissionWrite_args)that);
- return false;
- }
-
- public boolean equals(getLectureListPermissionWrite_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureListPermissionWrite_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureListPermissionWrite_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureListPermissionWrite_argsStandardSchemeFactory implements SchemeFactory {
- public getLectureListPermissionWrite_argsStandardScheme getScheme() {
- return new getLectureListPermissionWrite_argsStandardScheme();
- }
- }
-
- private static class getLectureListPermissionWrite_argsStandardScheme extends StandardScheme<getLectureListPermissionWrite_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureListPermissionWrite_argsTupleSchemeFactory implements SchemeFactory {
- public getLectureListPermissionWrite_argsTupleScheme getScheme() {
- return new getLectureListPermissionWrite_argsTupleScheme();
- }
- }
-
- private static class getLectureListPermissionWrite_argsTupleScheme extends TupleScheme<getLectureListPermissionWrite_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureListPermissionWrite_result implements org.apache.thrift.TBase<getLectureListPermissionWrite_result, getLectureListPermissionWrite_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureListPermissionWrite_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureListPermissionWrite_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureListPermissionWrite_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureListPermissionWrite_resultTupleSchemeFactory());
- }
-
- public List<Lecture> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionWrite_result.class, metaDataMap);
- }
-
- public getLectureListPermissionWrite_result() {
- }
-
- public getLectureListPermissionWrite_result(
- List<Lecture> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureListPermissionWrite_result(getLectureListPermissionWrite_result other) {
- if (other.isSetSuccess()) {
- List<Lecture> __this__success = new ArrayList<Lecture>(other.success.size());
- for (Lecture other_element : other.success) {
- __this__success.add(new Lecture(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getLectureListPermissionWrite_result deepCopy() {
- return new getLectureListPermissionWrite_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Lecture> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Lecture elem) {
- if (this.success == null) {
- this.success = new ArrayList<Lecture>();
- }
- this.success.add(elem);
- }
-
- public List<Lecture> getSuccess() {
- return this.success;
- }
-
- public getLectureListPermissionWrite_result setSuccess(List<Lecture> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Lecture>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureListPermissionWrite_result)
- return this.equals((getLectureListPermissionWrite_result)that);
- return false;
- }
-
- public boolean equals(getLectureListPermissionWrite_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureListPermissionWrite_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("getLectureListPermissionWrite_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureListPermissionWrite_resultStandardSchemeFactory implements SchemeFactory {
- public getLectureListPermissionWrite_resultStandardScheme getScheme() {
- return new getLectureListPermissionWrite_resultStandardScheme();
- }
- }
-
- private static class getLectureListPermissionWrite_resultStandardScheme extends StandardScheme<getLectureListPermissionWrite_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
- struct.success = new ArrayList<Lecture>(_list64.size);
- for (int _i65 = 0; _i65 < _list64.size; ++_i65)
- {
- Lecture _elem66;
- _elem66 = new Lecture();
- _elem66.read(iprot);
- struct.success.add(_elem66);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Lecture _iter67 : struct.success)
- {
- _iter67.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureListPermissionWrite_resultTupleSchemeFactory implements SchemeFactory {
- public getLectureListPermissionWrite_resultTupleScheme getScheme() {
- return new getLectureListPermissionWrite_resultTupleScheme();
- }
- }
-
- private static class getLectureListPermissionWrite_resultTupleScheme extends TupleScheme<getLectureListPermissionWrite_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Lecture _iter68 : struct.success)
- {
- _iter68.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionWrite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Lecture>(_list69.size);
- for (int _i70 = 0; _i70 < _list69.size; ++_i70)
- {
- Lecture _elem71;
- _elem71 = new Lecture();
- _elem71.read(iprot);
- struct.success.add(_elem71);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureListPermissionAdmin_args implements org.apache.thrift.TBase<getLectureListPermissionAdmin_args, getLectureListPermissionAdmin_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureListPermissionAdmin_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureListPermissionAdmin_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureListPermissionAdmin_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureListPermissionAdmin_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionAdmin_args.class, metaDataMap);
- }
-
- public getLectureListPermissionAdmin_args() {
- }
-
- public getLectureListPermissionAdmin_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureListPermissionAdmin_args(getLectureListPermissionAdmin_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getLectureListPermissionAdmin_args deepCopy() {
- return new getLectureListPermissionAdmin_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getLectureListPermissionAdmin_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureListPermissionAdmin_args)
- return this.equals((getLectureListPermissionAdmin_args)that);
- return false;
- }
-
- public boolean equals(getLectureListPermissionAdmin_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureListPermissionAdmin_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureListPermissionAdmin_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureListPermissionAdmin_argsStandardSchemeFactory implements SchemeFactory {
- public getLectureListPermissionAdmin_argsStandardScheme getScheme() {
- return new getLectureListPermissionAdmin_argsStandardScheme();
- }
- }
-
- private static class getLectureListPermissionAdmin_argsStandardScheme extends StandardScheme<getLectureListPermissionAdmin_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureListPermissionAdmin_argsTupleSchemeFactory implements SchemeFactory {
- public getLectureListPermissionAdmin_argsTupleScheme getScheme() {
- return new getLectureListPermissionAdmin_argsTupleScheme();
- }
- }
-
- private static class getLectureListPermissionAdmin_argsTupleScheme extends TupleScheme<getLectureListPermissionAdmin_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureListPermissionAdmin_result implements org.apache.thrift.TBase<getLectureListPermissionAdmin_result, getLectureListPermissionAdmin_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureListPermissionAdmin_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureListPermissionAdmin_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureListPermissionAdmin_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureListPermissionAdmin_resultTupleSchemeFactory());
- }
-
- public List<Lecture> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Lecture.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureListPermissionAdmin_result.class, metaDataMap);
- }
-
- public getLectureListPermissionAdmin_result() {
- }
-
- public getLectureListPermissionAdmin_result(
- List<Lecture> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureListPermissionAdmin_result(getLectureListPermissionAdmin_result other) {
- if (other.isSetSuccess()) {
- List<Lecture> __this__success = new ArrayList<Lecture>(other.success.size());
- for (Lecture other_element : other.success) {
- __this__success.add(new Lecture(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getLectureListPermissionAdmin_result deepCopy() {
- return new getLectureListPermissionAdmin_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Lecture> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Lecture elem) {
- if (this.success == null) {
- this.success = new ArrayList<Lecture>();
- }
- this.success.add(elem);
- }
-
- public List<Lecture> getSuccess() {
- return this.success;
- }
-
- public getLectureListPermissionAdmin_result setSuccess(List<Lecture> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Lecture>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureListPermissionAdmin_result)
- return this.equals((getLectureListPermissionAdmin_result)that);
- return false;
- }
-
- public boolean equals(getLectureListPermissionAdmin_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureListPermissionAdmin_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("getLectureListPermissionAdmin_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureListPermissionAdmin_resultStandardSchemeFactory implements SchemeFactory {
- public getLectureListPermissionAdmin_resultStandardScheme getScheme() {
- return new getLectureListPermissionAdmin_resultStandardScheme();
- }
- }
-
- private static class getLectureListPermissionAdmin_resultStandardScheme extends StandardScheme<getLectureListPermissionAdmin_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list72 = iprot.readListBegin();
- struct.success = new ArrayList<Lecture>(_list72.size);
- for (int _i73 = 0; _i73 < _list72.size; ++_i73)
- {
- Lecture _elem74;
- _elem74 = new Lecture();
- _elem74.read(iprot);
- struct.success.add(_elem74);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Lecture _iter75 : struct.success)
- {
- _iter75.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureListPermissionAdmin_resultTupleSchemeFactory implements SchemeFactory {
- public getLectureListPermissionAdmin_resultTupleScheme getScheme() {
- return new getLectureListPermissionAdmin_resultTupleScheme();
- }
- }
-
- private static class getLectureListPermissionAdmin_resultTupleScheme extends TupleScheme<getLectureListPermissionAdmin_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Lecture _iter76 : struct.success)
- {
- _iter76.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureListPermissionAdmin_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list77 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Lecture>(_list77.size);
- for (int _i78 = 0; _i78 < _list77.size; ++_i78)
- {
- Lecture _elem79;
- _elem79 = new Lecture();
- _elem79.read(iprot);
- struct.success.add(_elem79);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAllOS_args implements org.apache.thrift.TBase<getAllOS_args, getAllOS_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOS_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOS_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllOS_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllOS_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOS_args.class, metaDataMap);
- }
-
- public getAllOS_args() {
- }
-
- public getAllOS_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAllOS_args(getAllOS_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getAllOS_args deepCopy() {
- return new getAllOS_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getAllOS_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAllOS_args)
- return this.equals((getAllOS_args)that);
- return false;
- }
-
- public boolean equals(getAllOS_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAllOS_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getAllOS_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAllOS_argsStandardSchemeFactory implements SchemeFactory {
- public getAllOS_argsStandardScheme getScheme() {
- return new getAllOS_argsStandardScheme();
- }
- }
-
- private static class getAllOS_argsStandardScheme extends StandardScheme<getAllOS_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOS_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOS_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAllOS_argsTupleSchemeFactory implements SchemeFactory {
- public getAllOS_argsTupleScheme getScheme() {
- return new getAllOS_argsTupleScheme();
- }
- }
-
- private static class getAllOS_argsTupleScheme extends TupleScheme<getAllOS_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAllOS_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAllOS_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAllOS_result implements org.apache.thrift.TBase<getAllOS_result, getAllOS_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOS_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOS_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllOS_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllOS_resultTupleSchemeFactory());
- }
-
- public List<String> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOS_result.class, metaDataMap);
- }
-
- public getAllOS_result() {
- }
-
- public getAllOS_result(
- List<String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAllOS_result(getAllOS_result other) {
- if (other.isSetSuccess()) {
- List<String> __this__success = new ArrayList<String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getAllOS_result deepCopy() {
- return new getAllOS_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<String> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(String elem) {
- if (this.success == null) {
- this.success = new ArrayList<String>();
- }
- this.success.add(elem);
- }
-
- public List<String> getSuccess() {
- return this.success;
- }
-
- public getAllOS_result setSuccess(List<String> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAllOS_result)
- return this.equals((getAllOS_result)that);
- return false;
- }
-
- public boolean equals(getAllOS_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAllOS_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("getAllOS_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAllOS_resultStandardSchemeFactory implements SchemeFactory {
- public getAllOS_resultStandardScheme getScheme() {
- return new getAllOS_resultStandardScheme();
- }
- }
-
- private static class getAllOS_resultStandardScheme extends StandardScheme<getAllOS_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOS_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list80.size);
- for (int _i81 = 0; _i81 < _list80.size; ++_i81)
- {
- String _elem82;
- _elem82 = iprot.readString();
- struct.success.add(_elem82);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOS_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter83 : struct.success)
- {
- oprot.writeString(_iter83);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAllOS_resultTupleSchemeFactory implements SchemeFactory {
- public getAllOS_resultTupleScheme getScheme() {
- return new getAllOS_resultTupleScheme();
- }
- }
-
- private static class getAllOS_resultTupleScheme extends TupleScheme<getAllOS_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAllOS_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (String _iter84 : struct.success)
- {
- oprot.writeString(_iter84);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAllOS_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list85 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list85.size);
- for (int _i86 = 0; _i86 < _list85.size; ++_i86)
- {
- String _elem87;
- _elem87 = iprot.readString();
- struct.success.add(_elem87);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAllUniversities_args implements org.apache.thrift.TBase<getAllUniversities_args, getAllUniversities_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUniversities_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUniversities_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllUniversities_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllUniversities_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUniversities_args.class, metaDataMap);
- }
-
- public getAllUniversities_args() {
- }
-
- public getAllUniversities_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAllUniversities_args(getAllUniversities_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getAllUniversities_args deepCopy() {
- return new getAllUniversities_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getAllUniversities_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAllUniversities_args)
- return this.equals((getAllUniversities_args)that);
- return false;
- }
-
- public boolean equals(getAllUniversities_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAllUniversities_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getAllUniversities_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAllUniversities_argsStandardSchemeFactory implements SchemeFactory {
- public getAllUniversities_argsStandardScheme getScheme() {
- return new getAllUniversities_argsStandardScheme();
- }
- }
-
- private static class getAllUniversities_argsStandardScheme extends StandardScheme<getAllUniversities_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUniversities_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAllUniversities_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAllUniversities_argsTupleSchemeFactory implements SchemeFactory {
- public getAllUniversities_argsTupleScheme getScheme() {
- return new getAllUniversities_argsTupleScheme();
- }
- }
-
- private static class getAllUniversities_argsTupleScheme extends TupleScheme<getAllUniversities_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAllUniversities_result implements org.apache.thrift.TBase<getAllUniversities_result, getAllUniversities_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUniversities_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUniversities_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllUniversities_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllUniversities_resultTupleSchemeFactory());
- }
-
- public List<String> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUniversities_result.class, metaDataMap);
- }
-
- public getAllUniversities_result() {
- }
-
- public getAllUniversities_result(
- List<String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAllUniversities_result(getAllUniversities_result other) {
- if (other.isSetSuccess()) {
- List<String> __this__success = new ArrayList<String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getAllUniversities_result deepCopy() {
- return new getAllUniversities_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<String> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(String elem) {
- if (this.success == null) {
- this.success = new ArrayList<String>();
- }
- this.success.add(elem);
- }
-
- public List<String> getSuccess() {
- return this.success;
- }
-
- public getAllUniversities_result setSuccess(List<String> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAllUniversities_result)
- return this.equals((getAllUniversities_result)that);
- return false;
- }
-
- public boolean equals(getAllUniversities_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAllUniversities_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("getAllUniversities_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAllUniversities_resultStandardSchemeFactory implements SchemeFactory {
- public getAllUniversities_resultStandardScheme getScheme() {
- return new getAllUniversities_resultStandardScheme();
- }
- }
-
- private static class getAllUniversities_resultStandardScheme extends StandardScheme<getAllUniversities_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUniversities_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list88.size);
- for (int _i89 = 0; _i89 < _list88.size; ++_i89)
- {
- String _elem90;
- _elem90 = iprot.readString();
- struct.success.add(_elem90);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAllUniversities_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter91 : struct.success)
- {
- oprot.writeString(_iter91);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAllUniversities_resultTupleSchemeFactory implements SchemeFactory {
- public getAllUniversities_resultTupleScheme getScheme() {
- return new getAllUniversities_resultTupleScheme();
- }
- }
-
- private static class getAllUniversities_resultTupleScheme extends TupleScheme<getAllUniversities_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (String _iter92 : struct.success)
- {
- oprot.writeString(_iter92);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAllUniversities_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list93.size);
- for (int _i94 = 0; _i94 < _list93.size; ++_i94)
- {
- String _elem95;
- _elem95 = iprot.readString();
- struct.success.add(_elem95);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPersonData_args implements org.apache.thrift.TBase<getPersonData_args, getPersonData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPersonData_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPersonData_args");
-
- private static final org.apache.thrift.protocol.TField VORNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("Vorname", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField NACHNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("Nachname", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPersonData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPersonData_argsTupleSchemeFactory());
- }
-
- public String Vorname; // required
- public String Nachname; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- VORNAME((short)1, "Vorname"),
- NACHNAME((short)2, "Nachname"),
- TOKEN((short)3, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // VORNAME
- return VORNAME;
- case 2: // NACHNAME
- return NACHNAME;
- case 3: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.VORNAME, new org.apache.thrift.meta_data.FieldMetaData("Vorname", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NACHNAME, new org.apache.thrift.meta_data.FieldMetaData("Nachname", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPersonData_args.class, metaDataMap);
- }
-
- public getPersonData_args() {
- }
-
- public getPersonData_args(
- String Vorname,
- String Nachname,
- String token)
- {
- this();
- this.Vorname = Vorname;
- this.Nachname = Nachname;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPersonData_args(getPersonData_args other) {
- if (other.isSetVorname()) {
- this.Vorname = other.Vorname;
- }
- if (other.isSetNachname()) {
- this.Nachname = other.Nachname;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getPersonData_args deepCopy() {
- return new getPersonData_args(this);
- }
-
- @Override
- public void clear() {
- this.Vorname = null;
- this.Nachname = null;
- this.token = null;
- }
-
- public String getVorname() {
- return this.Vorname;
- }
-
- public getPersonData_args setVorname(String Vorname) {
- this.Vorname = Vorname;
- return this;
- }
-
- public void unsetVorname() {
- this.Vorname = null;
- }
-
- /** Returns true if field Vorname is set (has been assigned a value) and false otherwise */
- public boolean isSetVorname() {
- return this.Vorname != null;
- }
-
- public void setVornameIsSet(boolean value) {
- if (!value) {
- this.Vorname = null;
- }
- }
-
- public String getNachname() {
- return this.Nachname;
- }
-
- public getPersonData_args setNachname(String Nachname) {
- this.Nachname = Nachname;
- return this;
- }
-
- public void unsetNachname() {
- this.Nachname = null;
- }
-
- /** Returns true if field Nachname is set (has been assigned a value) and false otherwise */
- public boolean isSetNachname() {
- return this.Nachname != null;
- }
-
- public void setNachnameIsSet(boolean value) {
- if (!value) {
- this.Nachname = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getPersonData_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case VORNAME:
- if (value == null) {
- unsetVorname();
- } else {
- setVorname((String)value);
- }
- break;
-
- case NACHNAME:
- if (value == null) {
- unsetNachname();
- } else {
- setNachname((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case VORNAME:
- return getVorname();
-
- case NACHNAME:
- return getNachname();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case VORNAME:
- return isSetVorname();
- case NACHNAME:
- return isSetNachname();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPersonData_args)
- return this.equals((getPersonData_args)that);
- return false;
- }
-
- public boolean equals(getPersonData_args that) {
- if (that == null)
- return false;
-
- boolean this_present_Vorname = true && this.isSetVorname();
- boolean that_present_Vorname = true && that.isSetVorname();
- if (this_present_Vorname || that_present_Vorname) {
- if (!(this_present_Vorname && that_present_Vorname))
- return false;
- if (!this.Vorname.equals(that.Vorname))
- return false;
- }
-
- boolean this_present_Nachname = true && this.isSetNachname();
- boolean that_present_Nachname = true && that.isSetNachname();
- if (this_present_Nachname || that_present_Nachname) {
- if (!(this_present_Nachname && that_present_Nachname))
- return false;
- if (!this.Nachname.equals(that.Nachname))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPersonData_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetVorname()).compareTo(other.isSetVorname());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVorname()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Vorname, other.Vorname);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNachname()).compareTo(other.isSetNachname());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNachname()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Nachname, other.Nachname);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPersonData_args(");
- boolean first = true;
-
- sb.append("Vorname:");
- if (this.Vorname == null) {
- sb.append("null");
- } else {
- sb.append(this.Vorname);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Nachname:");
- if (this.Nachname == null) {
- sb.append("null");
- } else {
- sb.append(this.Nachname);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPersonData_argsStandardSchemeFactory implements SchemeFactory {
- public getPersonData_argsStandardScheme getScheme() {
- return new getPersonData_argsStandardScheme();
- }
- }
-
- private static class getPersonData_argsStandardScheme extends StandardScheme<getPersonData_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPersonData_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: // VORNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Vorname = iprot.readString();
- struct.setVornameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NACHNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Nachname = iprot.readString();
- struct.setNachnameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPersonData_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.Vorname != null) {
- oprot.writeFieldBegin(VORNAME_FIELD_DESC);
- oprot.writeString(struct.Vorname);
- oprot.writeFieldEnd();
- }
- if (struct.Nachname != null) {
- oprot.writeFieldBegin(NACHNAME_FIELD_DESC);
- oprot.writeString(struct.Nachname);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPersonData_argsTupleSchemeFactory implements SchemeFactory {
- public getPersonData_argsTupleScheme getScheme() {
- return new getPersonData_argsTupleScheme();
- }
- }
-
- private static class getPersonData_argsTupleScheme extends TupleScheme<getPersonData_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPersonData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetVorname()) {
- optionals.set(0);
- }
- if (struct.isSetNachname()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetVorname()) {
- oprot.writeString(struct.Vorname);
- }
- if (struct.isSetNachname()) {
- oprot.writeString(struct.Nachname);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPersonData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.Vorname = iprot.readString();
- struct.setVornameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.Nachname = iprot.readString();
- struct.setNachnameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPersonData_result implements org.apache.thrift.TBase<getPersonData_result, getPersonData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPersonData_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPersonData_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPersonData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPersonData_resultTupleSchemeFactory());
- }
-
- public Map<String,String> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPersonData_result.class, metaDataMap);
- }
-
- public getPersonData_result() {
- }
-
- public getPersonData_result(
- Map<String,String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPersonData_result(getPersonData_result other) {
- if (other.isSetSuccess()) {
- Map<String,String> __this__success = new HashMap<String,String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getPersonData_result deepCopy() {
- return new getPersonData_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public void putToSuccess(String key, String val) {
- if (this.success == null) {
- this.success = new HashMap<String,String>();
- }
- this.success.put(key, val);
- }
-
- public Map<String,String> getSuccess() {
- return this.success;
- }
-
- public getPersonData_result setSuccess(Map<String,String> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Map<String,String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPersonData_result)
- return this.equals((getPersonData_result)that);
- return false;
- }
-
- public boolean equals(getPersonData_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPersonData_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("getPersonData_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPersonData_resultStandardSchemeFactory implements SchemeFactory {
- public getPersonData_resultStandardScheme getScheme() {
- return new getPersonData_resultStandardScheme();
- }
- }
-
- private static class getPersonData_resultStandardScheme extends StandardScheme<getPersonData_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPersonData_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map96 = iprot.readMapBegin();
- struct.success = new HashMap<String,String>(2*_map96.size);
- for (int _i97 = 0; _i97 < _map96.size; ++_i97)
- {
- String _key98;
- String _val99;
- _key98 = iprot.readString();
- _val99 = iprot.readString();
- struct.success.put(_key98, _val99);
- }
- iprot.readMapEnd();
- }
- 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, getPersonData_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (Map.Entry<String, String> _iter100 : struct.success.entrySet())
- {
- oprot.writeString(_iter100.getKey());
- oprot.writeString(_iter100.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPersonData_resultTupleSchemeFactory implements SchemeFactory {
- public getPersonData_resultTupleScheme getScheme() {
- return new getPersonData_resultTupleScheme();
- }
- }
-
- private static class getPersonData_resultTupleScheme extends TupleScheme<getPersonData_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPersonData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Map.Entry<String, String> _iter101 : struct.success.entrySet())
- {
- oprot.writeString(_iter101.getKey());
- oprot.writeString(_iter101.getValue());
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPersonData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TMap _map102 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new HashMap<String,String>(2*_map102.size);
- for (int _i103 = 0; _i103 < _map102.size; ++_i103)
- {
- String _key104;
- String _val105;
- _key104 = iprot.readString();
- _val105 = iprot.readString();
- struct.success.put(_key104, _val105);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getItemOwner_args implements org.apache.thrift.TBase<getItemOwner_args, getItemOwner_args._Fields>, java.io.Serializable, Cloneable, Comparable<getItemOwner_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemOwner_args");
-
- private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getItemOwner_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getItemOwner_argsTupleSchemeFactory());
- }
-
- public String itemID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ITEM_ID((short)1, "itemID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ITEM_ID
- return ITEM_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemOwner_args.class, metaDataMap);
- }
-
- public getItemOwner_args() {
- }
-
- public getItemOwner_args(
- String itemID,
- String token)
- {
- this();
- this.itemID = itemID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getItemOwner_args(getItemOwner_args other) {
- if (other.isSetItemID()) {
- this.itemID = other.itemID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getItemOwner_args deepCopy() {
- return new getItemOwner_args(this);
- }
-
- @Override
- public void clear() {
- this.itemID = null;
- this.token = null;
- }
-
- public String getItemID() {
- return this.itemID;
- }
-
- public getItemOwner_args setItemID(String itemID) {
- this.itemID = itemID;
- return this;
- }
-
- public void unsetItemID() {
- this.itemID = null;
- }
-
- /** Returns true if field itemID is set (has been assigned a value) and false otherwise */
- public boolean isSetItemID() {
- return this.itemID != null;
- }
-
- public void setItemIDIsSet(boolean value) {
- if (!value) {
- this.itemID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getItemOwner_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ITEM_ID:
- if (value == null) {
- unsetItemID();
- } else {
- setItemID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ITEM_ID:
- return getItemID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ITEM_ID:
- return isSetItemID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getItemOwner_args)
- return this.equals((getItemOwner_args)that);
- return false;
- }
-
- public boolean equals(getItemOwner_args that) {
- if (that == null)
- return false;
-
- boolean this_present_itemID = true && this.isSetItemID();
- boolean that_present_itemID = true && that.isSetItemID();
- if (this_present_itemID || that_present_itemID) {
- if (!(this_present_itemID && that_present_itemID))
- return false;
- if (!this.itemID.equals(that.itemID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getItemOwner_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetItemID()).compareTo(other.isSetItemID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetItemID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemID, other.itemID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getItemOwner_args(");
- boolean first = true;
-
- sb.append("itemID:");
- if (this.itemID == null) {
- sb.append("null");
- } else {
- sb.append(this.itemID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getItemOwner_argsStandardSchemeFactory implements SchemeFactory {
- public getItemOwner_argsStandardScheme getScheme() {
- return new getItemOwner_argsStandardScheme();
- }
- }
-
- private static class getItemOwner_argsStandardScheme extends StandardScheme<getItemOwner_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getItemOwner_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: // ITEM_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.itemID = iprot.readString();
- struct.setItemIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getItemOwner_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.itemID != null) {
- oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
- oprot.writeString(struct.itemID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getItemOwner_argsTupleSchemeFactory implements SchemeFactory {
- public getItemOwner_argsTupleScheme getScheme() {
- return new getItemOwner_argsTupleScheme();
- }
- }
-
- private static class getItemOwner_argsTupleScheme extends TupleScheme<getItemOwner_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getItemOwner_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetItemID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetItemID()) {
- oprot.writeString(struct.itemID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getItemOwner_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.itemID = iprot.readString();
- struct.setItemIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getItemOwner_result implements org.apache.thrift.TBase<getItemOwner_result, getItemOwner_result._Fields>, java.io.Serializable, Cloneable, Comparable<getItemOwner_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemOwner_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getItemOwner_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getItemOwner_resultTupleSchemeFactory());
- }
-
- public Map<String,String> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemOwner_result.class, metaDataMap);
- }
-
- public getItemOwner_result() {
- }
-
- public getItemOwner_result(
- Map<String,String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getItemOwner_result(getItemOwner_result other) {
- if (other.isSetSuccess()) {
- Map<String,String> __this__success = new HashMap<String,String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getItemOwner_result deepCopy() {
- return new getItemOwner_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public void putToSuccess(String key, String val) {
- if (this.success == null) {
- this.success = new HashMap<String,String>();
- }
- this.success.put(key, val);
- }
-
- public Map<String,String> getSuccess() {
- return this.success;
- }
-
- public getItemOwner_result setSuccess(Map<String,String> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Map<String,String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getItemOwner_result)
- return this.equals((getItemOwner_result)that);
- return false;
- }
-
- public boolean equals(getItemOwner_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getItemOwner_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("getItemOwner_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getItemOwner_resultStandardSchemeFactory implements SchemeFactory {
- public getItemOwner_resultStandardScheme getScheme() {
- return new getItemOwner_resultStandardScheme();
- }
- }
-
- private static class getItemOwner_resultStandardScheme extends StandardScheme<getItemOwner_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getItemOwner_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin();
- struct.success = new HashMap<String,String>(2*_map106.size);
- for (int _i107 = 0; _i107 < _map106.size; ++_i107)
- {
- String _key108;
- String _val109;
- _key108 = iprot.readString();
- _val109 = iprot.readString();
- struct.success.put(_key108, _val109);
- }
- iprot.readMapEnd();
- }
- 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, getItemOwner_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (Map.Entry<String, String> _iter110 : struct.success.entrySet())
- {
- oprot.writeString(_iter110.getKey());
- oprot.writeString(_iter110.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getItemOwner_resultTupleSchemeFactory implements SchemeFactory {
- public getItemOwner_resultTupleScheme getScheme() {
- return new getItemOwner_resultTupleScheme();
- }
- }
-
- private static class getItemOwner_resultTupleScheme extends TupleScheme<getItemOwner_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getItemOwner_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Map.Entry<String, String> _iter111 : struct.success.entrySet())
- {
- oprot.writeString(_iter111.getKey());
- oprot.writeString(_iter111.getValue());
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getItemOwner_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TMap _map112 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new HashMap<String,String>(2*_map112.size);
- for (int _i113 = 0; _i113 < _map112.size; ++_i113)
- {
- String _key114;
- String _val115;
- _key114 = iprot.readString();
- _val115 = iprot.readString();
- struct.success.put(_key114, _val115);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class setPerson_args implements org.apache.thrift.TBase<setPerson_args, setPerson_args._Fields>, java.io.Serializable, Cloneable, Comparable<setPerson_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setPerson_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField INSTITUTION_FIELD_DESC = new org.apache.thrift.protocol.TField("institution", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setPerson_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setPerson_argsTupleSchemeFactory());
- }
-
- public String userID; // required
- public String token; // required
- public String institution; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- TOKEN((short)2, "token"),
- INSTITUTION((short)3, "institution");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // TOKEN
- return TOKEN;
- case 3: // INSTITUTION
- return INSTITUTION;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.INSTITUTION, new org.apache.thrift.meta_data.FieldMetaData("institution", 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(setPerson_args.class, metaDataMap);
- }
-
- public setPerson_args() {
- }
-
- public setPerson_args(
- String userID,
- String token,
- String institution)
- {
- this();
- this.userID = userID;
- this.token = token;
- this.institution = institution;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public setPerson_args(setPerson_args other) {
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetInstitution()) {
- this.institution = other.institution;
- }
- }
-
- public setPerson_args deepCopy() {
- return new setPerson_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.token = null;
- this.institution = null;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public setPerson_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public setPerson_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getInstitution() {
- return this.institution;
- }
-
- public setPerson_args setInstitution(String institution) {
- this.institution = institution;
- return this;
- }
-
- public void unsetInstitution() {
- this.institution = null;
- }
-
- /** Returns true if field institution is set (has been assigned a value) and false otherwise */
- public boolean isSetInstitution() {
- return this.institution != null;
- }
-
- public void setInstitutionIsSet(boolean value) {
- if (!value) {
- this.institution = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case INSTITUTION:
- if (value == null) {
- unsetInstitution();
- } else {
- setInstitution((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case TOKEN:
- return getToken();
-
- case INSTITUTION:
- return getInstitution();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case TOKEN:
- return isSetToken();
- case INSTITUTION:
- return isSetInstitution();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof setPerson_args)
- return this.equals((setPerson_args)that);
- return false;
- }
-
- public boolean equals(setPerson_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_institution = true && this.isSetInstitution();
- boolean that_present_institution = true && that.isSetInstitution();
- if (this_present_institution || that_present_institution) {
- if (!(this_present_institution && that_present_institution))
- return false;
- if (!this.institution.equals(that.institution))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(setPerson_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetInstitution()).compareTo(other.isSetInstitution());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetInstitution()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.institution, other.institution);
- 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("setPerson_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("institution:");
- if (this.institution == null) {
- sb.append("null");
- } else {
- sb.append(this.institution);
- }
- 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 setPerson_argsStandardSchemeFactory implements SchemeFactory {
- public setPerson_argsStandardScheme getScheme() {
- return new setPerson_argsStandardScheme();
- }
- }
-
- private static class setPerson_argsStandardScheme extends StandardScheme<setPerson_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, setPerson_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // INSTITUTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.institution = iprot.readString();
- struct.setInstitutionIsSet(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, setPerson_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.institution != null) {
- oprot.writeFieldBegin(INSTITUTION_FIELD_DESC);
- oprot.writeString(struct.institution);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class setPerson_argsTupleSchemeFactory implements SchemeFactory {
- public setPerson_argsTupleScheme getScheme() {
- return new setPerson_argsTupleScheme();
- }
- }
-
- private static class setPerson_argsTupleScheme extends TupleScheme<setPerson_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, setPerson_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- if (struct.isSetInstitution()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetInstitution()) {
- oprot.writeString(struct.institution);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, setPerson_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(2)) {
- struct.institution = iprot.readString();
- struct.setInstitutionIsSet(true);
- }
- }
- }
-
- }
-
- public static class setPerson_result implements org.apache.thrift.TBase<setPerson_result, setPerson_result._Fields>, java.io.Serializable, Cloneable, Comparable<setPerson_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setPerson_result");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setPerson_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setPerson_resultTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setPerson_result.class, metaDataMap);
- }
-
- public setPerson_result() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public setPerson_result(setPerson_result other) {
- }
-
- public setPerson_result deepCopy() {
- return new setPerson_result(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof setPerson_result)
- return this.equals((setPerson_result)that);
- return false;
- }
-
- public boolean equals(setPerson_result that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(setPerson_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setPerson_result(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class setPerson_resultStandardSchemeFactory implements SchemeFactory {
- public setPerson_resultStandardScheme getScheme() {
- return new setPerson_resultStandardScheme();
- }
- }
-
- private static class setPerson_resultStandardScheme extends StandardScheme<setPerson_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, setPerson_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, setPerson_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class setPerson_resultTupleSchemeFactory implements SchemeFactory {
- public setPerson_resultTupleScheme getScheme() {
- return new setPerson_resultTupleScheme();
- }
- }
-
- private static class setPerson_resultTupleScheme extends TupleScheme<setPerson_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, setPerson_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, setPerson_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
- }
-
- public static class writeLecturedata_args implements org.apache.thrift.TBase<writeLecturedata_args, writeLecturedata_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeLecturedata_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturedata_args");
-
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField SHORTDESC_FIELD_DESC = new org.apache.thrift.protocol.TField("shortdesc", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)6);
- private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)13);
- private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)14);
- private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureID", org.apache.thrift.protocol.TType.STRING, (short)16);
- private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)17);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeLecturedata_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeLecturedata_argsTupleSchemeFactory());
- }
-
- public String name; // required
- public String shortdesc; // required
- public String desc; // required
- public String startDate; // required
- public String endDate; // required
- public boolean isActive; // required
- public String imagename; // required
- public String token; // required
- public String Tel; // required
- public String Fak; // required
- public String lectureID; // required
- public String university; // 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 {
- NAME((short)1, "name"),
- SHORTDESC((short)2, "shortdesc"),
- DESC((short)3, "desc"),
- START_DATE((short)4, "startDate"),
- END_DATE((short)5, "endDate"),
- IS_ACTIVE((short)6, "isActive"),
- IMAGENAME((short)7, "imagename"),
- TOKEN((short)8, "token"),
- TEL((short)13, "Tel"),
- FAK((short)14, "Fak"),
- LECTURE_ID((short)16, "lectureID"),
- UNIVERSITY((short)17, "university");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NAME
- return NAME;
- case 2: // SHORTDESC
- return SHORTDESC;
- case 3: // DESC
- return DESC;
- case 4: // START_DATE
- return START_DATE;
- case 5: // END_DATE
- return END_DATE;
- case 6: // IS_ACTIVE
- return IS_ACTIVE;
- case 7: // IMAGENAME
- return IMAGENAME;
- case 8: // TOKEN
- return TOKEN;
- case 13: // TEL
- return TEL;
- case 14: // FAK
- return FAK;
- case 16: // LECTURE_ID
- return LECTURE_ID;
- case 17: // UNIVERSITY
- return UNIVERSITY;
- 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 __ISACTIVE_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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SHORTDESC, new org.apache.thrift.meta_data.FieldMetaData("shortdesc", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TEL, new org.apache.thrift.meta_data.FieldMetaData("Tel", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FAK, new org.apache.thrift.meta_data.FieldMetaData("Fak", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", 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(writeLecturedata_args.class, metaDataMap);
- }
-
- public writeLecturedata_args() {
- }
-
- public writeLecturedata_args(
- String name,
- String shortdesc,
- String desc,
- String startDate,
- String endDate,
- boolean isActive,
- String imagename,
- String token,
- String Tel,
- String Fak,
- String lectureID,
- String university)
- {
- this();
- this.name = name;
- this.shortdesc = shortdesc;
- this.desc = desc;
- this.startDate = startDate;
- this.endDate = endDate;
- this.isActive = isActive;
- setIsActiveIsSet(true);
- this.imagename = imagename;
- this.token = token;
- this.Tel = Tel;
- this.Fak = Fak;
- this.lectureID = lectureID;
- this.university = university;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeLecturedata_args(writeLecturedata_args other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetShortdesc()) {
- this.shortdesc = other.shortdesc;
- }
- if (other.isSetDesc()) {
- this.desc = other.desc;
- }
- if (other.isSetStartDate()) {
- this.startDate = other.startDate;
- }
- if (other.isSetEndDate()) {
- this.endDate = other.endDate;
- }
- this.isActive = other.isActive;
- if (other.isSetImagename()) {
- this.imagename = other.imagename;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetTel()) {
- this.Tel = other.Tel;
- }
- if (other.isSetFak()) {
- this.Fak = other.Fak;
- }
- if (other.isSetLectureID()) {
- this.lectureID = other.lectureID;
- }
- if (other.isSetUniversity()) {
- this.university = other.university;
- }
- }
-
- public writeLecturedata_args deepCopy() {
- return new writeLecturedata_args(this);
- }
-
- @Override
- public void clear() {
- this.name = null;
- this.shortdesc = null;
- this.desc = null;
- this.startDate = null;
- this.endDate = null;
- setIsActiveIsSet(false);
- this.isActive = false;
- this.imagename = null;
- this.token = null;
- this.Tel = null;
- this.Fak = null;
- this.lectureID = null;
- this.university = null;
- }
-
- public String getName() {
- return this.name;
- }
-
- public writeLecturedata_args setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getShortdesc() {
- return this.shortdesc;
- }
-
- public writeLecturedata_args setShortdesc(String shortdesc) {
- this.shortdesc = shortdesc;
- return this;
- }
-
- public void unsetShortdesc() {
- this.shortdesc = null;
- }
-
- /** Returns true if field shortdesc is set (has been assigned a value) and false otherwise */
- public boolean isSetShortdesc() {
- return this.shortdesc != null;
- }
-
- public void setShortdescIsSet(boolean value) {
- if (!value) {
- this.shortdesc = null;
- }
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public writeLecturedata_args setDesc(String desc) {
- this.desc = desc;
- return this;
- }
-
- public void unsetDesc() {
- this.desc = null;
- }
-
- /** Returns true if field desc is set (has been assigned a value) and false otherwise */
- public boolean isSetDesc() {
- return this.desc != null;
- }
-
- public void setDescIsSet(boolean value) {
- if (!value) {
- this.desc = null;
- }
- }
-
- public String getStartDate() {
- return this.startDate;
- }
-
- public writeLecturedata_args setStartDate(String startDate) {
- this.startDate = startDate;
- return this;
- }
-
- public void unsetStartDate() {
- this.startDate = null;
- }
-
- /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
- public boolean isSetStartDate() {
- return this.startDate != null;
- }
-
- public void setStartDateIsSet(boolean value) {
- if (!value) {
- this.startDate = null;
- }
- }
-
- public String getEndDate() {
- return this.endDate;
- }
-
- public writeLecturedata_args setEndDate(String endDate) {
- this.endDate = endDate;
- return this;
- }
-
- public void unsetEndDate() {
- this.endDate = null;
- }
-
- /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
- public boolean isSetEndDate() {
- return this.endDate != null;
- }
-
- public void setEndDateIsSet(boolean value) {
- if (!value) {
- this.endDate = null;
- }
- }
-
- public boolean isIsActive() {
- return this.isActive;
- }
-
- public writeLecturedata_args setIsActive(boolean isActive) {
- this.isActive = isActive;
- setIsActiveIsSet(true);
- return this;
- }
-
- public void unsetIsActive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACTIVE_ISSET_ID);
- }
-
- /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
- public boolean isSetIsActive() {
- return EncodingUtils.testBit(__isset_bitfield, __ISACTIVE_ISSET_ID);
- }
-
- public void setIsActiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACTIVE_ISSET_ID, value);
- }
-
- public String getImagename() {
- return this.imagename;
- }
-
- public writeLecturedata_args setImagename(String imagename) {
- this.imagename = imagename;
- return this;
- }
-
- public void unsetImagename() {
- this.imagename = null;
- }
-
- /** Returns true if field imagename is set (has been assigned a value) and false otherwise */
- public boolean isSetImagename() {
- return this.imagename != null;
- }
-
- public void setImagenameIsSet(boolean value) {
- if (!value) {
- this.imagename = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public writeLecturedata_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getTel() {
- return this.Tel;
- }
-
- public writeLecturedata_args setTel(String Tel) {
- this.Tel = Tel;
- return this;
- }
-
- public void unsetTel() {
- this.Tel = null;
- }
-
- /** Returns true if field Tel is set (has been assigned a value) and false otherwise */
- public boolean isSetTel() {
- return this.Tel != null;
- }
-
- public void setTelIsSet(boolean value) {
- if (!value) {
- this.Tel = null;
- }
- }
-
- public String getFak() {
- return this.Fak;
- }
-
- public writeLecturedata_args setFak(String Fak) {
- this.Fak = Fak;
- return this;
- }
-
- public void unsetFak() {
- this.Fak = null;
- }
-
- /** Returns true if field Fak is set (has been assigned a value) and false otherwise */
- public boolean isSetFak() {
- return this.Fak != null;
- }
-
- public void setFakIsSet(boolean value) {
- if (!value) {
- this.Fak = null;
- }
- }
-
- public String getLectureID() {
- return this.lectureID;
- }
-
- public writeLecturedata_args setLectureID(String lectureID) {
- this.lectureID = lectureID;
- return this;
- }
-
- public void unsetLectureID() {
- this.lectureID = null;
- }
-
- /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureID() {
- return this.lectureID != null;
- }
-
- public void setLectureIDIsSet(boolean value) {
- if (!value) {
- this.lectureID = null;
- }
- }
-
- public String getUniversity() {
- return this.university;
- }
-
- public writeLecturedata_args setUniversity(String university) {
- this.university = university;
- return this;
- }
-
- public void unsetUniversity() {
- this.university = null;
- }
-
- /** Returns true if field university is set (has been assigned a value) and false otherwise */
- public boolean isSetUniversity() {
- return this.university != null;
- }
-
- public void setUniversityIsSet(boolean value) {
- if (!value) {
- this.university = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case SHORTDESC:
- if (value == null) {
- unsetShortdesc();
- } else {
- setShortdesc((String)value);
- }
- break;
-
- case DESC:
- if (value == null) {
- unsetDesc();
- } else {
- setDesc((String)value);
- }
- break;
-
- case START_DATE:
- if (value == null) {
- unsetStartDate();
- } else {
- setStartDate((String)value);
- }
- break;
-
- case END_DATE:
- if (value == null) {
- unsetEndDate();
- } else {
- setEndDate((String)value);
- }
- break;
-
- case IS_ACTIVE:
- if (value == null) {
- unsetIsActive();
- } else {
- setIsActive((Boolean)value);
- }
- break;
-
- case IMAGENAME:
- if (value == null) {
- unsetImagename();
- } else {
- setImagename((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case TEL:
- if (value == null) {
- unsetTel();
- } else {
- setTel((String)value);
- }
- break;
-
- case FAK:
- if (value == null) {
- unsetFak();
- } else {
- setFak((String)value);
- }
- break;
-
- case LECTURE_ID:
- if (value == null) {
- unsetLectureID();
- } else {
- setLectureID((String)value);
- }
- break;
-
- case UNIVERSITY:
- if (value == null) {
- unsetUniversity();
- } else {
- setUniversity((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NAME:
- return getName();
-
- case SHORTDESC:
- return getShortdesc();
-
- case DESC:
- return getDesc();
-
- case START_DATE:
- return getStartDate();
-
- case END_DATE:
- return getEndDate();
-
- case IS_ACTIVE:
- return Boolean.valueOf(isIsActive());
-
- case IMAGENAME:
- return getImagename();
-
- case TOKEN:
- return getToken();
-
- case TEL:
- return getTel();
-
- case FAK:
- return getFak();
-
- case LECTURE_ID:
- return getLectureID();
-
- case UNIVERSITY:
- return getUniversity();
-
- }
- 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 NAME:
- return isSetName();
- case SHORTDESC:
- return isSetShortdesc();
- case DESC:
- return isSetDesc();
- case START_DATE:
- return isSetStartDate();
- case END_DATE:
- return isSetEndDate();
- case IS_ACTIVE:
- return isSetIsActive();
- case IMAGENAME:
- return isSetImagename();
- case TOKEN:
- return isSetToken();
- case TEL:
- return isSetTel();
- case FAK:
- return isSetFak();
- case LECTURE_ID:
- return isSetLectureID();
- case UNIVERSITY:
- return isSetUniversity();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof writeLecturedata_args)
- return this.equals((writeLecturedata_args)that);
- return false;
- }
-
- public boolean equals(writeLecturedata_args that) {
- if (that == null)
- return false;
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_shortdesc = true && this.isSetShortdesc();
- boolean that_present_shortdesc = true && that.isSetShortdesc();
- if (this_present_shortdesc || that_present_shortdesc) {
- if (!(this_present_shortdesc && that_present_shortdesc))
- return false;
- if (!this.shortdesc.equals(that.shortdesc))
- return false;
- }
-
- boolean this_present_desc = true && this.isSetDesc();
- boolean that_present_desc = true && that.isSetDesc();
- if (this_present_desc || that_present_desc) {
- if (!(this_present_desc && that_present_desc))
- return false;
- if (!this.desc.equals(that.desc))
- return false;
- }
-
- boolean this_present_startDate = true && this.isSetStartDate();
- boolean that_present_startDate = true && that.isSetStartDate();
- if (this_present_startDate || that_present_startDate) {
- if (!(this_present_startDate && that_present_startDate))
- return false;
- if (!this.startDate.equals(that.startDate))
- return false;
- }
-
- boolean this_present_endDate = true && this.isSetEndDate();
- boolean that_present_endDate = true && that.isSetEndDate();
- if (this_present_endDate || that_present_endDate) {
- if (!(this_present_endDate && that_present_endDate))
- return false;
- if (!this.endDate.equals(that.endDate))
- return false;
- }
-
- boolean this_present_isActive = true;
- boolean that_present_isActive = true;
- if (this_present_isActive || that_present_isActive) {
- if (!(this_present_isActive && that_present_isActive))
- return false;
- if (this.isActive != that.isActive)
- return false;
- }
-
- boolean this_present_imagename = true && this.isSetImagename();
- boolean that_present_imagename = true && that.isSetImagename();
- if (this_present_imagename || that_present_imagename) {
- if (!(this_present_imagename && that_present_imagename))
- return false;
- if (!this.imagename.equals(that.imagename))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_Tel = true && this.isSetTel();
- boolean that_present_Tel = true && that.isSetTel();
- if (this_present_Tel || that_present_Tel) {
- if (!(this_present_Tel && that_present_Tel))
- return false;
- if (!this.Tel.equals(that.Tel))
- return false;
- }
-
- boolean this_present_Fak = true && this.isSetFak();
- boolean that_present_Fak = true && that.isSetFak();
- if (this_present_Fak || that_present_Fak) {
- if (!(this_present_Fak && that_present_Fak))
- return false;
- if (!this.Fak.equals(that.Fak))
- return false;
- }
-
- boolean this_present_lectureID = true && this.isSetLectureID();
- boolean that_present_lectureID = true && that.isSetLectureID();
- if (this_present_lectureID || that_present_lectureID) {
- if (!(this_present_lectureID && that_present_lectureID))
- return false;
- if (!this.lectureID.equals(that.lectureID))
- return false;
- }
-
- boolean this_present_university = true && this.isSetUniversity();
- boolean that_present_university = true && that.isSetUniversity();
- if (this_present_university || that_present_university) {
- if (!(this_present_university && that_present_university))
- return false;
- if (!this.university.equals(that.university))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(writeLecturedata_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetShortdesc()).compareTo(other.isSetShortdesc());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetShortdesc()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortdesc, other.shortdesc);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDesc()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStartDate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(other.isSetEndDate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetEndDate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, other.endDate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(other.isSetIsActive());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsActive()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, other.isActive);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImagename()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetTel()).compareTo(other.isSetTel());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTel()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Tel, other.Tel);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFak()).compareTo(other.isSetFak());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFak()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Fak, other.Fak);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUniversity()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
- 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("writeLecturedata_args(");
- boolean first = true;
-
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("shortdesc:");
- if (this.shortdesc == null) {
- sb.append("null");
- } else {
- sb.append(this.shortdesc);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("desc:");
- if (this.desc == null) {
- sb.append("null");
- } else {
- sb.append(this.desc);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("startDate:");
- if (this.startDate == null) {
- sb.append("null");
- } else {
- sb.append(this.startDate);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("endDate:");
- if (this.endDate == null) {
- sb.append("null");
- } else {
- sb.append(this.endDate);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isActive:");
- sb.append(this.isActive);
- first = false;
- if (!first) sb.append(", ");
- sb.append("imagename:");
- if (this.imagename == null) {
- sb.append("null");
- } else {
- sb.append(this.imagename);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Tel:");
- if (this.Tel == null) {
- sb.append("null");
- } else {
- sb.append(this.Tel);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Fak:");
- if (this.Fak == null) {
- sb.append("null");
- } else {
- sb.append(this.Fak);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("lectureID:");
- if (this.lectureID == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("university:");
- if (this.university == null) {
- sb.append("null");
- } else {
- sb.append(this.university);
- }
- 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 writeLecturedata_argsStandardSchemeFactory implements SchemeFactory {
- public writeLecturedata_argsStandardScheme getScheme() {
- return new writeLecturedata_argsStandardScheme();
- }
- }
-
- private static class writeLecturedata_argsStandardScheme extends StandardScheme<writeLecturedata_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturedata_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: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // SHORTDESC
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.shortdesc = iprot.readString();
- struct.setShortdescIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // DESC
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // START_DATE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.startDate = iprot.readString();
- struct.setStartDateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // END_DATE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.endDate = iprot.readString();
- struct.setEndDateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // IS_ACTIVE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isActive = iprot.readBool();
- struct.setIsActiveIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // IMAGENAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 13: // TEL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Tel = iprot.readString();
- struct.setTelIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 14: // FAK
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Fak = iprot.readString();
- struct.setFakIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 16: // LECTURE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 17: // UNIVERSITY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(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, writeLecturedata_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- if (struct.shortdesc != null) {
- oprot.writeFieldBegin(SHORTDESC_FIELD_DESC);
- oprot.writeString(struct.shortdesc);
- oprot.writeFieldEnd();
- }
- if (struct.desc != null) {
- oprot.writeFieldBegin(DESC_FIELD_DESC);
- oprot.writeString(struct.desc);
- oprot.writeFieldEnd();
- }
- if (struct.startDate != null) {
- oprot.writeFieldBegin(START_DATE_FIELD_DESC);
- oprot.writeString(struct.startDate);
- oprot.writeFieldEnd();
- }
- if (struct.endDate != null) {
- oprot.writeFieldBegin(END_DATE_FIELD_DESC);
- oprot.writeString(struct.endDate);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
- oprot.writeBool(struct.isActive);
- oprot.writeFieldEnd();
- if (struct.imagename != null) {
- oprot.writeFieldBegin(IMAGENAME_FIELD_DESC);
- oprot.writeString(struct.imagename);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.Tel != null) {
- oprot.writeFieldBegin(TEL_FIELD_DESC);
- oprot.writeString(struct.Tel);
- oprot.writeFieldEnd();
- }
- if (struct.Fak != null) {
- oprot.writeFieldBegin(FAK_FIELD_DESC);
- oprot.writeString(struct.Fak);
- oprot.writeFieldEnd();
- }
- if (struct.lectureID != null) {
- oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
- oprot.writeString(struct.lectureID);
- oprot.writeFieldEnd();
- }
- if (struct.university != null) {
- oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
- oprot.writeString(struct.university);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class writeLecturedata_argsTupleSchemeFactory implements SchemeFactory {
- public writeLecturedata_argsTupleScheme getScheme() {
- return new writeLecturedata_argsTupleScheme();
- }
- }
-
- private static class writeLecturedata_argsTupleScheme extends TupleScheme<writeLecturedata_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturedata_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetName()) {
- optionals.set(0);
- }
- if (struct.isSetShortdesc()) {
- optionals.set(1);
- }
- if (struct.isSetDesc()) {
- optionals.set(2);
- }
- if (struct.isSetStartDate()) {
- optionals.set(3);
- }
- if (struct.isSetEndDate()) {
- optionals.set(4);
- }
- if (struct.isSetIsActive()) {
- optionals.set(5);
- }
- if (struct.isSetImagename()) {
- optionals.set(6);
- }
- if (struct.isSetToken()) {
- optionals.set(7);
- }
- if (struct.isSetTel()) {
- optionals.set(8);
- }
- if (struct.isSetFak()) {
- optionals.set(9);
- }
- if (struct.isSetLectureID()) {
- optionals.set(10);
- }
- if (struct.isSetUniversity()) {
- optionals.set(11);
- }
- oprot.writeBitSet(optionals, 12);
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetShortdesc()) {
- oprot.writeString(struct.shortdesc);
- }
- if (struct.isSetDesc()) {
- oprot.writeString(struct.desc);
- }
- if (struct.isSetStartDate()) {
- oprot.writeString(struct.startDate);
- }
- if (struct.isSetEndDate()) {
- oprot.writeString(struct.endDate);
- }
- if (struct.isSetIsActive()) {
- oprot.writeBool(struct.isActive);
- }
- if (struct.isSetImagename()) {
- oprot.writeString(struct.imagename);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetTel()) {
- oprot.writeString(struct.Tel);
- }
- if (struct.isSetFak()) {
- oprot.writeString(struct.Fak);
- }
- if (struct.isSetLectureID()) {
- oprot.writeString(struct.lectureID);
- }
- if (struct.isSetUniversity()) {
- oprot.writeString(struct.university);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturedata_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(12);
- if (incoming.get(0)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.shortdesc = iprot.readString();
- struct.setShortdescIsSet(true);
- }
- if (incoming.get(2)) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- }
- if (incoming.get(3)) {
- struct.startDate = iprot.readString();
- struct.setStartDateIsSet(true);
- }
- if (incoming.get(4)) {
- struct.endDate = iprot.readString();
- struct.setEndDateIsSet(true);
- }
- if (incoming.get(5)) {
- struct.isActive = iprot.readBool();
- struct.setIsActiveIsSet(true);
- }
- if (incoming.get(6)) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- }
- if (incoming.get(7)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(8)) {
- struct.Tel = iprot.readString();
- struct.setTelIsSet(true);
- }
- if (incoming.get(9)) {
- struct.Fak = iprot.readString();
- struct.setFakIsSet(true);
- }
- if (incoming.get(10)) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- }
- if (incoming.get(11)) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeLecturedata_result implements org.apache.thrift.TBase<writeLecturedata_result, writeLecturedata_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeLecturedata_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturedata_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeLecturedata_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeLecturedata_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturedata_result.class, metaDataMap);
- }
-
- public writeLecturedata_result() {
- }
-
- public writeLecturedata_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeLecturedata_result(writeLecturedata_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public writeLecturedata_result deepCopy() {
- return new writeLecturedata_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public writeLecturedata_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 writeLecturedata_result)
- return this.equals((writeLecturedata_result)that);
- return false;
- }
-
- public boolean equals(writeLecturedata_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(writeLecturedata_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("writeLecturedata_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 writeLecturedata_resultStandardSchemeFactory implements SchemeFactory {
- public writeLecturedata_resultStandardScheme getScheme() {
- return new writeLecturedata_resultStandardScheme();
- }
- }
-
- private static class writeLecturedata_resultStandardScheme extends StandardScheme<writeLecturedata_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturedata_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, writeLecturedata_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 writeLecturedata_resultTupleSchemeFactory implements SchemeFactory {
- public writeLecturedata_resultTupleScheme getScheme() {
- return new writeLecturedata_resultTupleScheme();
- }
- }
-
- private static class writeLecturedata_resultTupleScheme extends TupleScheme<writeLecturedata_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturedata_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, writeLecturedata_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class startFileCopy_args implements org.apache.thrift.TBase<startFileCopy_args, startFileCopy_args._Fields>, java.io.Serializable, Cloneable, Comparable<startFileCopy_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startFileCopy_args");
-
- private static final org.apache.thrift.protocol.TField FILE_FIELD_DESC = new org.apache.thrift.protocol.TField("file", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new startFileCopy_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new startFileCopy_argsTupleSchemeFactory());
- }
-
- public String file; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- FILE((short)1, "file"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // FILE
- return FILE;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.FILE, new org.apache.thrift.meta_data.FieldMetaData("file", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startFileCopy_args.class, metaDataMap);
- }
-
- public startFileCopy_args() {
- }
-
- public startFileCopy_args(
- String file,
- String token)
- {
- this();
- this.file = file;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public startFileCopy_args(startFileCopy_args other) {
- if (other.isSetFile()) {
- this.file = other.file;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public startFileCopy_args deepCopy() {
- return new startFileCopy_args(this);
- }
-
- @Override
- public void clear() {
- this.file = null;
- this.token = null;
- }
-
- public String getFile() {
- return this.file;
- }
-
- public startFileCopy_args setFile(String file) {
- this.file = file;
- return this;
- }
-
- public void unsetFile() {
- this.file = null;
- }
-
- /** Returns true if field file is set (has been assigned a value) and false otherwise */
- public boolean isSetFile() {
- return this.file != null;
- }
-
- public void setFileIsSet(boolean value) {
- if (!value) {
- this.file = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public startFileCopy_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case FILE:
- if (value == null) {
- unsetFile();
- } else {
- setFile((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case FILE:
- return getFile();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case FILE:
- return isSetFile();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof startFileCopy_args)
- return this.equals((startFileCopy_args)that);
- return false;
- }
-
- public boolean equals(startFileCopy_args that) {
- if (that == null)
- return false;
-
- boolean this_present_file = true && this.isSetFile();
- boolean that_present_file = true && that.isSetFile();
- if (this_present_file || that_present_file) {
- if (!(this_present_file && that_present_file))
- return false;
- if (!this.file.equals(that.file))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(startFileCopy_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetFile()).compareTo(other.isSetFile());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFile()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file, other.file);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("startFileCopy_args(");
- boolean first = true;
-
- sb.append("file:");
- if (this.file == null) {
- sb.append("null");
- } else {
- sb.append(this.file);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class startFileCopy_argsStandardSchemeFactory implements SchemeFactory {
- public startFileCopy_argsStandardScheme getScheme() {
- return new startFileCopy_argsStandardScheme();
- }
- }
-
- private static class startFileCopy_argsStandardScheme extends StandardScheme<startFileCopy_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, startFileCopy_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: // FILE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.file = iprot.readString();
- struct.setFileIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, startFileCopy_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.file != null) {
- oprot.writeFieldBegin(FILE_FIELD_DESC);
- oprot.writeString(struct.file);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class startFileCopy_argsTupleSchemeFactory implements SchemeFactory {
- public startFileCopy_argsTupleScheme getScheme() {
- return new startFileCopy_argsTupleScheme();
- }
- }
-
- private static class startFileCopy_argsTupleScheme extends TupleScheme<startFileCopy_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, startFileCopy_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetFile()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetFile()) {
- oprot.writeString(struct.file);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, startFileCopy_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.file = iprot.readString();
- struct.setFileIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class startFileCopy_result implements org.apache.thrift.TBase<startFileCopy_result, startFileCopy_result._Fields>, java.io.Serializable, Cloneable, Comparable<startFileCopy_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startFileCopy_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new startFileCopy_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new startFileCopy_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startFileCopy_result.class, metaDataMap);
- }
-
- public startFileCopy_result() {
- }
-
- public startFileCopy_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public startFileCopy_result(startFileCopy_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public startFileCopy_result deepCopy() {
- return new startFileCopy_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public startFileCopy_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 startFileCopy_result)
- return this.equals((startFileCopy_result)that);
- return false;
- }
-
- public boolean equals(startFileCopy_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(startFileCopy_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("startFileCopy_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 startFileCopy_resultStandardSchemeFactory implements SchemeFactory {
- public startFileCopy_resultStandardScheme getScheme() {
- return new startFileCopy_resultStandardScheme();
- }
- }
-
- private static class startFileCopy_resultStandardScheme extends StandardScheme<startFileCopy_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, startFileCopy_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, startFileCopy_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 startFileCopy_resultTupleSchemeFactory implements SchemeFactory {
- public startFileCopy_resultTupleScheme getScheme() {
- return new startFileCopy_resultTupleScheme();
- }
- }
-
- private static class startFileCopy_resultTupleScheme extends TupleScheme<startFileCopy_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, startFileCopy_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, startFileCopy_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageData_args implements org.apache.thrift.TBase<getImageData_args, getImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_args");
-
- private static final org.apache.thrift.protocol.TField IMAGEID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageid", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField IMAGEVERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("imageversion", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageData_argsTupleSchemeFactory());
- }
-
- public String imageid; // required
- public String imageversion; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGEID((short)1, "imageid"),
- IMAGEVERSION((short)2, "imageversion"),
- TOKEN((short)3, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGEID
- return IMAGEID;
- case 2: // IMAGEVERSION
- return IMAGEVERSION;
- case 3: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.IMAGEID, new org.apache.thrift.meta_data.FieldMetaData("imageid", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGEVERSION, new org.apache.thrift.meta_data.FieldMetaData("imageversion", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageData_args.class, metaDataMap);
- }
-
- public getImageData_args() {
- }
-
- public getImageData_args(
- String imageid,
- String imageversion,
- String token)
- {
- this();
- this.imageid = imageid;
- this.imageversion = imageversion;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageData_args(getImageData_args other) {
- if (other.isSetImageid()) {
- this.imageid = other.imageid;
- }
- if (other.isSetImageversion()) {
- this.imageversion = other.imageversion;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getImageData_args deepCopy() {
- return new getImageData_args(this);
- }
-
- @Override
- public void clear() {
- this.imageid = null;
- this.imageversion = null;
- this.token = null;
- }
-
- public String getImageid() {
- return this.imageid;
- }
-
- public getImageData_args setImageid(String imageid) {
- this.imageid = imageid;
- return this;
- }
-
- public void unsetImageid() {
- this.imageid = null;
- }
-
- /** Returns true if field imageid is set (has been assigned a value) and false otherwise */
- public boolean isSetImageid() {
- return this.imageid != null;
- }
-
- public void setImageidIsSet(boolean value) {
- if (!value) {
- this.imageid = null;
- }
- }
-
- public String getImageversion() {
- return this.imageversion;
- }
-
- public getImageData_args setImageversion(String imageversion) {
- this.imageversion = imageversion;
- return this;
- }
-
- public void unsetImageversion() {
- this.imageversion = null;
- }
-
- /** Returns true if field imageversion is set (has been assigned a value) and false otherwise */
- public boolean isSetImageversion() {
- return this.imageversion != null;
- }
-
- public void setImageversionIsSet(boolean value) {
- if (!value) {
- this.imageversion = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getImageData_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGEID:
- if (value == null) {
- unsetImageid();
- } else {
- setImageid((String)value);
- }
- break;
-
- case IMAGEVERSION:
- if (value == null) {
- unsetImageversion();
- } else {
- setImageversion((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGEID:
- return getImageid();
-
- case IMAGEVERSION:
- return getImageversion();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGEID:
- return isSetImageid();
- case IMAGEVERSION:
- return isSetImageversion();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageData_args)
- return this.equals((getImageData_args)that);
- return false;
- }
-
- public boolean equals(getImageData_args that) {
- if (that == null)
- return false;
-
- boolean this_present_imageid = true && this.isSetImageid();
- boolean that_present_imageid = true && that.isSetImageid();
- if (this_present_imageid || that_present_imageid) {
- if (!(this_present_imageid && that_present_imageid))
- return false;
- if (!this.imageid.equals(that.imageid))
- return false;
- }
-
- boolean this_present_imageversion = true && this.isSetImageversion();
- boolean that_present_imageversion = true && that.isSetImageversion();
- if (this_present_imageversion || that_present_imageversion) {
- if (!(this_present_imageversion && that_present_imageversion))
- return false;
- if (!this.imageversion.equals(that.imageversion))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageData_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImageid()).compareTo(other.isSetImageid());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageid()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageid, other.imageid);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImageversion()).compareTo(other.isSetImageversion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageversion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageversion, other.imageversion);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageData_args(");
- boolean first = true;
-
- sb.append("imageid:");
- if (this.imageid == null) {
- sb.append("null");
- } else {
- sb.append(this.imageid);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("imageversion:");
- if (this.imageversion == null) {
- sb.append("null");
- } else {
- sb.append(this.imageversion);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageData_argsStandardSchemeFactory implements SchemeFactory {
- public getImageData_argsStandardScheme getScheme() {
- return new getImageData_argsStandardScheme();
- }
- }
-
- private static class getImageData_argsStandardScheme extends StandardScheme<getImageData_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // IMAGEID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageid = iprot.readString();
- struct.setImageidIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // IMAGEVERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageversion = iprot.readString();
- struct.setImageversionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getImageData_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.imageid != null) {
- oprot.writeFieldBegin(IMAGEID_FIELD_DESC);
- oprot.writeString(struct.imageid);
- oprot.writeFieldEnd();
- }
- if (struct.imageversion != null) {
- oprot.writeFieldBegin(IMAGEVERSION_FIELD_DESC);
- oprot.writeString(struct.imageversion);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageData_argsTupleSchemeFactory implements SchemeFactory {
- public getImageData_argsTupleScheme getScheme() {
- return new getImageData_argsTupleScheme();
- }
- }
-
- private static class getImageData_argsTupleScheme extends TupleScheme<getImageData_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImageid()) {
- optionals.set(0);
- }
- if (struct.isSetImageversion()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetImageid()) {
- oprot.writeString(struct.imageid);
- }
- if (struct.isSetImageversion()) {
- oprot.writeString(struct.imageversion);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.imageid = iprot.readString();
- struct.setImageidIsSet(true);
- }
- if (incoming.get(1)) {
- struct.imageversion = iprot.readString();
- struct.setImageversionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getImageData_result implements org.apache.thrift.TBase<getImageData_result, getImageData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageData_resultTupleSchemeFactory());
- }
-
- public Map<String,String> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageData_result.class, metaDataMap);
- }
-
- public getImageData_result() {
- }
-
- public getImageData_result(
- Map<String,String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getImageData_result(getImageData_result other) {
- if (other.isSetSuccess()) {
- Map<String,String> __this__success = new HashMap<String,String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getImageData_result deepCopy() {
- return new getImageData_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public void putToSuccess(String key, String val) {
- if (this.success == null) {
- this.success = new HashMap<String,String>();
- }
- this.success.put(key, val);
- }
-
- public Map<String,String> getSuccess() {
- return this.success;
- }
-
- public getImageData_result setSuccess(Map<String,String> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Map<String,String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getImageData_result)
- return this.equals((getImageData_result)that);
- return false;
- }
-
- public boolean equals(getImageData_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getImageData_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageData_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getImageData_resultStandardSchemeFactory implements SchemeFactory {
- public getImageData_resultStandardScheme getScheme() {
- return new getImageData_resultStandardScheme();
- }
- }
-
- private static class getImageData_resultStandardScheme extends StandardScheme<getImageData_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map116 = iprot.readMapBegin();
- struct.success = new HashMap<String,String>(2*_map116.size);
- for (int _i117 = 0; _i117 < _map116.size; ++_i117)
- {
- String _key118;
- String _val119;
- _key118 = iprot.readString();
- _val119 = iprot.readString();
- struct.success.put(_key118, _val119);
- }
- iprot.readMapEnd();
- }
- 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, getImageData_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (Map.Entry<String, String> _iter120 : struct.success.entrySet())
- {
- oprot.writeString(_iter120.getKey());
- oprot.writeString(_iter120.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getImageData_resultTupleSchemeFactory implements SchemeFactory {
- public getImageData_resultTupleScheme getScheme() {
- return new getImageData_resultTupleScheme();
- }
- }
-
- private static class getImageData_resultTupleScheme extends TupleScheme<getImageData_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Map.Entry<String, String> _iter121 : struct.success.entrySet())
- {
- oprot.writeString(_iter121.getKey());
- oprot.writeString(_iter121.getValue());
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TMap _map122 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new HashMap<String,String>(2*_map122.size);
- for (int _i123 = 0; _i123 < _map122.size; ++_i123)
- {
- String _key124;
- String _val125;
- _key124 = iprot.readString();
- _val125 = iprot.readString();
- struct.success.put(_key124, _val125);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureData_args implements org.apache.thrift.TBase<getLectureData_args, getLectureData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_args");
-
- private static final org.apache.thrift.protocol.TField LECTUREID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureid", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureData_argsTupleSchemeFactory());
- }
-
- public String lectureid; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- LECTUREID((short)1, "lectureid"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // LECTUREID
- return LECTUREID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.LECTUREID, new org.apache.thrift.meta_data.FieldMetaData("lectureid", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_args.class, metaDataMap);
- }
-
- public getLectureData_args() {
- }
-
- public getLectureData_args(
- String lectureid,
- String token)
- {
- this();
- this.lectureid = lectureid;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureData_args(getLectureData_args other) {
- if (other.isSetLectureid()) {
- this.lectureid = other.lectureid;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getLectureData_args deepCopy() {
- return new getLectureData_args(this);
- }
-
- @Override
- public void clear() {
- this.lectureid = null;
- this.token = null;
- }
-
- public String getLectureid() {
- return this.lectureid;
- }
-
- public getLectureData_args setLectureid(String lectureid) {
- this.lectureid = lectureid;
- return this;
- }
-
- public void unsetLectureid() {
- this.lectureid = null;
- }
-
- /** Returns true if field lectureid is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureid() {
- return this.lectureid != null;
- }
-
- public void setLectureidIsSet(boolean value) {
- if (!value) {
- this.lectureid = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getLectureData_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LECTUREID:
- if (value == null) {
- unsetLectureid();
- } else {
- setLectureid((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LECTUREID:
- return getLectureid();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case LECTUREID:
- return isSetLectureid();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureData_args)
- return this.equals((getLectureData_args)that);
- return false;
- }
-
- public boolean equals(getLectureData_args that) {
- if (that == null)
- return false;
-
- boolean this_present_lectureid = true && this.isSetLectureid();
- boolean that_present_lectureid = true && that.isSetLectureid();
- if (this_present_lectureid || that_present_lectureid) {
- if (!(this_present_lectureid && that_present_lectureid))
- return false;
- if (!this.lectureid.equals(that.lectureid))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureData_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetLectureid()).compareTo(other.isSetLectureid());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureid()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureid, other.lectureid);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureData_args(");
- boolean first = true;
-
- sb.append("lectureid:");
- if (this.lectureid == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureid);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureData_argsStandardSchemeFactory implements SchemeFactory {
- public getLectureData_argsStandardScheme getScheme() {
- return new getLectureData_argsStandardScheme();
- }
- }
-
- private static class getLectureData_argsStandardScheme extends StandardScheme<getLectureData_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_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: // LECTUREID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureid = iprot.readString();
- struct.setLectureidIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureData_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.lectureid != null) {
- oprot.writeFieldBegin(LECTUREID_FIELD_DESC);
- oprot.writeString(struct.lectureid);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureData_argsTupleSchemeFactory implements SchemeFactory {
- public getLectureData_argsTupleScheme getScheme() {
- return new getLectureData_argsTupleScheme();
- }
- }
-
- private static class getLectureData_argsTupleScheme extends TupleScheme<getLectureData_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetLectureid()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetLectureid()) {
- oprot.writeString(struct.lectureid);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.lectureid = iprot.readString();
- struct.setLectureidIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getLectureData_result implements org.apache.thrift.TBase<getLectureData_result, getLectureData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureData_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureData_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureData_resultTupleSchemeFactory());
- }
-
- public Map<String,String> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureData_result.class, metaDataMap);
- }
-
- public getLectureData_result() {
- }
-
- public getLectureData_result(
- Map<String,String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getLectureData_result(getLectureData_result other) {
- if (other.isSetSuccess()) {
- Map<String,String> __this__success = new HashMap<String,String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getLectureData_result deepCopy() {
- return new getLectureData_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public void putToSuccess(String key, String val) {
- if (this.success == null) {
- this.success = new HashMap<String,String>();
- }
- this.success.put(key, val);
- }
-
- public Map<String,String> getSuccess() {
- return this.success;
- }
-
- public getLectureData_result setSuccess(Map<String,String> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Map<String,String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getLectureData_result)
- return this.equals((getLectureData_result)that);
- return false;
- }
-
- public boolean equals(getLectureData_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getLectureData_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("getLectureData_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getLectureData_resultStandardSchemeFactory implements SchemeFactory {
- public getLectureData_resultStandardScheme getScheme() {
- return new getLectureData_resultStandardScheme();
- }
- }
-
- private static class getLectureData_resultStandardScheme extends StandardScheme<getLectureData_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureData_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map126 = iprot.readMapBegin();
- struct.success = new HashMap<String,String>(2*_map126.size);
- for (int _i127 = 0; _i127 < _map126.size; ++_i127)
- {
- String _key128;
- String _val129;
- _key128 = iprot.readString();
- _val129 = iprot.readString();
- struct.success.put(_key128, _val129);
- }
- iprot.readMapEnd();
- }
- 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, getLectureData_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (Map.Entry<String, String> _iter130 : struct.success.entrySet())
- {
- oprot.writeString(_iter130.getKey());
- oprot.writeString(_iter130.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getLectureData_resultTupleSchemeFactory implements SchemeFactory {
- public getLectureData_resultTupleScheme getScheme() {
- return new getLectureData_resultTupleScheme();
- }
- }
-
- private static class getLectureData_resultTupleScheme extends TupleScheme<getLectureData_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Map.Entry<String, String> _iter131 : struct.success.entrySet())
- {
- oprot.writeString(_iter131.getKey());
- oprot.writeString(_iter131.getValue());
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getLectureData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TMap _map132 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new HashMap<String,String>(2*_map132.size);
- for (int _i133 = 0; _i133 < _map132.size; ++_i133)
- {
- String _key134;
- String _val135;
- _key134 = iprot.readString();
- _val135 = iprot.readString();
- struct.success.put(_key134, _val135);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class updateImageData_args implements org.apache.thrift.TBase<updateImageData_args, updateImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageData_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_args");
-
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_path", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField LICENSE_FIELD_DESC = new org.apache.thrift.protocol.TField("license", org.apache.thrift.protocol.TType.BOOL, (short)5);
- private static final org.apache.thrift.protocol.TField INTERNET_FIELD_DESC = new org.apache.thrift.protocol.TField("internet", org.apache.thrift.protocol.TType.BOOL, (short)6);
- private static final org.apache.thrift.protocol.TField RAM_FIELD_DESC = new org.apache.thrift.protocol.TField("ram", org.apache.thrift.protocol.TType.I64, (short)7);
- private static final org.apache.thrift.protocol.TField CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("cpu", org.apache.thrift.protocol.TType.I64, (short)8);
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)9);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)10);
- private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)11);
- private static final org.apache.thrift.protocol.TField FILESIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("filesize", org.apache.thrift.protocol.TType.I64, (short)12);
- private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I64, (short)13);
- private static final org.apache.thrift.protocol.TField OS_FIELD_DESC = new org.apache.thrift.protocol.TField("os", org.apache.thrift.protocol.TType.STRING, (short)14);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)15);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateImageData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateImageData_argsTupleSchemeFactory());
- }
-
- public String name; // required
- public String newName; // required
- public String desc; // required
- public String image_path; // required
- public boolean license; // required
- public boolean internet; // required
- public long ram; // required
- public long cpu; // required
- public String id; // required
- public String version; // required
- public boolean isTemplate; // required
- public long filesize; // required
- public long shareMode; // required
- public String os; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- NAME((short)1, "name"),
- NEW_NAME((short)2, "newName"),
- DESC((short)3, "desc"),
- IMAGE_PATH((short)4, "image_path"),
- LICENSE((short)5, "license"),
- INTERNET((short)6, "internet"),
- RAM((short)7, "ram"),
- CPU((short)8, "cpu"),
- ID((short)9, "id"),
- VERSION((short)10, "version"),
- IS_TEMPLATE((short)11, "isTemplate"),
- FILESIZE((short)12, "filesize"),
- SHARE_MODE((short)13, "shareMode"),
- OS((short)14, "os"),
- TOKEN((short)15, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NAME
- return NAME;
- case 2: // NEW_NAME
- return NEW_NAME;
- case 3: // DESC
- return DESC;
- case 4: // IMAGE_PATH
- return IMAGE_PATH;
- case 5: // LICENSE
- return LICENSE;
- case 6: // INTERNET
- return INTERNET;
- case 7: // RAM
- return RAM;
- case 8: // CPU
- return CPU;
- case 9: // ID
- return ID;
- case 10: // VERSION
- return VERSION;
- case 11: // IS_TEMPLATE
- return IS_TEMPLATE;
- case 12: // FILESIZE
- return FILESIZE;
- case 13: // SHARE_MODE
- return SHARE_MODE;
- case 14: // OS
- return OS;
- case 15: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __LICENSE_ISSET_ID = 0;
- private static final int __INTERNET_ISSET_ID = 1;
- private static final int __RAM_ISSET_ID = 2;
- private static final int __CPU_ISSET_ID = 3;
- private static final int __ISTEMPLATE_ISSET_ID = 4;
- private static final int __FILESIZE_ISSET_ID = 5;
- private static final int __SHAREMODE_ISSET_ID = 6;
- 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("image_path", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LICENSE, new org.apache.thrift.meta_data.FieldMetaData("license", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.INTERNET, new org.apache.thrift.meta_data.FieldMetaData("internet", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.RAM, new org.apache.thrift.meta_data.FieldMetaData("ram", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- tmpMap.put(_Fields.CPU, new org.apache.thrift.meta_data.FieldMetaData("cpu", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.FILESIZE, new org.apache.thrift.meta_data.FieldMetaData("filesize", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- tmpMap.put(_Fields.OS, new org.apache.thrift.meta_data.FieldMetaData("os", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_args.class, metaDataMap);
- }
-
- public updateImageData_args() {
- }
-
- public updateImageData_args(
- String name,
- String newName,
- String desc,
- String image_path,
- boolean license,
- boolean internet,
- long ram,
- long cpu,
- String id,
- String version,
- boolean isTemplate,
- long filesize,
- long shareMode,
- String os,
- String token)
- {
- this();
- this.name = name;
- this.newName = newName;
- this.desc = desc;
- this.image_path = image_path;
- this.license = license;
- setLicenseIsSet(true);
- this.internet = internet;
- setInternetIsSet(true);
- this.ram = ram;
- setRamIsSet(true);
- this.cpu = cpu;
- setCpuIsSet(true);
- this.id = id;
- this.version = version;
- this.isTemplate = isTemplate;
- setIsTemplateIsSet(true);
- this.filesize = filesize;
- setFilesizeIsSet(true);
- this.shareMode = shareMode;
- setShareModeIsSet(true);
- this.os = os;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public updateImageData_args(updateImageData_args other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetNewName()) {
- this.newName = other.newName;
- }
- if (other.isSetDesc()) {
- this.desc = other.desc;
- }
- if (other.isSetImage_path()) {
- this.image_path = other.image_path;
- }
- this.license = other.license;
- this.internet = other.internet;
- this.ram = other.ram;
- this.cpu = other.cpu;
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetVersion()) {
- this.version = other.version;
- }
- this.isTemplate = other.isTemplate;
- this.filesize = other.filesize;
- this.shareMode = other.shareMode;
- if (other.isSetOs()) {
- this.os = other.os;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public updateImageData_args deepCopy() {
- return new updateImageData_args(this);
- }
-
- @Override
- public void clear() {
- this.name = null;
- this.newName = null;
- this.desc = null;
- this.image_path = null;
- setLicenseIsSet(false);
- this.license = false;
- setInternetIsSet(false);
- this.internet = false;
- setRamIsSet(false);
- this.ram = 0;
- setCpuIsSet(false);
- this.cpu = 0;
- this.id = null;
- this.version = null;
- setIsTemplateIsSet(false);
- this.isTemplate = false;
- setFilesizeIsSet(false);
- this.filesize = 0;
- setShareModeIsSet(false);
- this.shareMode = 0;
- this.os = null;
- this.token = null;
- }
-
- public String getName() {
- return this.name;
- }
-
- public updateImageData_args setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getNewName() {
- return this.newName;
- }
-
- public updateImageData_args setNewName(String newName) {
- this.newName = newName;
- return this;
- }
-
- public void unsetNewName() {
- this.newName = null;
- }
-
- /** Returns true if field newName is set (has been assigned a value) and false otherwise */
- public boolean isSetNewName() {
- return this.newName != null;
- }
-
- public void setNewNameIsSet(boolean value) {
- if (!value) {
- this.newName = null;
- }
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public updateImageData_args setDesc(String desc) {
- this.desc = desc;
- return this;
- }
-
- public void unsetDesc() {
- this.desc = null;
- }
-
- /** Returns true if field desc is set (has been assigned a value) and false otherwise */
- public boolean isSetDesc() {
- return this.desc != null;
- }
-
- public void setDescIsSet(boolean value) {
- if (!value) {
- this.desc = null;
- }
- }
-
- public String getImage_path() {
- return this.image_path;
- }
-
- public updateImageData_args setImage_path(String image_path) {
- this.image_path = image_path;
- return this;
- }
-
- public void unsetImage_path() {
- this.image_path = null;
- }
-
- /** Returns true if field image_path is set (has been assigned a value) and false otherwise */
- public boolean isSetImage_path() {
- return this.image_path != null;
- }
-
- public void setImage_pathIsSet(boolean value) {
- if (!value) {
- this.image_path = null;
- }
- }
-
- public boolean isLicense() {
- return this.license;
- }
-
- public updateImageData_args setLicense(boolean license) {
- this.license = license;
- setLicenseIsSet(true);
- return this;
- }
-
- public void unsetLicense() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LICENSE_ISSET_ID);
- }
-
- /** Returns true if field license is set (has been assigned a value) and false otherwise */
- public boolean isSetLicense() {
- return EncodingUtils.testBit(__isset_bitfield, __LICENSE_ISSET_ID);
- }
-
- public void setLicenseIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LICENSE_ISSET_ID, value);
- }
-
- public boolean isInternet() {
- return this.internet;
- }
-
- public updateImageData_args setInternet(boolean internet) {
- this.internet = internet;
- setInternetIsSet(true);
- return this;
- }
-
- public void unsetInternet() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INTERNET_ISSET_ID);
- }
-
- /** Returns true if field internet is set (has been assigned a value) and false otherwise */
- public boolean isSetInternet() {
- return EncodingUtils.testBit(__isset_bitfield, __INTERNET_ISSET_ID);
- }
-
- public void setInternetIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INTERNET_ISSET_ID, value);
- }
-
- public long getRam() {
- return this.ram;
- }
-
- public updateImageData_args setRam(long ram) {
- this.ram = ram;
- setRamIsSet(true);
- return this;
- }
-
- public void unsetRam() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RAM_ISSET_ID);
- }
-
- /** Returns true if field ram is set (has been assigned a value) and false otherwise */
- public boolean isSetRam() {
- return EncodingUtils.testBit(__isset_bitfield, __RAM_ISSET_ID);
- }
-
- public void setRamIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RAM_ISSET_ID, value);
- }
-
- public long getCpu() {
- return this.cpu;
- }
-
- public updateImageData_args setCpu(long cpu) {
- this.cpu = cpu;
- setCpuIsSet(true);
- return this;
- }
-
- public void unsetCpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID);
- }
-
- /** Returns true if field cpu is set (has been assigned a value) and false otherwise */
- public boolean isSetCpu() {
- return EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID);
- }
-
- public void setCpuIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value);
- }
-
- public String getId() {
- return this.id;
- }
-
- public updateImageData_args setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getVersion() {
- return this.version;
- }
-
- public updateImageData_args setVersion(String version) {
- this.version = version;
- return this;
- }
-
- public void unsetVersion() {
- this.version = null;
- }
-
- /** Returns true if field version is set (has been assigned a value) and false otherwise */
- public boolean isSetVersion() {
- return this.version != null;
- }
-
- public void setVersionIsSet(boolean value) {
- if (!value) {
- this.version = null;
- }
- }
-
- public boolean isIsTemplate() {
- return this.isTemplate;
- }
-
- public updateImageData_args setIsTemplate(boolean isTemplate) {
- this.isTemplate = isTemplate;
- setIsTemplateIsSet(true);
- return this;
- }
-
- public void unsetIsTemplate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
- }
-
- /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */
- public boolean isSetIsTemplate() {
- return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
- }
-
- public void setIsTemplateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
- }
-
- public long getFilesize() {
- return this.filesize;
- }
-
- public updateImageData_args setFilesize(long filesize) {
- this.filesize = filesize;
- setFilesizeIsSet(true);
- return this;
- }
-
- public void unsetFilesize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
- }
-
- /** Returns true if field filesize is set (has been assigned a value) and false otherwise */
- public boolean isSetFilesize() {
- return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
- }
-
- public void setFilesizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
- }
-
- public long getShareMode() {
- return this.shareMode;
- }
-
- public updateImageData_args setShareMode(long shareMode) {
- this.shareMode = shareMode;
- setShareModeIsSet(true);
- return this;
- }
-
- public void unsetShareMode() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREMODE_ISSET_ID);
- }
-
- /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */
- public boolean isSetShareMode() {
- return EncodingUtils.testBit(__isset_bitfield, __SHAREMODE_ISSET_ID);
- }
-
- public void setShareModeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREMODE_ISSET_ID, value);
- }
-
- public String getOs() {
- return this.os;
- }
-
- public updateImageData_args setOs(String os) {
- this.os = os;
- return this;
- }
-
- public void unsetOs() {
- this.os = null;
- }
-
- /** Returns true if field os is set (has been assigned a value) and false otherwise */
- public boolean isSetOs() {
- return this.os != null;
- }
-
- public void setOsIsSet(boolean value) {
- if (!value) {
- this.os = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public updateImageData_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case NEW_NAME:
- if (value == null) {
- unsetNewName();
- } else {
- setNewName((String)value);
- }
- break;
-
- case DESC:
- if (value == null) {
- unsetDesc();
- } else {
- setDesc((String)value);
- }
- break;
-
- case IMAGE_PATH:
- if (value == null) {
- unsetImage_path();
- } else {
- setImage_path((String)value);
- }
- break;
-
- case LICENSE:
- if (value == null) {
- unsetLicense();
- } else {
- setLicense((Boolean)value);
- }
- break;
-
- case INTERNET:
- if (value == null) {
- unsetInternet();
- } else {
- setInternet((Boolean)value);
- }
- break;
-
- case RAM:
- if (value == null) {
- unsetRam();
- } else {
- setRam((Long)value);
- }
- break;
-
- case CPU:
- if (value == null) {
- unsetCpu();
- } else {
- setCpu((Long)value);
- }
- break;
-
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case VERSION:
- if (value == null) {
- unsetVersion();
- } else {
- setVersion((String)value);
- }
- break;
-
- case IS_TEMPLATE:
- if (value == null) {
- unsetIsTemplate();
- } else {
- setIsTemplate((Boolean)value);
- }
- break;
-
- case FILESIZE:
- if (value == null) {
- unsetFilesize();
- } else {
- setFilesize((Long)value);
- }
- break;
-
- case SHARE_MODE:
- if (value == null) {
- unsetShareMode();
- } else {
- setShareMode((Long)value);
- }
- break;
-
- case OS:
- if (value == null) {
- unsetOs();
- } else {
- setOs((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NAME:
- return getName();
-
- case NEW_NAME:
- return getNewName();
-
- case DESC:
- return getDesc();
-
- case IMAGE_PATH:
- return getImage_path();
-
- case LICENSE:
- return Boolean.valueOf(isLicense());
-
- case INTERNET:
- return Boolean.valueOf(isInternet());
-
- case RAM:
- return Long.valueOf(getRam());
-
- case CPU:
- return Long.valueOf(getCpu());
-
- case ID:
- return getId();
-
- case VERSION:
- return getVersion();
-
- case IS_TEMPLATE:
- return Boolean.valueOf(isIsTemplate());
-
- case FILESIZE:
- return Long.valueOf(getFilesize());
-
- case SHARE_MODE:
- return Long.valueOf(getShareMode());
-
- case OS:
- return getOs();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case NAME:
- return isSetName();
- case NEW_NAME:
- return isSetNewName();
- case DESC:
- return isSetDesc();
- case IMAGE_PATH:
- return isSetImage_path();
- case LICENSE:
- return isSetLicense();
- case INTERNET:
- return isSetInternet();
- case RAM:
- return isSetRam();
- case CPU:
- return isSetCpu();
- case ID:
- return isSetId();
- case VERSION:
- return isSetVersion();
- case IS_TEMPLATE:
- return isSetIsTemplate();
- case FILESIZE:
- return isSetFilesize();
- case SHARE_MODE:
- return isSetShareMode();
- case OS:
- return isSetOs();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof updateImageData_args)
- return this.equals((updateImageData_args)that);
- return false;
- }
-
- public boolean equals(updateImageData_args that) {
- if (that == null)
- return false;
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_newName = true && this.isSetNewName();
- boolean that_present_newName = true && that.isSetNewName();
- if (this_present_newName || that_present_newName) {
- if (!(this_present_newName && that_present_newName))
- return false;
- if (!this.newName.equals(that.newName))
- return false;
- }
-
- boolean this_present_desc = true && this.isSetDesc();
- boolean that_present_desc = true && that.isSetDesc();
- if (this_present_desc || that_present_desc) {
- if (!(this_present_desc && that_present_desc))
- return false;
- if (!this.desc.equals(that.desc))
- return false;
- }
-
- boolean this_present_image_path = true && this.isSetImage_path();
- boolean that_present_image_path = true && that.isSetImage_path();
- if (this_present_image_path || that_present_image_path) {
- if (!(this_present_image_path && that_present_image_path))
- return false;
- if (!this.image_path.equals(that.image_path))
- return false;
- }
-
- boolean this_present_license = true;
- boolean that_present_license = true;
- if (this_present_license || that_present_license) {
- if (!(this_present_license && that_present_license))
- return false;
- if (this.license != that.license)
- return false;
- }
-
- boolean this_present_internet = true;
- boolean that_present_internet = true;
- if (this_present_internet || that_present_internet) {
- if (!(this_present_internet && that_present_internet))
- return false;
- if (this.internet != that.internet)
- return false;
- }
-
- boolean this_present_ram = true;
- boolean that_present_ram = true;
- if (this_present_ram || that_present_ram) {
- if (!(this_present_ram && that_present_ram))
- return false;
- if (this.ram != that.ram)
- return false;
- }
-
- boolean this_present_cpu = true;
- boolean that_present_cpu = true;
- if (this_present_cpu || that_present_cpu) {
- if (!(this_present_cpu && that_present_cpu))
- return false;
- if (this.cpu != that.cpu)
- return false;
- }
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_version = true && this.isSetVersion();
- boolean that_present_version = true && that.isSetVersion();
- if (this_present_version || that_present_version) {
- if (!(this_present_version && that_present_version))
- return false;
- if (!this.version.equals(that.version))
- return false;
- }
-
- boolean this_present_isTemplate = true;
- boolean that_present_isTemplate = true;
- if (this_present_isTemplate || that_present_isTemplate) {
- if (!(this_present_isTemplate && that_present_isTemplate))
- return false;
- if (this.isTemplate != that.isTemplate)
- return false;
- }
-
- boolean this_present_filesize = true;
- boolean that_present_filesize = true;
- if (this_present_filesize || that_present_filesize) {
- if (!(this_present_filesize && that_present_filesize))
- return false;
- if (this.filesize != that.filesize)
- return false;
- }
-
- boolean this_present_shareMode = true;
- boolean that_present_shareMode = true;
- if (this_present_shareMode || that_present_shareMode) {
- if (!(this_present_shareMode && that_present_shareMode))
- return false;
- if (this.shareMode != that.shareMode)
- return false;
- }
-
- boolean this_present_os = true && this.isSetOs();
- boolean that_present_os = true && that.isSetOs();
- if (this_present_os || that_present_os) {
- if (!(this_present_os && that_present_os))
- return false;
- if (!this.os.equals(that.os))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(updateImageData_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNewName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDesc()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImage_path()).compareTo(other.isSetImage_path());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImage_path()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_path, other.image_path);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLicense()).compareTo(other.isSetLicense());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLicense()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.license, other.license);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetInternet()).compareTo(other.isSetInternet());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetInternet()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.internet, other.internet);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetRam()).compareTo(other.isSetRam());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRam()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ram, other.ram);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCpu()).compareTo(other.isSetCpu());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCpu()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpu, other.cpu);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVersion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsTemplate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFilesize()).compareTo(other.isSetFilesize());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFilesize()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filesize, other.filesize);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetShareMode()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetOs()).compareTo(other.isSetOs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetOs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.os, other.os);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateImageData_args(");
- boolean first = true;
-
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("newName:");
- if (this.newName == null) {
- sb.append("null");
- } else {
- sb.append(this.newName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("desc:");
- if (this.desc == null) {
- sb.append("null");
- } else {
- sb.append(this.desc);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("image_path:");
- if (this.image_path == null) {
- sb.append("null");
- } else {
- sb.append(this.image_path);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("license:");
- sb.append(this.license);
- first = false;
- if (!first) sb.append(", ");
- sb.append("internet:");
- sb.append(this.internet);
- first = false;
- if (!first) sb.append(", ");
- sb.append("ram:");
- sb.append(this.ram);
- first = false;
- if (!first) sb.append(", ");
- sb.append("cpu:");
- sb.append(this.cpu);
- first = false;
- if (!first) sb.append(", ");
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("version:");
- if (this.version == null) {
- sb.append("null");
- } else {
- sb.append(this.version);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isTemplate:");
- sb.append(this.isTemplate);
- first = false;
- if (!first) sb.append(", ");
- sb.append("filesize:");
- sb.append(this.filesize);
- first = false;
- if (!first) sb.append(", ");
- sb.append("shareMode:");
- sb.append(this.shareMode);
- first = false;
- if (!first) sb.append(", ");
- sb.append("os:");
- if (this.os == null) {
- sb.append("null");
- } else {
- sb.append(this.os);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // 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 updateImageData_argsStandardSchemeFactory implements SchemeFactory {
- public updateImageData_argsStandardScheme getScheme() {
- return new updateImageData_argsStandardScheme();
- }
- }
-
- private static class updateImageData_argsStandardScheme extends StandardScheme<updateImageData_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_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: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NEW_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.newName = iprot.readString();
- struct.setNewNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // DESC
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // IMAGE_PATH
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.image_path = iprot.readString();
- struct.setImage_pathIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // LICENSE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.license = iprot.readBool();
- struct.setLicenseIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // INTERNET
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.internet = iprot.readBool();
- struct.setInternetIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // RAM
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.ram = iprot.readI64();
- struct.setRamIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // CPU
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.cpu = iprot.readI64();
- struct.setCpuIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // VERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 11: // IS_TEMPLATE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isTemplate = iprot.readBool();
- struct.setIsTemplateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 12: // FILESIZE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.filesize = iprot.readI64();
- struct.setFilesizeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 13: // SHARE_MODE
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.shareMode = iprot.readI64();
- struct.setShareModeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 14: // OS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.os = iprot.readString();
- struct.setOsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 15: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageData_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- if (struct.newName != null) {
- oprot.writeFieldBegin(NEW_NAME_FIELD_DESC);
- oprot.writeString(struct.newName);
- oprot.writeFieldEnd();
- }
- if (struct.desc != null) {
- oprot.writeFieldBegin(DESC_FIELD_DESC);
- oprot.writeString(struct.desc);
- oprot.writeFieldEnd();
- }
- if (struct.image_path != null) {
- oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC);
- oprot.writeString(struct.image_path);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(LICENSE_FIELD_DESC);
- oprot.writeBool(struct.license);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(INTERNET_FIELD_DESC);
- oprot.writeBool(struct.internet);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(RAM_FIELD_DESC);
- oprot.writeI64(struct.ram);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(CPU_FIELD_DESC);
- oprot.writeI64(struct.cpu);
- oprot.writeFieldEnd();
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.version != null) {
- oprot.writeFieldBegin(VERSION_FIELD_DESC);
- oprot.writeString(struct.version);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC);
- oprot.writeBool(struct.isTemplate);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(FILESIZE_FIELD_DESC);
- oprot.writeI64(struct.filesize);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC);
- oprot.writeI64(struct.shareMode);
- oprot.writeFieldEnd();
- if (struct.os != null) {
- oprot.writeFieldBegin(OS_FIELD_DESC);
- oprot.writeString(struct.os);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class updateImageData_argsTupleSchemeFactory implements SchemeFactory {
- public updateImageData_argsTupleScheme getScheme() {
- return new updateImageData_argsTupleScheme();
- }
- }
-
- private static class updateImageData_argsTupleScheme extends TupleScheme<updateImageData_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetName()) {
- optionals.set(0);
- }
- if (struct.isSetNewName()) {
- optionals.set(1);
- }
- if (struct.isSetDesc()) {
- optionals.set(2);
- }
- if (struct.isSetImage_path()) {
- optionals.set(3);
- }
- if (struct.isSetLicense()) {
- optionals.set(4);
- }
- if (struct.isSetInternet()) {
- optionals.set(5);
- }
- if (struct.isSetRam()) {
- optionals.set(6);
- }
- if (struct.isSetCpu()) {
- optionals.set(7);
- }
- if (struct.isSetId()) {
- optionals.set(8);
- }
- if (struct.isSetVersion()) {
- optionals.set(9);
- }
- if (struct.isSetIsTemplate()) {
- optionals.set(10);
- }
- if (struct.isSetFilesize()) {
- optionals.set(11);
- }
- if (struct.isSetShareMode()) {
- optionals.set(12);
- }
- if (struct.isSetOs()) {
- optionals.set(13);
- }
- if (struct.isSetToken()) {
- optionals.set(14);
- }
- oprot.writeBitSet(optionals, 15);
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetNewName()) {
- oprot.writeString(struct.newName);
- }
- if (struct.isSetDesc()) {
- oprot.writeString(struct.desc);
- }
- if (struct.isSetImage_path()) {
- oprot.writeString(struct.image_path);
- }
- if (struct.isSetLicense()) {
- oprot.writeBool(struct.license);
- }
- if (struct.isSetInternet()) {
- oprot.writeBool(struct.internet);
- }
- if (struct.isSetRam()) {
- oprot.writeI64(struct.ram);
- }
- if (struct.isSetCpu()) {
- oprot.writeI64(struct.cpu);
- }
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetVersion()) {
- oprot.writeString(struct.version);
- }
- if (struct.isSetIsTemplate()) {
- oprot.writeBool(struct.isTemplate);
- }
- if (struct.isSetFilesize()) {
- oprot.writeI64(struct.filesize);
- }
- if (struct.isSetShareMode()) {
- oprot.writeI64(struct.shareMode);
- }
- if (struct.isSetOs()) {
- oprot.writeString(struct.os);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, updateImageData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(15);
- if (incoming.get(0)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.newName = iprot.readString();
- struct.setNewNameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- }
- if (incoming.get(3)) {
- struct.image_path = iprot.readString();
- struct.setImage_pathIsSet(true);
- }
- if (incoming.get(4)) {
- struct.license = iprot.readBool();
- struct.setLicenseIsSet(true);
- }
- if (incoming.get(5)) {
- struct.internet = iprot.readBool();
- struct.setInternetIsSet(true);
- }
- if (incoming.get(6)) {
- struct.ram = iprot.readI64();
- struct.setRamIsSet(true);
- }
- if (incoming.get(7)) {
- struct.cpu = iprot.readI64();
- struct.setCpuIsSet(true);
- }
- if (incoming.get(8)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(9)) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- }
- if (incoming.get(10)) {
- struct.isTemplate = iprot.readBool();
- struct.setIsTemplateIsSet(true);
- }
- if (incoming.get(11)) {
- struct.filesize = iprot.readI64();
- struct.setFilesizeIsSet(true);
- }
- if (incoming.get(12)) {
- struct.shareMode = iprot.readI64();
- struct.setShareModeIsSet(true);
- }
- if (incoming.get(13)) {
- struct.os = iprot.readString();
- struct.setOsIsSet(true);
- }
- if (incoming.get(14)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class updateImageData_result implements org.apache.thrift.TBase<updateImageData_result, updateImageData_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageData_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageData_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateImageData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateImageData_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageData_result.class, metaDataMap);
- }
-
- public updateImageData_result() {
- }
-
- public updateImageData_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public updateImageData_result(updateImageData_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public updateImageData_result deepCopy() {
- return new updateImageData_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public updateImageData_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 updateImageData_result)
- return this.equals((updateImageData_result)that);
- return false;
- }
-
- public boolean equals(updateImageData_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(updateImageData_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("updateImageData_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 updateImageData_resultStandardSchemeFactory implements SchemeFactory {
- public updateImageData_resultStandardScheme getScheme() {
- return new updateImageData_resultStandardScheme();
- }
- }
-
- private static class updateImageData_resultStandardScheme extends StandardScheme<updateImageData_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageData_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, updateImageData_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 updateImageData_resultTupleSchemeFactory implements SchemeFactory {
- public updateImageData_resultTupleScheme getScheme() {
- return new updateImageData_resultTupleScheme();
- }
- }
-
- private static class updateImageData_resultTupleScheme extends TupleScheme<updateImageData_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, updateImageData_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, updateImageData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteImageData_args implements org.apache.thrift.TBase<deleteImageData_args, deleteImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageData_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageData_args");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageData_argsTupleSchemeFactory());
- }
-
- public String id; // required
- public String version; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ID((short)1, "id"),
- VERSION((short)2, "version"),
- TOKEN((short)3, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ID
- return ID;
- case 2: // VERSION
- return VERSION;
- case 3: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageData_args.class, metaDataMap);
- }
-
- public deleteImageData_args() {
- }
-
- public deleteImageData_args(
- String id,
- String version,
- String token)
- {
- this();
- this.id = id;
- this.version = version;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteImageData_args(deleteImageData_args other) {
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetVersion()) {
- this.version = other.version;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public deleteImageData_args deepCopy() {
- return new deleteImageData_args(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.version = null;
- this.token = null;
- }
-
- public String getId() {
- return this.id;
- }
-
- public deleteImageData_args setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getVersion() {
- return this.version;
- }
-
- public deleteImageData_args setVersion(String version) {
- this.version = version;
- return this;
- }
-
- public void unsetVersion() {
- this.version = null;
- }
-
- /** Returns true if field version is set (has been assigned a value) and false otherwise */
- public boolean isSetVersion() {
- return this.version != null;
- }
-
- public void setVersionIsSet(boolean value) {
- if (!value) {
- this.version = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public deleteImageData_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case VERSION:
- if (value == null) {
- unsetVersion();
- } else {
- setVersion((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return getId();
-
- case VERSION:
- return getVersion();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ID:
- return isSetId();
- case VERSION:
- return isSetVersion();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteImageData_args)
- return this.equals((deleteImageData_args)that);
- return false;
- }
-
- public boolean equals(deleteImageData_args that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_version = true && this.isSetVersion();
- boolean that_present_version = true && that.isSetVersion();
- if (this_present_version || that_present_version) {
- if (!(this_present_version && that_present_version))
- return false;
- if (!this.version.equals(that.version))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteImageData_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVersion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteImageData_args(");
- boolean first = true;
-
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("version:");
- if (this.version == null) {
- sb.append("null");
- } else {
- sb.append(this.version);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteImageData_argsStandardSchemeFactory implements SchemeFactory {
- public deleteImageData_argsStandardScheme getScheme() {
- return new deleteImageData_argsStandardScheme();
- }
- }
-
- private static class deleteImageData_argsStandardScheme extends StandardScheme<deleteImageData_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageData_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: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageData_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.version != null) {
- oprot.writeFieldBegin(VERSION_FIELD_DESC);
- oprot.writeString(struct.version);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteImageData_argsTupleSchemeFactory implements SchemeFactory {
- public deleteImageData_argsTupleScheme getScheme() {
- return new deleteImageData_argsTupleScheme();
- }
- }
-
- private static class deleteImageData_argsTupleScheme extends TupleScheme<deleteImageData_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetId()) {
- optionals.set(0);
- }
- if (struct.isSetVersion()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetVersion()) {
- oprot.writeString(struct.version);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteImageData_result implements org.apache.thrift.TBase<deleteImageData_result, deleteImageData_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageData_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageData_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageData_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageData_result.class, metaDataMap);
- }
-
- public deleteImageData_result() {
- }
-
- public deleteImageData_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteImageData_result(deleteImageData_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public deleteImageData_result deepCopy() {
- return new deleteImageData_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public deleteImageData_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 deleteImageData_result)
- return this.equals((deleteImageData_result)that);
- return false;
- }
-
- public boolean equals(deleteImageData_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(deleteImageData_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("deleteImageData_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 deleteImageData_resultStandardSchemeFactory implements SchemeFactory {
- public deleteImageData_resultStandardScheme getScheme() {
- return new deleteImageData_resultStandardScheme();
- }
- }
-
- private static class deleteImageData_resultStandardScheme extends StandardScheme<deleteImageData_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageData_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, deleteImageData_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 deleteImageData_resultTupleSchemeFactory implements SchemeFactory {
- public deleteImageData_resultTupleScheme getScheme() {
- return new deleteImageData_resultTupleScheme();
- }
- }
-
- private static class deleteImageData_resultTupleScheme extends TupleScheme<deleteImageData_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageData_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, deleteImageData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class updateLecturedata_args implements org.apache.thrift.TBase<updateLecturedata_args, updateLecturedata_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecturedata_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_args");
-
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField NEW_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("newName", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField SHORTDESC_FIELD_DESC = new org.apache.thrift.protocol.TField("shortdesc", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)7);
- private static final org.apache.thrift.protocol.TField IMAGEID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageid", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField IMAGEVERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("imageversion", org.apache.thrift.protocol.TType.STRING, (short)9);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)10);
- private static final org.apache.thrift.protocol.TField TEL_FIELD_DESC = new org.apache.thrift.protocol.TField("Tel", org.apache.thrift.protocol.TType.STRING, (short)15);
- private static final org.apache.thrift.protocol.TField FAK_FIELD_DESC = new org.apache.thrift.protocol.TField("Fak", org.apache.thrift.protocol.TType.STRING, (short)16);
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)17);
- private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)18);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateLecturedata_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateLecturedata_argsTupleSchemeFactory());
- }
-
- public String name; // required
- public String newName; // required
- public String shortdesc; // required
- public String desc; // required
- public String startDate; // required
- public String endDate; // required
- public boolean isActive; // required
- public String imageid; // required
- public String imageversion; // required
- public String token; // required
- public String Tel; // required
- public String Fak; // required
- public String id; // required
- public String university; // 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 {
- NAME((short)1, "name"),
- NEW_NAME((short)2, "newName"),
- SHORTDESC((short)3, "shortdesc"),
- DESC((short)4, "desc"),
- START_DATE((short)5, "startDate"),
- END_DATE((short)6, "endDate"),
- IS_ACTIVE((short)7, "isActive"),
- IMAGEID((short)8, "imageid"),
- IMAGEVERSION((short)9, "imageversion"),
- TOKEN((short)10, "token"),
- TEL((short)15, "Tel"),
- FAK((short)16, "Fak"),
- ID((short)17, "id"),
- UNIVERSITY((short)18, "university");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // NAME
- return NAME;
- case 2: // NEW_NAME
- return NEW_NAME;
- case 3: // SHORTDESC
- return SHORTDESC;
- case 4: // DESC
- return DESC;
- case 5: // START_DATE
- return START_DATE;
- case 6: // END_DATE
- return END_DATE;
- case 7: // IS_ACTIVE
- return IS_ACTIVE;
- case 8: // IMAGEID
- return IMAGEID;
- case 9: // IMAGEVERSION
- return IMAGEVERSION;
- case 10: // TOKEN
- return TOKEN;
- case 15: // TEL
- return TEL;
- case 16: // FAK
- return FAK;
- case 17: // ID
- return ID;
- case 18: // UNIVERSITY
- return UNIVERSITY;
- 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 __ISACTIVE_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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.NEW_NAME, new org.apache.thrift.meta_data.FieldMetaData("newName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SHORTDESC, new org.apache.thrift.meta_data.FieldMetaData("shortdesc", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IMAGEID, new org.apache.thrift.meta_data.FieldMetaData("imageid", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGEVERSION, new org.apache.thrift.meta_data.FieldMetaData("imageversion", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TEL, new org.apache.thrift.meta_data.FieldMetaData("Tel", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FAK, new org.apache.thrift.meta_data.FieldMetaData("Fak", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", 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(updateLecturedata_args.class, metaDataMap);
- }
-
- public updateLecturedata_args() {
- }
-
- public updateLecturedata_args(
- String name,
- String newName,
- String shortdesc,
- String desc,
- String startDate,
- String endDate,
- boolean isActive,
- String imageid,
- String imageversion,
- String token,
- String Tel,
- String Fak,
- String id,
- String university)
- {
- this();
- this.name = name;
- this.newName = newName;
- this.shortdesc = shortdesc;
- this.desc = desc;
- this.startDate = startDate;
- this.endDate = endDate;
- this.isActive = isActive;
- setIsActiveIsSet(true);
- this.imageid = imageid;
- this.imageversion = imageversion;
- this.token = token;
- this.Tel = Tel;
- this.Fak = Fak;
- this.id = id;
- this.university = university;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public updateLecturedata_args(updateLecturedata_args other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetNewName()) {
- this.newName = other.newName;
- }
- if (other.isSetShortdesc()) {
- this.shortdesc = other.shortdesc;
- }
- if (other.isSetDesc()) {
- this.desc = other.desc;
- }
- if (other.isSetStartDate()) {
- this.startDate = other.startDate;
- }
- if (other.isSetEndDate()) {
- this.endDate = other.endDate;
- }
- this.isActive = other.isActive;
- if (other.isSetImageid()) {
- this.imageid = other.imageid;
- }
- if (other.isSetImageversion()) {
- this.imageversion = other.imageversion;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetTel()) {
- this.Tel = other.Tel;
- }
- if (other.isSetFak()) {
- this.Fak = other.Fak;
- }
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetUniversity()) {
- this.university = other.university;
- }
- }
-
- public updateLecturedata_args deepCopy() {
- return new updateLecturedata_args(this);
- }
-
- @Override
- public void clear() {
- this.name = null;
- this.newName = null;
- this.shortdesc = null;
- this.desc = null;
- this.startDate = null;
- this.endDate = null;
- setIsActiveIsSet(false);
- this.isActive = false;
- this.imageid = null;
- this.imageversion = null;
- this.token = null;
- this.Tel = null;
- this.Fak = null;
- this.id = null;
- this.university = null;
- }
-
- public String getName() {
- return this.name;
- }
-
- public updateLecturedata_args setName(String name) {
- this.name = name;
- return this;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getNewName() {
- return this.newName;
- }
-
- public updateLecturedata_args setNewName(String newName) {
- this.newName = newName;
- return this;
- }
-
- public void unsetNewName() {
- this.newName = null;
- }
-
- /** Returns true if field newName is set (has been assigned a value) and false otherwise */
- public boolean isSetNewName() {
- return this.newName != null;
- }
-
- public void setNewNameIsSet(boolean value) {
- if (!value) {
- this.newName = null;
- }
- }
-
- public String getShortdesc() {
- return this.shortdesc;
- }
-
- public updateLecturedata_args setShortdesc(String shortdesc) {
- this.shortdesc = shortdesc;
- return this;
- }
-
- public void unsetShortdesc() {
- this.shortdesc = null;
- }
-
- /** Returns true if field shortdesc is set (has been assigned a value) and false otherwise */
- public boolean isSetShortdesc() {
- return this.shortdesc != null;
- }
-
- public void setShortdescIsSet(boolean value) {
- if (!value) {
- this.shortdesc = null;
- }
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public updateLecturedata_args setDesc(String desc) {
- this.desc = desc;
- return this;
- }
-
- public void unsetDesc() {
- this.desc = null;
- }
-
- /** Returns true if field desc is set (has been assigned a value) and false otherwise */
- public boolean isSetDesc() {
- return this.desc != null;
- }
-
- public void setDescIsSet(boolean value) {
- if (!value) {
- this.desc = null;
- }
- }
-
- public String getStartDate() {
- return this.startDate;
- }
-
- public updateLecturedata_args setStartDate(String startDate) {
- this.startDate = startDate;
- return this;
- }
-
- public void unsetStartDate() {
- this.startDate = null;
- }
-
- /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
- public boolean isSetStartDate() {
- return this.startDate != null;
- }
-
- public void setStartDateIsSet(boolean value) {
- if (!value) {
- this.startDate = null;
- }
- }
-
- public String getEndDate() {
- return this.endDate;
- }
-
- public updateLecturedata_args setEndDate(String endDate) {
- this.endDate = endDate;
- return this;
- }
-
- public void unsetEndDate() {
- this.endDate = null;
- }
-
- /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
- public boolean isSetEndDate() {
- return this.endDate != null;
- }
-
- public void setEndDateIsSet(boolean value) {
- if (!value) {
- this.endDate = null;
- }
- }
-
- public boolean isIsActive() {
- return this.isActive;
- }
-
- public updateLecturedata_args setIsActive(boolean isActive) {
- this.isActive = isActive;
- setIsActiveIsSet(true);
- return this;
- }
-
- public void unsetIsActive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACTIVE_ISSET_ID);
- }
-
- /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
- public boolean isSetIsActive() {
- return EncodingUtils.testBit(__isset_bitfield, __ISACTIVE_ISSET_ID);
- }
-
- public void setIsActiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACTIVE_ISSET_ID, value);
- }
-
- public String getImageid() {
- return this.imageid;
- }
-
- public updateLecturedata_args setImageid(String imageid) {
- this.imageid = imageid;
- return this;
- }
-
- public void unsetImageid() {
- this.imageid = null;
- }
-
- /** Returns true if field imageid is set (has been assigned a value) and false otherwise */
- public boolean isSetImageid() {
- return this.imageid != null;
- }
-
- public void setImageidIsSet(boolean value) {
- if (!value) {
- this.imageid = null;
- }
- }
-
- public String getImageversion() {
- return this.imageversion;
- }
-
- public updateLecturedata_args setImageversion(String imageversion) {
- this.imageversion = imageversion;
- return this;
- }
-
- public void unsetImageversion() {
- this.imageversion = null;
- }
-
- /** Returns true if field imageversion is set (has been assigned a value) and false otherwise */
- public boolean isSetImageversion() {
- return this.imageversion != null;
- }
-
- public void setImageversionIsSet(boolean value) {
- if (!value) {
- this.imageversion = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public updateLecturedata_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getTel() {
- return this.Tel;
- }
-
- public updateLecturedata_args setTel(String Tel) {
- this.Tel = Tel;
- return this;
- }
-
- public void unsetTel() {
- this.Tel = null;
- }
-
- /** Returns true if field Tel is set (has been assigned a value) and false otherwise */
- public boolean isSetTel() {
- return this.Tel != null;
- }
-
- public void setTelIsSet(boolean value) {
- if (!value) {
- this.Tel = null;
- }
- }
-
- public String getFak() {
- return this.Fak;
- }
-
- public updateLecturedata_args setFak(String Fak) {
- this.Fak = Fak;
- return this;
- }
-
- public void unsetFak() {
- this.Fak = null;
- }
-
- /** Returns true if field Fak is set (has been assigned a value) and false otherwise */
- public boolean isSetFak() {
- return this.Fak != null;
- }
-
- public void setFakIsSet(boolean value) {
- if (!value) {
- this.Fak = null;
- }
- }
-
- public String getId() {
- return this.id;
- }
-
- public updateLecturedata_args setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getUniversity() {
- return this.university;
- }
-
- public updateLecturedata_args setUniversity(String university) {
- this.university = university;
- return this;
- }
-
- public void unsetUniversity() {
- this.university = null;
- }
-
- /** Returns true if field university is set (has been assigned a value) and false otherwise */
- public boolean isSetUniversity() {
- return this.university != null;
- }
-
- public void setUniversityIsSet(boolean value) {
- if (!value) {
- this.university = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case NEW_NAME:
- if (value == null) {
- unsetNewName();
- } else {
- setNewName((String)value);
- }
- break;
-
- case SHORTDESC:
- if (value == null) {
- unsetShortdesc();
- } else {
- setShortdesc((String)value);
- }
- break;
-
- case DESC:
- if (value == null) {
- unsetDesc();
- } else {
- setDesc((String)value);
- }
- break;
-
- case START_DATE:
- if (value == null) {
- unsetStartDate();
- } else {
- setStartDate((String)value);
- }
- break;
-
- case END_DATE:
- if (value == null) {
- unsetEndDate();
- } else {
- setEndDate((String)value);
- }
- break;
-
- case IS_ACTIVE:
- if (value == null) {
- unsetIsActive();
- } else {
- setIsActive((Boolean)value);
- }
- break;
-
- case IMAGEID:
- if (value == null) {
- unsetImageid();
- } else {
- setImageid((String)value);
- }
- break;
-
- case IMAGEVERSION:
- if (value == null) {
- unsetImageversion();
- } else {
- setImageversion((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case TEL:
- if (value == null) {
- unsetTel();
- } else {
- setTel((String)value);
- }
- break;
-
- case FAK:
- if (value == null) {
- unsetFak();
- } else {
- setFak((String)value);
- }
- break;
-
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case UNIVERSITY:
- if (value == null) {
- unsetUniversity();
- } else {
- setUniversity((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case NAME:
- return getName();
-
- case NEW_NAME:
- return getNewName();
-
- case SHORTDESC:
- return getShortdesc();
-
- case DESC:
- return getDesc();
-
- case START_DATE:
- return getStartDate();
-
- case END_DATE:
- return getEndDate();
-
- case IS_ACTIVE:
- return Boolean.valueOf(isIsActive());
-
- case IMAGEID:
- return getImageid();
-
- case IMAGEVERSION:
- return getImageversion();
-
- case TOKEN:
- return getToken();
-
- case TEL:
- return getTel();
-
- case FAK:
- return getFak();
-
- case ID:
- return getId();
-
- case UNIVERSITY:
- return getUniversity();
-
- }
- 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 NAME:
- return isSetName();
- case NEW_NAME:
- return isSetNewName();
- case SHORTDESC:
- return isSetShortdesc();
- case DESC:
- return isSetDesc();
- case START_DATE:
- return isSetStartDate();
- case END_DATE:
- return isSetEndDate();
- case IS_ACTIVE:
- return isSetIsActive();
- case IMAGEID:
- return isSetImageid();
- case IMAGEVERSION:
- return isSetImageversion();
- case TOKEN:
- return isSetToken();
- case TEL:
- return isSetTel();
- case FAK:
- return isSetFak();
- case ID:
- return isSetId();
- case UNIVERSITY:
- return isSetUniversity();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof updateLecturedata_args)
- return this.equals((updateLecturedata_args)that);
- return false;
- }
-
- public boolean equals(updateLecturedata_args that) {
- if (that == null)
- return false;
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_newName = true && this.isSetNewName();
- boolean that_present_newName = true && that.isSetNewName();
- if (this_present_newName || that_present_newName) {
- if (!(this_present_newName && that_present_newName))
- return false;
- if (!this.newName.equals(that.newName))
- return false;
- }
-
- boolean this_present_shortdesc = true && this.isSetShortdesc();
- boolean that_present_shortdesc = true && that.isSetShortdesc();
- if (this_present_shortdesc || that_present_shortdesc) {
- if (!(this_present_shortdesc && that_present_shortdesc))
- return false;
- if (!this.shortdesc.equals(that.shortdesc))
- return false;
- }
-
- boolean this_present_desc = true && this.isSetDesc();
- boolean that_present_desc = true && that.isSetDesc();
- if (this_present_desc || that_present_desc) {
- if (!(this_present_desc && that_present_desc))
- return false;
- if (!this.desc.equals(that.desc))
- return false;
- }
-
- boolean this_present_startDate = true && this.isSetStartDate();
- boolean that_present_startDate = true && that.isSetStartDate();
- if (this_present_startDate || that_present_startDate) {
- if (!(this_present_startDate && that_present_startDate))
- return false;
- if (!this.startDate.equals(that.startDate))
- return false;
- }
-
- boolean this_present_endDate = true && this.isSetEndDate();
- boolean that_present_endDate = true && that.isSetEndDate();
- if (this_present_endDate || that_present_endDate) {
- if (!(this_present_endDate && that_present_endDate))
- return false;
- if (!this.endDate.equals(that.endDate))
- return false;
- }
-
- boolean this_present_isActive = true;
- boolean that_present_isActive = true;
- if (this_present_isActive || that_present_isActive) {
- if (!(this_present_isActive && that_present_isActive))
- return false;
- if (this.isActive != that.isActive)
- return false;
- }
-
- boolean this_present_imageid = true && this.isSetImageid();
- boolean that_present_imageid = true && that.isSetImageid();
- if (this_present_imageid || that_present_imageid) {
- if (!(this_present_imageid && that_present_imageid))
- return false;
- if (!this.imageid.equals(that.imageid))
- return false;
- }
-
- boolean this_present_imageversion = true && this.isSetImageversion();
- boolean that_present_imageversion = true && that.isSetImageversion();
- if (this_present_imageversion || that_present_imageversion) {
- if (!(this_present_imageversion && that_present_imageversion))
- return false;
- if (!this.imageversion.equals(that.imageversion))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_Tel = true && this.isSetTel();
- boolean that_present_Tel = true && that.isSetTel();
- if (this_present_Tel || that_present_Tel) {
- if (!(this_present_Tel && that_present_Tel))
- return false;
- if (!this.Tel.equals(that.Tel))
- return false;
- }
-
- boolean this_present_Fak = true && this.isSetFak();
- boolean that_present_Fak = true && that.isSetFak();
- if (this_present_Fak || that_present_Fak) {
- if (!(this_present_Fak && that_present_Fak))
- return false;
- if (!this.Fak.equals(that.Fak))
- return false;
- }
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_university = true && this.isSetUniversity();
- boolean that_present_university = true && that.isSetUniversity();
- if (this_present_university || that_present_university) {
- if (!(this_present_university && that_present_university))
- return false;
- if (!this.university.equals(that.university))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(updateLecturedata_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetNewName()).compareTo(other.isSetNewName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetNewName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newName, other.newName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetShortdesc()).compareTo(other.isSetShortdesc());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetShortdesc()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shortdesc, other.shortdesc);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDesc()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStartDate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(other.isSetEndDate());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetEndDate()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, other.endDate);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(other.isSetIsActive());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsActive()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, other.isActive);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImageid()).compareTo(other.isSetImageid());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageid()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageid, other.imageid);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImageversion()).compareTo(other.isSetImageversion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageversion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageversion, other.imageversion);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetTel()).compareTo(other.isSetTel());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetTel()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Tel, other.Tel);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetFak()).compareTo(other.isSetFak());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetFak()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Fak, other.Fak);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUniversity()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
- 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("updateLecturedata_args(");
- boolean first = true;
-
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("newName:");
- if (this.newName == null) {
- sb.append("null");
- } else {
- sb.append(this.newName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("shortdesc:");
- if (this.shortdesc == null) {
- sb.append("null");
- } else {
- sb.append(this.shortdesc);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("desc:");
- if (this.desc == null) {
- sb.append("null");
- } else {
- sb.append(this.desc);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("startDate:");
- if (this.startDate == null) {
- sb.append("null");
- } else {
- sb.append(this.startDate);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("endDate:");
- if (this.endDate == null) {
- sb.append("null");
- } else {
- sb.append(this.endDate);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isActive:");
- sb.append(this.isActive);
- first = false;
- if (!first) sb.append(", ");
- sb.append("imageid:");
- if (this.imageid == null) {
- sb.append("null");
- } else {
- sb.append(this.imageid);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("imageversion:");
- if (this.imageversion == null) {
- sb.append("null");
- } else {
- sb.append(this.imageversion);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Tel:");
- if (this.Tel == null) {
- sb.append("null");
- } else {
- sb.append(this.Tel);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("Fak:");
- if (this.Fak == null) {
- sb.append("null");
- } else {
- sb.append(this.Fak);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("university:");
- if (this.university == null) {
- sb.append("null");
- } else {
- sb.append(this.university);
- }
- 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 updateLecturedata_argsStandardSchemeFactory implements SchemeFactory {
- public updateLecturedata_argsStandardScheme getScheme() {
- return new updateLecturedata_argsStandardScheme();
- }
- }
-
- private static class updateLecturedata_argsStandardScheme extends StandardScheme<updateLecturedata_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_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: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NEW_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.newName = iprot.readString();
- struct.setNewNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // SHORTDESC
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.shortdesc = iprot.readString();
- struct.setShortdescIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // DESC
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // START_DATE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.startDate = iprot.readString();
- struct.setStartDateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // END_DATE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.endDate = iprot.readString();
- struct.setEndDateIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // IS_ACTIVE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isActive = iprot.readBool();
- struct.setIsActiveIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // IMAGEID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageid = iprot.readString();
- struct.setImageidIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // IMAGEVERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageversion = iprot.readString();
- struct.setImageversionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 10: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 15: // TEL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Tel = iprot.readString();
- struct.setTelIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 16: // FAK
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.Fak = iprot.readString();
- struct.setFakIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 17: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 18: // UNIVERSITY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(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, updateLecturedata_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- if (struct.newName != null) {
- oprot.writeFieldBegin(NEW_NAME_FIELD_DESC);
- oprot.writeString(struct.newName);
- oprot.writeFieldEnd();
- }
- if (struct.shortdesc != null) {
- oprot.writeFieldBegin(SHORTDESC_FIELD_DESC);
- oprot.writeString(struct.shortdesc);
- oprot.writeFieldEnd();
- }
- if (struct.desc != null) {
- oprot.writeFieldBegin(DESC_FIELD_DESC);
- oprot.writeString(struct.desc);
- oprot.writeFieldEnd();
- }
- if (struct.startDate != null) {
- oprot.writeFieldBegin(START_DATE_FIELD_DESC);
- oprot.writeString(struct.startDate);
- oprot.writeFieldEnd();
- }
- if (struct.endDate != null) {
- oprot.writeFieldBegin(END_DATE_FIELD_DESC);
- oprot.writeString(struct.endDate);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
- oprot.writeBool(struct.isActive);
- oprot.writeFieldEnd();
- if (struct.imageid != null) {
- oprot.writeFieldBegin(IMAGEID_FIELD_DESC);
- oprot.writeString(struct.imageid);
- oprot.writeFieldEnd();
- }
- if (struct.imageversion != null) {
- oprot.writeFieldBegin(IMAGEVERSION_FIELD_DESC);
- oprot.writeString(struct.imageversion);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.Tel != null) {
- oprot.writeFieldBegin(TEL_FIELD_DESC);
- oprot.writeString(struct.Tel);
- oprot.writeFieldEnd();
- }
- if (struct.Fak != null) {
- oprot.writeFieldBegin(FAK_FIELD_DESC);
- oprot.writeString(struct.Fak);
- oprot.writeFieldEnd();
- }
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.university != null) {
- oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
- oprot.writeString(struct.university);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class updateLecturedata_argsTupleSchemeFactory implements SchemeFactory {
- public updateLecturedata_argsTupleScheme getScheme() {
- return new updateLecturedata_argsTupleScheme();
- }
- }
-
- private static class updateLecturedata_argsTupleScheme extends TupleScheme<updateLecturedata_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetName()) {
- optionals.set(0);
- }
- if (struct.isSetNewName()) {
- optionals.set(1);
- }
- if (struct.isSetShortdesc()) {
- optionals.set(2);
- }
- if (struct.isSetDesc()) {
- optionals.set(3);
- }
- if (struct.isSetStartDate()) {
- optionals.set(4);
- }
- if (struct.isSetEndDate()) {
- optionals.set(5);
- }
- if (struct.isSetIsActive()) {
- optionals.set(6);
- }
- if (struct.isSetImageid()) {
- optionals.set(7);
- }
- if (struct.isSetImageversion()) {
- optionals.set(8);
- }
- if (struct.isSetToken()) {
- optionals.set(9);
- }
- if (struct.isSetTel()) {
- optionals.set(10);
- }
- if (struct.isSetFak()) {
- optionals.set(11);
- }
- if (struct.isSetId()) {
- optionals.set(12);
- }
- if (struct.isSetUniversity()) {
- optionals.set(13);
- }
- oprot.writeBitSet(optionals, 14);
- if (struct.isSetName()) {
- oprot.writeString(struct.name);
- }
- if (struct.isSetNewName()) {
- oprot.writeString(struct.newName);
- }
- if (struct.isSetShortdesc()) {
- oprot.writeString(struct.shortdesc);
- }
- if (struct.isSetDesc()) {
- oprot.writeString(struct.desc);
- }
- if (struct.isSetStartDate()) {
- oprot.writeString(struct.startDate);
- }
- if (struct.isSetEndDate()) {
- oprot.writeString(struct.endDate);
- }
- if (struct.isSetIsActive()) {
- oprot.writeBool(struct.isActive);
- }
- if (struct.isSetImageid()) {
- oprot.writeString(struct.imageid);
- }
- if (struct.isSetImageversion()) {
- oprot.writeString(struct.imageversion);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetTel()) {
- oprot.writeString(struct.Tel);
- }
- if (struct.isSetFak()) {
- oprot.writeString(struct.Fak);
- }
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetUniversity()) {
- oprot.writeString(struct.university);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(14);
- if (incoming.get(0)) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.newName = iprot.readString();
- struct.setNewNameIsSet(true);
- }
- if (incoming.get(2)) {
- struct.shortdesc = iprot.readString();
- struct.setShortdescIsSet(true);
- }
- if (incoming.get(3)) {
- struct.desc = iprot.readString();
- struct.setDescIsSet(true);
- }
- if (incoming.get(4)) {
- struct.startDate = iprot.readString();
- struct.setStartDateIsSet(true);
- }
- if (incoming.get(5)) {
- struct.endDate = iprot.readString();
- struct.setEndDateIsSet(true);
- }
- if (incoming.get(6)) {
- struct.isActive = iprot.readBool();
- struct.setIsActiveIsSet(true);
- }
- if (incoming.get(7)) {
- struct.imageid = iprot.readString();
- struct.setImageidIsSet(true);
- }
- if (incoming.get(8)) {
- struct.imageversion = iprot.readString();
- struct.setImageversionIsSet(true);
- }
- if (incoming.get(9)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(10)) {
- struct.Tel = iprot.readString();
- struct.setTelIsSet(true);
- }
- if (incoming.get(11)) {
- struct.Fak = iprot.readString();
- struct.setFakIsSet(true);
- }
- if (incoming.get(12)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(13)) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- }
- }
- }
-
- }
-
- public static class updateLecturedata_result implements org.apache.thrift.TBase<updateLecturedata_result, updateLecturedata_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecturedata_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecturedata_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateLecturedata_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateLecturedata_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecturedata_result.class, metaDataMap);
- }
-
- public updateLecturedata_result() {
- }
-
- public updateLecturedata_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public updateLecturedata_result(updateLecturedata_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public updateLecturedata_result deepCopy() {
- return new updateLecturedata_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public updateLecturedata_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 updateLecturedata_result)
- return this.equals((updateLecturedata_result)that);
- return false;
- }
-
- public boolean equals(updateLecturedata_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(updateLecturedata_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("updateLecturedata_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 updateLecturedata_resultStandardSchemeFactory implements SchemeFactory {
- public updateLecturedata_resultStandardScheme getScheme() {
- return new updateLecturedata_resultStandardScheme();
- }
- }
-
- private static class updateLecturedata_resultStandardScheme extends StandardScheme<updateLecturedata_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecturedata_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, updateLecturedata_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 updateLecturedata_resultTupleSchemeFactory implements SchemeFactory {
- public updateLecturedata_resultTupleScheme getScheme() {
- return new updateLecturedata_resultTupleScheme();
- }
- }
-
- private static class updateLecturedata_resultTupleScheme extends TupleScheme<updateLecturedata_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, updateLecturedata_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, updateLecturedata_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteImageServer_args implements org.apache.thrift.TBase<deleteImageServer_args, deleteImageServer_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageServer_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageServer_args");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageServer_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageServer_argsTupleSchemeFactory());
- }
-
- public String id; // required
- public String version; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ID((short)1, "id"),
- VERSION((short)2, "version"),
- TOKEN((short)3, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ID
- return ID;
- case 2: // VERSION
- return VERSION;
- case 3: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageServer_args.class, metaDataMap);
- }
-
- public deleteImageServer_args() {
- }
-
- public deleteImageServer_args(
- String id,
- String version,
- String token)
- {
- this();
- this.id = id;
- this.version = version;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteImageServer_args(deleteImageServer_args other) {
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetVersion()) {
- this.version = other.version;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public deleteImageServer_args deepCopy() {
- return new deleteImageServer_args(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.version = null;
- this.token = null;
- }
-
- public String getId() {
- return this.id;
- }
-
- public deleteImageServer_args setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getVersion() {
- return this.version;
- }
-
- public deleteImageServer_args setVersion(String version) {
- this.version = version;
- return this;
- }
-
- public void unsetVersion() {
- this.version = null;
- }
-
- /** Returns true if field version is set (has been assigned a value) and false otherwise */
- public boolean isSetVersion() {
- return this.version != null;
- }
-
- public void setVersionIsSet(boolean value) {
- if (!value) {
- this.version = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public deleteImageServer_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case VERSION:
- if (value == null) {
- unsetVersion();
- } else {
- setVersion((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return getId();
-
- case VERSION:
- return getVersion();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ID:
- return isSetId();
- case VERSION:
- return isSetVersion();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteImageServer_args)
- return this.equals((deleteImageServer_args)that);
- return false;
- }
-
- public boolean equals(deleteImageServer_args that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_version = true && this.isSetVersion();
- boolean that_present_version = true && that.isSetVersion();
- if (this_present_version || that_present_version) {
- if (!(this_present_version && that_present_version))
- return false;
- if (!this.version.equals(that.version))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteImageServer_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVersion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteImageServer_args(");
- boolean first = true;
-
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("version:");
- if (this.version == null) {
- sb.append("null");
- } else {
- sb.append(this.version);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteImageServer_argsStandardSchemeFactory implements SchemeFactory {
- public deleteImageServer_argsStandardScheme getScheme() {
- return new deleteImageServer_argsStandardScheme();
- }
- }
-
- private static class deleteImageServer_argsStandardScheme extends StandardScheme<deleteImageServer_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageServer_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: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageServer_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.version != null) {
- oprot.writeFieldBegin(VERSION_FIELD_DESC);
- oprot.writeString(struct.version);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteImageServer_argsTupleSchemeFactory implements SchemeFactory {
- public deleteImageServer_argsTupleScheme getScheme() {
- return new deleteImageServer_argsTupleScheme();
- }
- }
-
- private static class deleteImageServer_argsTupleScheme extends TupleScheme<deleteImageServer_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageServer_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetId()) {
- optionals.set(0);
- }
- if (struct.isSetVersion()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetVersion()) {
- oprot.writeString(struct.version);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageServer_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteImageServer_result implements org.apache.thrift.TBase<deleteImageServer_result, deleteImageServer_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageServer_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageServer_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageServer_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageServer_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageServer_result.class, metaDataMap);
- }
-
- public deleteImageServer_result() {
- }
-
- public deleteImageServer_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteImageServer_result(deleteImageServer_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public deleteImageServer_result deepCopy() {
- return new deleteImageServer_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public deleteImageServer_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 deleteImageServer_result)
- return this.equals((deleteImageServer_result)that);
- return false;
- }
-
- public boolean equals(deleteImageServer_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(deleteImageServer_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("deleteImageServer_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 deleteImageServer_resultStandardSchemeFactory implements SchemeFactory {
- public deleteImageServer_resultStandardScheme getScheme() {
- return new deleteImageServer_resultStandardScheme();
- }
- }
-
- private static class deleteImageServer_resultStandardScheme extends StandardScheme<deleteImageServer_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageServer_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, deleteImageServer_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 deleteImageServer_resultTupleSchemeFactory implements SchemeFactory {
- public deleteImageServer_resultTupleScheme getScheme() {
- return new deleteImageServer_resultTupleScheme();
- }
- }
-
- private static class deleteImageServer_resultTupleScheme extends TupleScheme<deleteImageServer_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageServer_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, deleteImageServer_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteImageByPath_args implements org.apache.thrift.TBase<deleteImageByPath_args, deleteImageByPath_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageByPath_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageByPath_args");
-
- private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("image_path", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageByPath_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageByPath_argsTupleSchemeFactory());
- }
-
- public String image_path; // 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 {
- IMAGE_PATH((short)1, "image_path");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGE_PATH
- return IMAGE_PATH;
- 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.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("image_path", 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(deleteImageByPath_args.class, metaDataMap);
- }
-
- public deleteImageByPath_args() {
- }
-
- public deleteImageByPath_args(
- String image_path)
- {
- this();
- this.image_path = image_path;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteImageByPath_args(deleteImageByPath_args other) {
- if (other.isSetImage_path()) {
- this.image_path = other.image_path;
- }
- }
-
- public deleteImageByPath_args deepCopy() {
- return new deleteImageByPath_args(this);
- }
-
- @Override
- public void clear() {
- this.image_path = null;
- }
-
- public String getImage_path() {
- return this.image_path;
- }
-
- public deleteImageByPath_args setImage_path(String image_path) {
- this.image_path = image_path;
- return this;
- }
-
- public void unsetImage_path() {
- this.image_path = null;
- }
-
- /** Returns true if field image_path is set (has been assigned a value) and false otherwise */
- public boolean isSetImage_path() {
- return this.image_path != null;
- }
-
- public void setImage_pathIsSet(boolean value) {
- if (!value) {
- this.image_path = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGE_PATH:
- if (value == null) {
- unsetImage_path();
- } else {
- setImage_path((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGE_PATH:
- return getImage_path();
-
- }
- 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 IMAGE_PATH:
- return isSetImage_path();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteImageByPath_args)
- return this.equals((deleteImageByPath_args)that);
- return false;
- }
-
- public boolean equals(deleteImageByPath_args that) {
- if (that == null)
- return false;
-
- boolean this_present_image_path = true && this.isSetImage_path();
- boolean that_present_image_path = true && that.isSetImage_path();
- if (this_present_image_path || that_present_image_path) {
- if (!(this_present_image_path && that_present_image_path))
- return false;
- if (!this.image_path.equals(that.image_path))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteImageByPath_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImage_path()).compareTo(other.isSetImage_path());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImage_path()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image_path, other.image_path);
- 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("deleteImageByPath_args(");
- boolean first = true;
-
- sb.append("image_path:");
- if (this.image_path == null) {
- sb.append("null");
- } else {
- sb.append(this.image_path);
- }
- 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 deleteImageByPath_argsStandardSchemeFactory implements SchemeFactory {
- public deleteImageByPath_argsStandardScheme getScheme() {
- return new deleteImageByPath_argsStandardScheme();
- }
- }
-
- private static class deleteImageByPath_argsStandardScheme extends StandardScheme<deleteImageByPath_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageByPath_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: // IMAGE_PATH
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.image_path = iprot.readString();
- struct.setImage_pathIsSet(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, deleteImageByPath_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.image_path != null) {
- oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC);
- oprot.writeString(struct.image_path);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteImageByPath_argsTupleSchemeFactory implements SchemeFactory {
- public deleteImageByPath_argsTupleScheme getScheme() {
- return new deleteImageByPath_argsTupleScheme();
- }
- }
-
- private static class deleteImageByPath_argsTupleScheme extends TupleScheme<deleteImageByPath_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageByPath_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImage_path()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetImage_path()) {
- oprot.writeString(struct.image_path);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageByPath_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.image_path = iprot.readString();
- struct.setImage_pathIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteImageByPath_result implements org.apache.thrift.TBase<deleteImageByPath_result, deleteImageByPath_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageByPath_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageByPath_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageByPath_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageByPath_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageByPath_result.class, metaDataMap);
- }
-
- public deleteImageByPath_result() {
- }
-
- public deleteImageByPath_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteImageByPath_result(deleteImageByPath_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public deleteImageByPath_result deepCopy() {
- return new deleteImageByPath_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public deleteImageByPath_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 deleteImageByPath_result)
- return this.equals((deleteImageByPath_result)that);
- return false;
- }
-
- public boolean equals(deleteImageByPath_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(deleteImageByPath_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("deleteImageByPath_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 deleteImageByPath_resultStandardSchemeFactory implements SchemeFactory {
- public deleteImageByPath_resultStandardScheme getScheme() {
- return new deleteImageByPath_resultStandardScheme();
- }
- }
-
- private static class deleteImageByPath_resultStandardScheme extends StandardScheme<deleteImageByPath_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageByPath_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, deleteImageByPath_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 deleteImageByPath_resultTupleSchemeFactory implements SchemeFactory {
- public deleteImageByPath_resultTupleScheme getScheme() {
- return new deleteImageByPath_resultTupleScheme();
- }
- }
-
- private static class deleteImageByPath_resultTupleScheme extends TupleScheme<deleteImageByPath_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageByPath_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, deleteImageByPath_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class connectedToLecture_args implements org.apache.thrift.TBase<connectedToLecture_args, connectedToLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<connectedToLecture_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("connectedToLecture_args");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new connectedToLecture_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new connectedToLecture_argsTupleSchemeFactory());
- }
-
- public String id; // required
- public String version; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ID((short)1, "id"),
- VERSION((short)2, "version"),
- TOKEN((short)3, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ID
- return ID;
- case 2: // VERSION
- return VERSION;
- case 3: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(connectedToLecture_args.class, metaDataMap);
- }
-
- public connectedToLecture_args() {
- }
-
- public connectedToLecture_args(
- String id,
- String version,
- String token)
- {
- this();
- this.id = id;
- this.version = version;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public connectedToLecture_args(connectedToLecture_args other) {
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetVersion()) {
- this.version = other.version;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public connectedToLecture_args deepCopy() {
- return new connectedToLecture_args(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.version = null;
- this.token = null;
- }
-
- public String getId() {
- return this.id;
- }
-
- public connectedToLecture_args setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getVersion() {
- return this.version;
- }
-
- public connectedToLecture_args setVersion(String version) {
- this.version = version;
- return this;
- }
-
- public void unsetVersion() {
- this.version = null;
- }
-
- /** Returns true if field version is set (has been assigned a value) and false otherwise */
- public boolean isSetVersion() {
- return this.version != null;
- }
-
- public void setVersionIsSet(boolean value) {
- if (!value) {
- this.version = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public connectedToLecture_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case VERSION:
- if (value == null) {
- unsetVersion();
- } else {
- setVersion((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return getId();
-
- case VERSION:
- return getVersion();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ID:
- return isSetId();
- case VERSION:
- return isSetVersion();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof connectedToLecture_args)
- return this.equals((connectedToLecture_args)that);
- return false;
- }
-
- public boolean equals(connectedToLecture_args that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_version = true && this.isSetVersion();
- boolean that_present_version = true && that.isSetVersion();
- if (this_present_version || that_present_version) {
- if (!(this_present_version && that_present_version))
- return false;
- if (!this.version.equals(that.version))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(connectedToLecture_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetVersion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("connectedToLecture_args(");
- boolean first = true;
-
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("version:");
- if (this.version == null) {
- sb.append("null");
- } else {
- sb.append(this.version);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class connectedToLecture_argsStandardSchemeFactory implements SchemeFactory {
- public connectedToLecture_argsStandardScheme getScheme() {
- return new connectedToLecture_argsStandardScheme();
- }
- }
-
- private static class connectedToLecture_argsStandardScheme extends StandardScheme<connectedToLecture_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, connectedToLecture_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: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // VERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, connectedToLecture_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.version != null) {
- oprot.writeFieldBegin(VERSION_FIELD_DESC);
- oprot.writeString(struct.version);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class connectedToLecture_argsTupleSchemeFactory implements SchemeFactory {
- public connectedToLecture_argsTupleScheme getScheme() {
- return new connectedToLecture_argsTupleScheme();
- }
- }
-
- private static class connectedToLecture_argsTupleScheme extends TupleScheme<connectedToLecture_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, connectedToLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetId()) {
- optionals.set(0);
- }
- if (struct.isSetVersion()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetVersion()) {
- oprot.writeString(struct.version);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, connectedToLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.version = iprot.readString();
- struct.setVersionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class connectedToLecture_result implements org.apache.thrift.TBase<connectedToLecture_result, connectedToLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<connectedToLecture_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("connectedToLecture_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new connectedToLecture_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new connectedToLecture_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(connectedToLecture_result.class, metaDataMap);
- }
-
- public connectedToLecture_result() {
- }
-
- public connectedToLecture_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public connectedToLecture_result(connectedToLecture_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public connectedToLecture_result deepCopy() {
- return new connectedToLecture_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public connectedToLecture_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 connectedToLecture_result)
- return this.equals((connectedToLecture_result)that);
- return false;
- }
-
- public boolean equals(connectedToLecture_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(connectedToLecture_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("connectedToLecture_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 connectedToLecture_resultStandardSchemeFactory implements SchemeFactory {
- public connectedToLecture_resultStandardScheme getScheme() {
- return new connectedToLecture_resultStandardScheme();
- }
- }
-
- private static class connectedToLecture_resultStandardScheme extends StandardScheme<connectedToLecture_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, connectedToLecture_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, connectedToLecture_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 connectedToLecture_resultTupleSchemeFactory implements SchemeFactory {
- public connectedToLecture_resultTupleScheme getScheme() {
- return new connectedToLecture_resultTupleScheme();
- }
- }
-
- private static class connectedToLecture_resultTupleScheme extends TupleScheme<connectedToLecture_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, connectedToLecture_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, connectedToLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteLecture_args implements org.apache.thrift.TBase<deleteLecture_args, deleteLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLecture_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_args");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteLecture_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteLecture_argsTupleSchemeFactory());
- }
-
- public String id; // required
- public String token; // required
- public String university; // 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 {
- ID((short)1, "id"),
- TOKEN((short)2, "token"),
- UNIVERSITY((short)3, "university");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ID
- return ID;
- case 2: // TOKEN
- return TOKEN;
- case 3: // UNIVERSITY
- return UNIVERSITY;
- 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", 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(deleteLecture_args.class, metaDataMap);
- }
-
- public deleteLecture_args() {
- }
-
- public deleteLecture_args(
- String id,
- String token,
- String university)
- {
- this();
- this.id = id;
- this.token = token;
- this.university = university;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteLecture_args(deleteLecture_args other) {
- if (other.isSetId()) {
- this.id = other.id;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetUniversity()) {
- this.university = other.university;
- }
- }
-
- public deleteLecture_args deepCopy() {
- return new deleteLecture_args(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.token = null;
- this.university = null;
- }
-
- public String getId() {
- return this.id;
- }
-
- public deleteLecture_args setId(String id) {
- this.id = id;
- return this;
- }
-
- public void unsetId() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return this.id != null;
- }
-
- public void setIdIsSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public deleteLecture_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getUniversity() {
- return this.university;
- }
-
- public deleteLecture_args setUniversity(String university) {
- this.university = university;
- return this;
- }
-
- public void unsetUniversity() {
- this.university = null;
- }
-
- /** Returns true if field university is set (has been assigned a value) and false otherwise */
- public boolean isSetUniversity() {
- return this.university != null;
- }
-
- public void setUniversityIsSet(boolean value) {
- if (!value) {
- this.university = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case UNIVERSITY:
- if (value == null) {
- unsetUniversity();
- } else {
- setUniversity((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return getId();
-
- case TOKEN:
- return getToken();
-
- case UNIVERSITY:
- return getUniversity();
-
- }
- 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 ID:
- return isSetId();
- case TOKEN:
- return isSetToken();
- case UNIVERSITY:
- return isSetUniversity();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteLecture_args)
- return this.equals((deleteLecture_args)that);
- return false;
- }
-
- public boolean equals(deleteLecture_args that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.isSetId();
- boolean that_present_id = true && that.isSetId();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_university = true && this.isSetUniversity();
- boolean that_present_university = true && that.isSetUniversity();
- if (this_present_university || that_present_university) {
- if (!(this_present_university && that_present_university))
- return false;
- if (!this.university.equals(that.university))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteLecture_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUniversity()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteLecture_args(");
- boolean first = true;
-
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("university:");
- if (this.university == null) {
- sb.append("null");
- } else {
- sb.append(this.university);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteLecture_argsStandardSchemeFactory implements SchemeFactory {
- public deleteLecture_argsStandardScheme getScheme() {
- return new deleteLecture_argsStandardScheme();
- }
- }
-
- private static class deleteLecture_argsStandardScheme extends StandardScheme<deleteLecture_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // UNIVERSITY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(struct.id);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.university != null) {
- oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
- oprot.writeString(struct.university);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteLecture_argsTupleSchemeFactory implements SchemeFactory {
- public deleteLecture_argsTupleScheme getScheme() {
- return new deleteLecture_argsTupleScheme();
- }
- }
-
- private static class deleteLecture_argsTupleScheme extends TupleScheme<deleteLecture_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetId()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- if (struct.isSetUniversity()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetId()) {
- oprot.writeString(struct.id);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetUniversity()) {
- oprot.writeString(struct.university);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.id = iprot.readString();
- struct.setIdIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(2)) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteLecture_result implements org.apache.thrift.TBase<deleteLecture_result, deleteLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLecture_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteLecture_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteLecture_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_result.class, metaDataMap);
- }
-
- public deleteLecture_result() {
- }
-
- public deleteLecture_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteLecture_result(deleteLecture_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public deleteLecture_result deepCopy() {
- return new deleteLecture_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public deleteLecture_result setSuccess(boolean success) {
- this.success = success;
- setSuccessIsSet(true);
- return this;
- }
-
- public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
- }
-
- public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
- }
-
- public 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 deleteLecture_result)
- return this.equals((deleteLecture_result)that);
- return false;
- }
-
- public boolean equals(deleteLecture_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteLecture_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetSuccess()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteLecture_result(");
- boolean first = true;
-
- sb.append("success:");
- sb.append(this.success);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteLecture_resultStandardSchemeFactory implements SchemeFactory {
- public deleteLecture_resultStandardScheme getScheme() {
- return new deleteLecture_resultStandardScheme();
- }
- }
-
- private static class deleteLecture_resultStandardScheme extends StandardScheme<deleteLecture_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteLecture_resultTupleSchemeFactory implements SchemeFactory {
- public deleteLecture_resultTupleScheme getScheme() {
- return new deleteLecture_resultTupleScheme();
- }
- }
-
- private static class deleteLecture_resultTupleScheme extends TupleScheme<deleteLecture_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- oprot.writeBool(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class checkUser_args implements org.apache.thrift.TBase<checkUser_args, checkUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkUser_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkUser_args");
-
- private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new checkUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new checkUser_argsTupleSchemeFactory());
- }
-
- public String username; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USERNAME((short)1, "username"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USERNAME
- return USERNAME;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkUser_args.class, metaDataMap);
- }
-
- public checkUser_args() {
- }
-
- public checkUser_args(
- String username,
- String token)
- {
- this();
- this.username = username;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public checkUser_args(checkUser_args other) {
- if (other.isSetUsername()) {
- this.username = other.username;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public checkUser_args deepCopy() {
- return new checkUser_args(this);
- }
-
- @Override
- public void clear() {
- this.username = null;
- this.token = null;
- }
-
- public String getUsername() {
- return this.username;
- }
-
- public checkUser_args setUsername(String username) {
- this.username = username;
- return this;
- }
-
- public void unsetUsername() {
- this.username = null;
- }
-
- /** Returns true if field username is set (has been assigned a value) and false otherwise */
- public boolean isSetUsername() {
- return this.username != null;
- }
-
- public void setUsernameIsSet(boolean value) {
- if (!value) {
- this.username = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public checkUser_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USERNAME:
- if (value == null) {
- unsetUsername();
- } else {
- setUsername((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USERNAME:
- return getUsername();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USERNAME:
- return isSetUsername();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof checkUser_args)
- return this.equals((checkUser_args)that);
- return false;
- }
-
- public boolean equals(checkUser_args that) {
- if (that == null)
- return false;
-
- boolean this_present_username = true && this.isSetUsername();
- boolean that_present_username = true && that.isSetUsername();
- if (this_present_username || that_present_username) {
- if (!(this_present_username && that_present_username))
- return false;
- if (!this.username.equals(that.username))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(checkUser_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUsername()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("checkUser_args(");
- boolean first = true;
-
- sb.append("username:");
- if (this.username == null) {
- sb.append("null");
- } else {
- sb.append(this.username);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class checkUser_argsStandardSchemeFactory implements SchemeFactory {
- public checkUser_argsStandardScheme getScheme() {
- return new checkUser_argsStandardScheme();
- }
- }
-
- private static class checkUser_argsStandardScheme extends StandardScheme<checkUser_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, checkUser_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: // USERNAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, checkUser_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.username != null) {
- oprot.writeFieldBegin(USERNAME_FIELD_DESC);
- oprot.writeString(struct.username);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class checkUser_argsTupleSchemeFactory implements SchemeFactory {
- public checkUser_argsTupleScheme getScheme() {
- return new checkUser_argsTupleScheme();
- }
- }
-
- private static class checkUser_argsTupleScheme extends TupleScheme<checkUser_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, checkUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUsername()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUsername()) {
- oprot.writeString(struct.username);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, checkUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.username = iprot.readString();
- struct.setUsernameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class checkUser_result implements org.apache.thrift.TBase<checkUser_result, checkUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkUser_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("checkUser_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new checkUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new checkUser_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkUser_result.class, metaDataMap);
- }
-
- public checkUser_result() {
- }
-
- public checkUser_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public checkUser_result(checkUser_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public checkUser_result deepCopy() {
- return new checkUser_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public checkUser_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 checkUser_result)
- return this.equals((checkUser_result)that);
- return false;
- }
-
- public boolean equals(checkUser_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(checkUser_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("checkUser_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 checkUser_resultStandardSchemeFactory implements SchemeFactory {
- public checkUser_resultStandardScheme getScheme() {
- return new checkUser_resultStandardScheme();
- }
- }
-
- private static class checkUser_resultStandardScheme extends StandardScheme<checkUser_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, checkUser_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, checkUser_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 checkUser_resultTupleSchemeFactory implements SchemeFactory {
- public checkUser_resultTupleScheme getScheme() {
- return new checkUser_resultTupleScheme();
- }
- }
-
- private static class checkUser_resultTupleScheme extends TupleScheme<checkUser_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, checkUser_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, checkUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class createUser_args implements org.apache.thrift.TBase<createUser_args, createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createUser_argsTupleSchemeFactory());
- }
-
- public String token; // required
- public String university; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token"),
- UNIVERSITY((short)2, "university");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- case 2: // UNIVERSITY
- return UNIVERSITY;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", 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(createUser_args.class, metaDataMap);
- }
-
- public createUser_args() {
- }
-
- public createUser_args(
- String token,
- String university)
- {
- this();
- this.token = token;
- this.university = university;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public createUser_args(createUser_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetUniversity()) {
- this.university = other.university;
- }
- }
-
- public createUser_args deepCopy() {
- return new createUser_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- this.university = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public createUser_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getUniversity() {
- return this.university;
- }
-
- public createUser_args setUniversity(String university) {
- this.university = university;
- return this;
- }
-
- public void unsetUniversity() {
- this.university = null;
- }
-
- /** Returns true if field university is set (has been assigned a value) and false otherwise */
- public boolean isSetUniversity() {
- return this.university != null;
- }
-
- public void setUniversityIsSet(boolean value) {
- if (!value) {
- this.university = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case UNIVERSITY:
- if (value == null) {
- unsetUniversity();
- } else {
- setUniversity((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- case UNIVERSITY:
- return getUniversity();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- case UNIVERSITY:
- return isSetUniversity();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof createUser_args)
- return this.equals((createUser_args)that);
- return false;
- }
-
- public boolean equals(createUser_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_university = true && this.isSetUniversity();
- boolean that_present_university = true && that.isSetUniversity();
- if (this_present_university || that_present_university) {
- if (!(this_present_university && that_present_university))
- return false;
- if (!this.university.equals(that.university))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(createUser_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUniversity()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
- 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("createUser_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("university:");
- if (this.university == null) {
- sb.append("null");
- } else {
- sb.append(this.university);
- }
- 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 createUser_argsStandardSchemeFactory implements SchemeFactory {
- public createUser_argsStandardScheme getScheme() {
- return new createUser_argsStandardScheme();
- }
- }
-
- private static class createUser_argsStandardScheme extends StandardScheme<createUser_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, createUser_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // UNIVERSITY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(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, createUser_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.university != null) {
- oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
- oprot.writeString(struct.university);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class createUser_argsTupleSchemeFactory implements SchemeFactory {
- public createUser_argsTupleScheme getScheme() {
- return new createUser_argsTupleScheme();
- }
- }
-
- private static class createUser_argsTupleScheme extends TupleScheme<createUser_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, createUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- if (struct.isSetUniversity()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetUniversity()) {
- oprot.writeString(struct.university);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, createUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(1)) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- }
- }
- }
-
- }
-
- public static class createUser_result implements org.apache.thrift.TBase<createUser_result, createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createUser_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createUser_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
- }
-
- public createUser_result() {
- }
-
- public createUser_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public createUser_result(createUser_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public createUser_result deepCopy() {
- return new createUser_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public createUser_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 createUser_result)
- return this.equals((createUser_result)that);
- return false;
- }
-
- public boolean equals(createUser_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(createUser_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("createUser_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 createUser_resultStandardSchemeFactory implements SchemeFactory {
- public createUser_resultStandardScheme getScheme() {
- return new createUser_resultStandardScheme();
- }
- }
-
- private static class createUser_resultStandardScheme extends StandardScheme<createUser_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, createUser_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, createUser_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 createUser_resultTupleSchemeFactory implements SchemeFactory {
- public createUser_resultTupleScheme getScheme() {
- return new createUser_resultTupleScheme();
- }
- }
-
- private static class createUser_resultTupleScheme extends TupleScheme<createUser_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, createUser_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, createUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeImageRights_args implements org.apache.thrift.TBase<writeImageRights_args, writeImageRights_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeImageRights_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImageRights_args");
-
- private static final org.apache.thrift.protocol.TField IMAGENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imagename", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeImageRights_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeImageRights_argsTupleSchemeFactory());
- }
-
- public String imagename; // required
- public String token; // required
- public String role; // required
- public String university; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGENAME((short)1, "imagename"),
- TOKEN((short)2, "token"),
- ROLE((short)3, "role"),
- UNIVERSITY((short)4, "university"),
- USER_ID((short)5, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGENAME
- return IMAGENAME;
- case 2: // TOKEN
- return TOKEN;
- case 3: // ROLE
- return ROLE;
- case 4: // UNIVERSITY
- return UNIVERSITY;
- case 5: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.IMAGENAME, new org.apache.thrift.meta_data.FieldMetaData("imagename", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImageRights_args.class, metaDataMap);
- }
-
- public writeImageRights_args() {
- }
-
- public writeImageRights_args(
- String imagename,
- String token,
- String role,
- String university,
- String userID)
- {
- this();
- this.imagename = imagename;
- this.token = token;
- this.role = role;
- this.university = university;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeImageRights_args(writeImageRights_args other) {
- if (other.isSetImagename()) {
- this.imagename = other.imagename;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetRole()) {
- this.role = other.role;
- }
- if (other.isSetUniversity()) {
- this.university = other.university;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public writeImageRights_args deepCopy() {
- return new writeImageRights_args(this);
- }
-
- @Override
- public void clear() {
- this.imagename = null;
- this.token = null;
- this.role = null;
- this.university = null;
- this.userID = null;
- }
-
- public String getImagename() {
- return this.imagename;
- }
-
- public writeImageRights_args setImagename(String imagename) {
- this.imagename = imagename;
- return this;
- }
-
- public void unsetImagename() {
- this.imagename = null;
- }
-
- /** Returns true if field imagename is set (has been assigned a value) and false otherwise */
- public boolean isSetImagename() {
- return this.imagename != null;
- }
-
- public void setImagenameIsSet(boolean value) {
- if (!value) {
- this.imagename = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public writeImageRights_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getRole() {
- return this.role;
- }
-
- public writeImageRights_args setRole(String role) {
- this.role = role;
- return this;
- }
-
- public void unsetRole() {
- this.role = null;
- }
-
- /** Returns true if field role is set (has been assigned a value) and false otherwise */
- public boolean isSetRole() {
- return this.role != null;
- }
-
- public void setRoleIsSet(boolean value) {
- if (!value) {
- this.role = null;
- }
- }
-
- public String getUniversity() {
- return this.university;
- }
-
- public writeImageRights_args setUniversity(String university) {
- this.university = university;
- return this;
- }
-
- public void unsetUniversity() {
- this.university = null;
- }
-
- /** Returns true if field university is set (has been assigned a value) and false otherwise */
- public boolean isSetUniversity() {
- return this.university != null;
- }
-
- public void setUniversityIsSet(boolean value) {
- if (!value) {
- this.university = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public writeImageRights_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGENAME:
- if (value == null) {
- unsetImagename();
- } else {
- setImagename((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case ROLE:
- if (value == null) {
- unsetRole();
- } else {
- setRole((String)value);
- }
- break;
-
- case UNIVERSITY:
- if (value == null) {
- unsetUniversity();
- } else {
- setUniversity((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGENAME:
- return getImagename();
-
- case TOKEN:
- return getToken();
-
- case ROLE:
- return getRole();
-
- case UNIVERSITY:
- return getUniversity();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGENAME:
- return isSetImagename();
- case TOKEN:
- return isSetToken();
- case ROLE:
- return isSetRole();
- case UNIVERSITY:
- return isSetUniversity();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof writeImageRights_args)
- return this.equals((writeImageRights_args)that);
- return false;
- }
-
- public boolean equals(writeImageRights_args that) {
- if (that == null)
- return false;
-
- boolean this_present_imagename = true && this.isSetImagename();
- boolean that_present_imagename = true && that.isSetImagename();
- if (this_present_imagename || that_present_imagename) {
- if (!(this_present_imagename && that_present_imagename))
- return false;
- if (!this.imagename.equals(that.imagename))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_role = true && this.isSetRole();
- boolean that_present_role = true && that.isSetRole();
- if (this_present_role || that_present_role) {
- if (!(this_present_role && that_present_role))
- return false;
- if (!this.role.equals(that.role))
- return false;
- }
-
- boolean this_present_university = true && this.isSetUniversity();
- boolean that_present_university = true && that.isSetUniversity();
- if (this_present_university || that_present_university) {
- if (!(this_present_university && that_present_university))
- return false;
- if (!this.university.equals(that.university))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(writeImageRights_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImagename()).compareTo(other.isSetImagename());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImagename()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagename, other.imagename);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRole()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUniversity()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeImageRights_args(");
- boolean first = true;
-
- sb.append("imagename:");
- if (this.imagename == null) {
- sb.append("null");
- } else {
- sb.append(this.imagename);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("role:");
- if (this.role == null) {
- sb.append("null");
- } else {
- sb.append(this.role);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("university:");
- if (this.university == null) {
- sb.append("null");
- } else {
- sb.append(this.university);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class writeImageRights_argsStandardSchemeFactory implements SchemeFactory {
- public writeImageRights_argsStandardScheme getScheme() {
- return new writeImageRights_argsStandardScheme();
- }
- }
-
- private static class writeImageRights_argsStandardScheme extends StandardScheme<writeImageRights_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeImageRights_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: // IMAGENAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // ROLE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.role = iprot.readString();
- struct.setRoleIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // UNIVERSITY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, writeImageRights_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.imagename != null) {
- oprot.writeFieldBegin(IMAGENAME_FIELD_DESC);
- oprot.writeString(struct.imagename);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.role != null) {
- oprot.writeFieldBegin(ROLE_FIELD_DESC);
- oprot.writeString(struct.role);
- oprot.writeFieldEnd();
- }
- if (struct.university != null) {
- oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
- oprot.writeString(struct.university);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class writeImageRights_argsTupleSchemeFactory implements SchemeFactory {
- public writeImageRights_argsTupleScheme getScheme() {
- return new writeImageRights_argsTupleScheme();
- }
- }
-
- private static class writeImageRights_argsTupleScheme extends TupleScheme<writeImageRights_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeImageRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImagename()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- if (struct.isSetRole()) {
- optionals.set(2);
- }
- if (struct.isSetUniversity()) {
- optionals.set(3);
- }
- if (struct.isSetUserID()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetImagename()) {
- oprot.writeString(struct.imagename);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetRole()) {
- oprot.writeString(struct.role);
- }
- if (struct.isSetUniversity()) {
- oprot.writeString(struct.university);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, writeImageRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.imagename = iprot.readString();
- struct.setImagenameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(2)) {
- struct.role = iprot.readString();
- struct.setRoleIsSet(true);
- }
- if (incoming.get(3)) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- }
- if (incoming.get(4)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeImageRights_result implements org.apache.thrift.TBase<writeImageRights_result, writeImageRights_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeImageRights_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImageRights_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeImageRights_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeImageRights_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImageRights_result.class, metaDataMap);
- }
-
- public writeImageRights_result() {
- }
-
- public writeImageRights_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeImageRights_result(writeImageRights_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public writeImageRights_result deepCopy() {
- return new writeImageRights_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public writeImageRights_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 writeImageRights_result)
- return this.equals((writeImageRights_result)that);
- return false;
- }
-
- public boolean equals(writeImageRights_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(writeImageRights_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("writeImageRights_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 writeImageRights_resultStandardSchemeFactory implements SchemeFactory {
- public writeImageRights_resultStandardScheme getScheme() {
- return new writeImageRights_resultStandardScheme();
- }
- }
-
- private static class writeImageRights_resultStandardScheme extends StandardScheme<writeImageRights_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeImageRights_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, writeImageRights_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 writeImageRights_resultTupleSchemeFactory implements SchemeFactory {
- public writeImageRights_resultTupleScheme getScheme() {
- return new writeImageRights_resultTupleScheme();
- }
- }
-
- private static class writeImageRights_resultTupleScheme extends TupleScheme<writeImageRights_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeImageRights_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, writeImageRights_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeAdditionalImageRights_args implements org.apache.thrift.TBase<writeAdditionalImageRights_args, writeAdditionalImageRights_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeAdditionalImageRights_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeAdditionalImageRights_args");
-
- private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField IS_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("isRead", org.apache.thrift.protocol.TType.BOOL, (short)3);
- private static final org.apache.thrift.protocol.TField IS_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("isWrite", org.apache.thrift.protocol.TType.BOOL, (short)4);
- private static final org.apache.thrift.protocol.TField IS_LINK_ALLOWED_FIELD_DESC = new org.apache.thrift.protocol.TField("isLinkAllowed", org.apache.thrift.protocol.TType.BOOL, (short)5);
- private static final org.apache.thrift.protocol.TField IS_ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("isAdmin", org.apache.thrift.protocol.TType.BOOL, (short)6);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)7);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeAdditionalImageRights_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeAdditionalImageRights_argsTupleSchemeFactory());
- }
-
- public String imageName; // required
- public String userID; // required
- public boolean isRead; // required
- public boolean isWrite; // required
- public boolean isLinkAllowed; // required
- public boolean isAdmin; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGE_NAME((short)1, "imageName"),
- USER_ID((short)2, "userID"),
- IS_READ((short)3, "isRead"),
- IS_WRITE((short)4, "isWrite"),
- IS_LINK_ALLOWED((short)5, "isLinkAllowed"),
- IS_ADMIN((short)6, "isAdmin"),
- TOKEN((short)7, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGE_NAME
- return IMAGE_NAME;
- case 2: // USER_ID
- return USER_ID;
- case 3: // IS_READ
- return IS_READ;
- case 4: // IS_WRITE
- return IS_WRITE;
- case 5: // IS_LINK_ALLOWED
- return IS_LINK_ALLOWED;
- case 6: // IS_ADMIN
- return IS_ADMIN;
- case 7: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ISREAD_ISSET_ID = 0;
- private static final int __ISWRITE_ISSET_ID = 1;
- private static final int __ISLINKALLOWED_ISSET_ID = 2;
- private static final int __ISADMIN_ISSET_ID = 3;
- 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.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_READ, new org.apache.thrift.meta_data.FieldMetaData("isRead", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IS_WRITE, new org.apache.thrift.meta_data.FieldMetaData("isWrite", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IS_LINK_ALLOWED, new org.apache.thrift.meta_data.FieldMetaData("isLinkAllowed", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IS_ADMIN, new org.apache.thrift.meta_data.FieldMetaData("isAdmin", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeAdditionalImageRights_args.class, metaDataMap);
- }
-
- public writeAdditionalImageRights_args() {
- }
-
- public writeAdditionalImageRights_args(
- String imageName,
- String userID,
- boolean isRead,
- boolean isWrite,
- boolean isLinkAllowed,
- boolean isAdmin,
- String token)
- {
- this();
- this.imageName = imageName;
- this.userID = userID;
- this.isRead = isRead;
- setIsReadIsSet(true);
- this.isWrite = isWrite;
- setIsWriteIsSet(true);
- this.isLinkAllowed = isLinkAllowed;
- setIsLinkAllowedIsSet(true);
- this.isAdmin = isAdmin;
- setIsAdminIsSet(true);
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeAdditionalImageRights_args(writeAdditionalImageRights_args other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetImageName()) {
- this.imageName = other.imageName;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- this.isRead = other.isRead;
- this.isWrite = other.isWrite;
- this.isLinkAllowed = other.isLinkAllowed;
- this.isAdmin = other.isAdmin;
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public writeAdditionalImageRights_args deepCopy() {
- return new writeAdditionalImageRights_args(this);
- }
-
- @Override
- public void clear() {
- this.imageName = null;
- this.userID = null;
- setIsReadIsSet(false);
- this.isRead = false;
- setIsWriteIsSet(false);
- this.isWrite = false;
- setIsLinkAllowedIsSet(false);
- this.isLinkAllowed = false;
- setIsAdminIsSet(false);
- this.isAdmin = false;
- this.token = null;
- }
-
- public String getImageName() {
- return this.imageName;
- }
-
- public writeAdditionalImageRights_args setImageName(String imageName) {
- this.imageName = imageName;
- return this;
- }
-
- public void unsetImageName() {
- this.imageName = null;
- }
-
- /** Returns true if field imageName is set (has been assigned a value) and false otherwise */
- public boolean isSetImageName() {
- return this.imageName != null;
- }
-
- public void setImageNameIsSet(boolean value) {
- if (!value) {
- this.imageName = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public writeAdditionalImageRights_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public boolean isIsRead() {
- return this.isRead;
- }
-
- public writeAdditionalImageRights_args setIsRead(boolean isRead) {
- this.isRead = isRead;
- setIsReadIsSet(true);
- return this;
- }
-
- public void unsetIsRead() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISREAD_ISSET_ID);
- }
-
- /** Returns true if field isRead is set (has been assigned a value) and false otherwise */
- public boolean isSetIsRead() {
- return EncodingUtils.testBit(__isset_bitfield, __ISREAD_ISSET_ID);
- }
-
- public void setIsReadIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISREAD_ISSET_ID, value);
- }
-
- public boolean isIsWrite() {
- return this.isWrite;
- }
-
- public writeAdditionalImageRights_args setIsWrite(boolean isWrite) {
- this.isWrite = isWrite;
- setIsWriteIsSet(true);
- return this;
- }
-
- public void unsetIsWrite() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISWRITE_ISSET_ID);
- }
-
- /** Returns true if field isWrite is set (has been assigned a value) and false otherwise */
- public boolean isSetIsWrite() {
- return EncodingUtils.testBit(__isset_bitfield, __ISWRITE_ISSET_ID);
- }
-
- public void setIsWriteIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISWRITE_ISSET_ID, value);
- }
-
- public boolean isIsLinkAllowed() {
- return this.isLinkAllowed;
- }
-
- public writeAdditionalImageRights_args setIsLinkAllowed(boolean isLinkAllowed) {
- this.isLinkAllowed = isLinkAllowed;
- setIsLinkAllowedIsSet(true);
- return this;
- }
-
- public void unsetIsLinkAllowed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISLINKALLOWED_ISSET_ID);
- }
-
- /** Returns true if field isLinkAllowed is set (has been assigned a value) and false otherwise */
- public boolean isSetIsLinkAllowed() {
- return EncodingUtils.testBit(__isset_bitfield, __ISLINKALLOWED_ISSET_ID);
- }
-
- public void setIsLinkAllowedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISLINKALLOWED_ISSET_ID, value);
- }
-
- public boolean isIsAdmin() {
- return this.isAdmin;
- }
-
- public writeAdditionalImageRights_args setIsAdmin(boolean isAdmin) {
- this.isAdmin = isAdmin;
- setIsAdminIsSet(true);
- return this;
- }
-
- public void unsetIsAdmin() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISADMIN_ISSET_ID);
- }
-
- /** Returns true if field isAdmin is set (has been assigned a value) and false otherwise */
- public boolean isSetIsAdmin() {
- return EncodingUtils.testBit(__isset_bitfield, __ISADMIN_ISSET_ID);
- }
-
- public void setIsAdminIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISADMIN_ISSET_ID, value);
- }
-
- public String getToken() {
- return this.token;
- }
-
- public writeAdditionalImageRights_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGE_NAME:
- if (value == null) {
- unsetImageName();
- } else {
- setImageName((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case IS_READ:
- if (value == null) {
- unsetIsRead();
- } else {
- setIsRead((Boolean)value);
- }
- break;
-
- case IS_WRITE:
- if (value == null) {
- unsetIsWrite();
- } else {
- setIsWrite((Boolean)value);
- }
- break;
-
- case IS_LINK_ALLOWED:
- if (value == null) {
- unsetIsLinkAllowed();
- } else {
- setIsLinkAllowed((Boolean)value);
- }
- break;
-
- case IS_ADMIN:
- if (value == null) {
- unsetIsAdmin();
- } else {
- setIsAdmin((Boolean)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGE_NAME:
- return getImageName();
-
- case USER_ID:
- return getUserID();
-
- case IS_READ:
- return Boolean.valueOf(isIsRead());
-
- case IS_WRITE:
- return Boolean.valueOf(isIsWrite());
-
- case IS_LINK_ALLOWED:
- return Boolean.valueOf(isIsLinkAllowed());
-
- case IS_ADMIN:
- return Boolean.valueOf(isIsAdmin());
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGE_NAME:
- return isSetImageName();
- case USER_ID:
- return isSetUserID();
- case IS_READ:
- return isSetIsRead();
- case IS_WRITE:
- return isSetIsWrite();
- case IS_LINK_ALLOWED:
- return isSetIsLinkAllowed();
- case IS_ADMIN:
- return isSetIsAdmin();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof writeAdditionalImageRights_args)
- return this.equals((writeAdditionalImageRights_args)that);
- return false;
- }
-
- public boolean equals(writeAdditionalImageRights_args that) {
- if (that == null)
- return false;
-
- boolean this_present_imageName = true && this.isSetImageName();
- boolean that_present_imageName = true && that.isSetImageName();
- if (this_present_imageName || that_present_imageName) {
- if (!(this_present_imageName && that_present_imageName))
- return false;
- if (!this.imageName.equals(that.imageName))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_isRead = true;
- boolean that_present_isRead = true;
- if (this_present_isRead || that_present_isRead) {
- if (!(this_present_isRead && that_present_isRead))
- return false;
- if (this.isRead != that.isRead)
- return false;
- }
-
- boolean this_present_isWrite = true;
- boolean that_present_isWrite = true;
- if (this_present_isWrite || that_present_isWrite) {
- if (!(this_present_isWrite && that_present_isWrite))
- return false;
- if (this.isWrite != that.isWrite)
- return false;
- }
-
- boolean this_present_isLinkAllowed = true;
- boolean that_present_isLinkAllowed = true;
- if (this_present_isLinkAllowed || that_present_isLinkAllowed) {
- if (!(this_present_isLinkAllowed && that_present_isLinkAllowed))
- return false;
- if (this.isLinkAllowed != that.isLinkAllowed)
- return false;
- }
-
- boolean this_present_isAdmin = true;
- boolean that_present_isAdmin = true;
- if (this_present_isAdmin || that_present_isAdmin) {
- if (!(this_present_isAdmin && that_present_isAdmin))
- return false;
- if (this.isAdmin != that.isAdmin)
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(writeAdditionalImageRights_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsRead()).compareTo(other.isSetIsRead());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsRead()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRead, other.isRead);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsWrite()).compareTo(other.isSetIsWrite());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsWrite()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isWrite, other.isWrite);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsLinkAllowed()).compareTo(other.isSetIsLinkAllowed());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsLinkAllowed()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isLinkAllowed, other.isLinkAllowed);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsAdmin()).compareTo(other.isSetIsAdmin());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsAdmin()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAdmin, other.isAdmin);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeAdditionalImageRights_args(");
- boolean first = true;
-
- sb.append("imageName:");
- if (this.imageName == null) {
- sb.append("null");
- } else {
- sb.append(this.imageName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isRead:");
- sb.append(this.isRead);
- first = false;
- if (!first) sb.append(", ");
- sb.append("isWrite:");
- sb.append(this.isWrite);
- first = false;
- if (!first) sb.append(", ");
- sb.append("isLinkAllowed:");
- sb.append(this.isLinkAllowed);
- first = false;
- if (!first) sb.append(", ");
- sb.append("isAdmin:");
- sb.append(this.isAdmin);
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // 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 writeAdditionalImageRights_argsStandardSchemeFactory implements SchemeFactory {
- public writeAdditionalImageRights_argsStandardScheme getScheme() {
- return new writeAdditionalImageRights_argsStandardScheme();
- }
- }
-
- private static class writeAdditionalImageRights_argsStandardScheme extends StandardScheme<writeAdditionalImageRights_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeAdditionalImageRights_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: // IMAGE_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageName = iprot.readString();
- struct.setImageNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // IS_READ
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isRead = iprot.readBool();
- struct.setIsReadIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // IS_WRITE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isWrite = iprot.readBool();
- struct.setIsWriteIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // IS_LINK_ALLOWED
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isLinkAllowed = iprot.readBool();
- struct.setIsLinkAllowedIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // IS_ADMIN
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isAdmin = iprot.readBool();
- struct.setIsAdminIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, writeAdditionalImageRights_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.imageName != null) {
- oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
- oprot.writeString(struct.imageName);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(IS_READ_FIELD_DESC);
- oprot.writeBool(struct.isRead);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IS_WRITE_FIELD_DESC);
- oprot.writeBool(struct.isWrite);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IS_LINK_ALLOWED_FIELD_DESC);
- oprot.writeBool(struct.isLinkAllowed);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IS_ADMIN_FIELD_DESC);
- oprot.writeBool(struct.isAdmin);
- oprot.writeFieldEnd();
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class writeAdditionalImageRights_argsTupleSchemeFactory implements SchemeFactory {
- public writeAdditionalImageRights_argsTupleScheme getScheme() {
- return new writeAdditionalImageRights_argsTupleScheme();
- }
- }
-
- private static class writeAdditionalImageRights_argsTupleScheme extends TupleScheme<writeAdditionalImageRights_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeAdditionalImageRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImageName()) {
- optionals.set(0);
- }
- if (struct.isSetUserID()) {
- optionals.set(1);
- }
- if (struct.isSetIsRead()) {
- optionals.set(2);
- }
- if (struct.isSetIsWrite()) {
- optionals.set(3);
- }
- if (struct.isSetIsLinkAllowed()) {
- optionals.set(4);
- }
- if (struct.isSetIsAdmin()) {
- optionals.set(5);
- }
- if (struct.isSetToken()) {
- optionals.set(6);
- }
- oprot.writeBitSet(optionals, 7);
- if (struct.isSetImageName()) {
- oprot.writeString(struct.imageName);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetIsRead()) {
- oprot.writeBool(struct.isRead);
- }
- if (struct.isSetIsWrite()) {
- oprot.writeBool(struct.isWrite);
- }
- if (struct.isSetIsLinkAllowed()) {
- oprot.writeBool(struct.isLinkAllowed);
- }
- if (struct.isSetIsAdmin()) {
- oprot.writeBool(struct.isAdmin);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, writeAdditionalImageRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
- if (incoming.get(0)) {
- struct.imageName = iprot.readString();
- struct.setImageNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(2)) {
- struct.isRead = iprot.readBool();
- struct.setIsReadIsSet(true);
- }
- if (incoming.get(3)) {
- struct.isWrite = iprot.readBool();
- struct.setIsWriteIsSet(true);
- }
- if (incoming.get(4)) {
- struct.isLinkAllowed = iprot.readBool();
- struct.setIsLinkAllowedIsSet(true);
- }
- if (incoming.get(5)) {
- struct.isAdmin = iprot.readBool();
- struct.setIsAdminIsSet(true);
- }
- if (incoming.get(6)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeAdditionalImageRights_result implements org.apache.thrift.TBase<writeAdditionalImageRights_result, writeAdditionalImageRights_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeAdditionalImageRights_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeAdditionalImageRights_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeAdditionalImageRights_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeAdditionalImageRights_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeAdditionalImageRights_result.class, metaDataMap);
- }
-
- public writeAdditionalImageRights_result() {
- }
-
- public writeAdditionalImageRights_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeAdditionalImageRights_result(writeAdditionalImageRights_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public writeAdditionalImageRights_result deepCopy() {
- return new writeAdditionalImageRights_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public writeAdditionalImageRights_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 writeAdditionalImageRights_result)
- return this.equals((writeAdditionalImageRights_result)that);
- return false;
- }
-
- public boolean equals(writeAdditionalImageRights_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(writeAdditionalImageRights_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("writeAdditionalImageRights_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 writeAdditionalImageRights_resultStandardSchemeFactory implements SchemeFactory {
- public writeAdditionalImageRights_resultStandardScheme getScheme() {
- return new writeAdditionalImageRights_resultStandardScheme();
- }
- }
-
- private static class writeAdditionalImageRights_resultStandardScheme extends StandardScheme<writeAdditionalImageRights_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeAdditionalImageRights_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, writeAdditionalImageRights_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 writeAdditionalImageRights_resultTupleSchemeFactory implements SchemeFactory {
- public writeAdditionalImageRights_resultTupleScheme getScheme() {
- return new writeAdditionalImageRights_resultTupleScheme();
- }
- }
-
- private static class writeAdditionalImageRights_resultTupleScheme extends TupleScheme<writeAdditionalImageRights_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeAdditionalImageRights_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, writeAdditionalImageRights_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeLectureRights_args implements org.apache.thrift.TBase<writeLectureRights_args, writeLectureRights_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeLectureRights_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLectureRights_args");
-
- private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField UNIVERSITY_FIELD_DESC = new org.apache.thrift.protocol.TField("university", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeLectureRights_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeLectureRights_argsTupleSchemeFactory());
- }
-
- public String lectureID; // required
- public String role; // required
- public String token; // required
- public String university; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- LECTURE_ID((short)1, "lectureID"),
- ROLE((short)2, "role"),
- TOKEN((short)3, "token"),
- UNIVERSITY((short)4, "university"),
- USER_ID((short)5, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // LECTURE_ID
- return LECTURE_ID;
- case 2: // ROLE
- return ROLE;
- case 3: // TOKEN
- return TOKEN;
- case 4: // UNIVERSITY
- return UNIVERSITY;
- case 5: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.UNIVERSITY, new org.apache.thrift.meta_data.FieldMetaData("university", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLectureRights_args.class, metaDataMap);
- }
-
- public writeLectureRights_args() {
- }
-
- public writeLectureRights_args(
- String lectureID,
- String role,
- String token,
- String university,
- String userID)
- {
- this();
- this.lectureID = lectureID;
- this.role = role;
- this.token = token;
- this.university = university;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeLectureRights_args(writeLectureRights_args other) {
- if (other.isSetLectureID()) {
- this.lectureID = other.lectureID;
- }
- if (other.isSetRole()) {
- this.role = other.role;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetUniversity()) {
- this.university = other.university;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public writeLectureRights_args deepCopy() {
- return new writeLectureRights_args(this);
- }
-
- @Override
- public void clear() {
- this.lectureID = null;
- this.role = null;
- this.token = null;
- this.university = null;
- this.userID = null;
- }
-
- public String getLectureID() {
- return this.lectureID;
- }
-
- public writeLectureRights_args setLectureID(String lectureID) {
- this.lectureID = lectureID;
- return this;
- }
-
- public void unsetLectureID() {
- this.lectureID = null;
- }
-
- /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureID() {
- return this.lectureID != null;
- }
-
- public void setLectureIDIsSet(boolean value) {
- if (!value) {
- this.lectureID = null;
- }
- }
-
- public String getRole() {
- return this.role;
- }
-
- public writeLectureRights_args setRole(String role) {
- this.role = role;
- return this;
- }
-
- public void unsetRole() {
- this.role = null;
- }
-
- /** Returns true if field role is set (has been assigned a value) and false otherwise */
- public boolean isSetRole() {
- return this.role != null;
- }
-
- public void setRoleIsSet(boolean value) {
- if (!value) {
- this.role = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public writeLectureRights_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getUniversity() {
- return this.university;
- }
-
- public writeLectureRights_args setUniversity(String university) {
- this.university = university;
- return this;
- }
-
- public void unsetUniversity() {
- this.university = null;
- }
-
- /** Returns true if field university is set (has been assigned a value) and false otherwise */
- public boolean isSetUniversity() {
- return this.university != null;
- }
-
- public void setUniversityIsSet(boolean value) {
- if (!value) {
- this.university = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public writeLectureRights_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LECTURE_ID:
- if (value == null) {
- unsetLectureID();
- } else {
- setLectureID((String)value);
- }
- break;
-
- case ROLE:
- if (value == null) {
- unsetRole();
- } else {
- setRole((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case UNIVERSITY:
- if (value == null) {
- unsetUniversity();
- } else {
- setUniversity((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LECTURE_ID:
- return getLectureID();
-
- case ROLE:
- return getRole();
-
- case TOKEN:
- return getToken();
-
- case UNIVERSITY:
- return getUniversity();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case LECTURE_ID:
- return isSetLectureID();
- case ROLE:
- return isSetRole();
- case TOKEN:
- return isSetToken();
- case UNIVERSITY:
- return isSetUniversity();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof writeLectureRights_args)
- return this.equals((writeLectureRights_args)that);
- return false;
- }
-
- public boolean equals(writeLectureRights_args that) {
- if (that == null)
- return false;
-
- boolean this_present_lectureID = true && this.isSetLectureID();
- boolean that_present_lectureID = true && that.isSetLectureID();
- if (this_present_lectureID || that_present_lectureID) {
- if (!(this_present_lectureID && that_present_lectureID))
- return false;
- if (!this.lectureID.equals(that.lectureID))
- return false;
- }
-
- boolean this_present_role = true && this.isSetRole();
- boolean that_present_role = true && that.isSetRole();
- if (this_present_role || that_present_role) {
- if (!(this_present_role && that_present_role))
- return false;
- if (!this.role.equals(that.role))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_university = true && this.isSetUniversity();
- boolean that_present_university = true && that.isSetUniversity();
- if (this_present_university || that_present_university) {
- if (!(this_present_university && that_present_university))
- return false;
- if (!this.university.equals(that.university))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(writeLectureRights_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRole()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUniversity()).compareTo(other.isSetUniversity());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUniversity()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.university, other.university);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeLectureRights_args(");
- boolean first = true;
-
- sb.append("lectureID:");
- if (this.lectureID == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("role:");
- if (this.role == null) {
- sb.append("null");
- } else {
- sb.append(this.role);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("university:");
- if (this.university == null) {
- sb.append("null");
- } else {
- sb.append(this.university);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class writeLectureRights_argsStandardSchemeFactory implements SchemeFactory {
- public writeLectureRights_argsStandardScheme getScheme() {
- return new writeLectureRights_argsStandardScheme();
- }
- }
-
- private static class writeLectureRights_argsStandardScheme extends StandardScheme<writeLectureRights_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeLectureRights_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: // LECTURE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ROLE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.role = iprot.readString();
- struct.setRoleIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // UNIVERSITY
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, writeLectureRights_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.lectureID != null) {
- oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
- oprot.writeString(struct.lectureID);
- oprot.writeFieldEnd();
- }
- if (struct.role != null) {
- oprot.writeFieldBegin(ROLE_FIELD_DESC);
- oprot.writeString(struct.role);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.university != null) {
- oprot.writeFieldBegin(UNIVERSITY_FIELD_DESC);
- oprot.writeString(struct.university);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class writeLectureRights_argsTupleSchemeFactory implements SchemeFactory {
- public writeLectureRights_argsTupleScheme getScheme() {
- return new writeLectureRights_argsTupleScheme();
- }
- }
-
- private static class writeLectureRights_argsTupleScheme extends TupleScheme<writeLectureRights_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeLectureRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetLectureID()) {
- optionals.set(0);
- }
- if (struct.isSetRole()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- if (struct.isSetUniversity()) {
- optionals.set(3);
- }
- if (struct.isSetUserID()) {
- optionals.set(4);
- }
- oprot.writeBitSet(optionals, 5);
- if (struct.isSetLectureID()) {
- oprot.writeString(struct.lectureID);
- }
- if (struct.isSetRole()) {
- oprot.writeString(struct.role);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetUniversity()) {
- oprot.writeString(struct.university);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, writeLectureRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
- if (incoming.get(0)) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.role = iprot.readString();
- struct.setRoleIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(3)) {
- struct.university = iprot.readString();
- struct.setUniversityIsSet(true);
- }
- if (incoming.get(4)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeLectureRights_result implements org.apache.thrift.TBase<writeLectureRights_result, writeLectureRights_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeLectureRights_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLectureRights_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeLectureRights_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeLectureRights_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLectureRights_result.class, metaDataMap);
- }
-
- public writeLectureRights_result() {
- }
-
- public writeLectureRights_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeLectureRights_result(writeLectureRights_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public writeLectureRights_result deepCopy() {
- return new writeLectureRights_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public writeLectureRights_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 writeLectureRights_result)
- return this.equals((writeLectureRights_result)that);
- return false;
- }
-
- public boolean equals(writeLectureRights_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(writeLectureRights_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("writeLectureRights_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 writeLectureRights_resultStandardSchemeFactory implements SchemeFactory {
- public writeLectureRights_resultStandardScheme getScheme() {
- return new writeLectureRights_resultStandardScheme();
- }
- }
-
- private static class writeLectureRights_resultStandardScheme extends StandardScheme<writeLectureRights_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeLectureRights_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, writeLectureRights_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 writeLectureRights_resultTupleSchemeFactory implements SchemeFactory {
- public writeLectureRights_resultTupleScheme getScheme() {
- return new writeLectureRights_resultTupleScheme();
- }
- }
-
- private static class writeLectureRights_resultTupleScheme extends TupleScheme<writeLectureRights_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeLectureRights_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, writeLectureRights_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeAdditionalLectureRights_args implements org.apache.thrift.TBase<writeAdditionalLectureRights_args, writeAdditionalLectureRights_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeAdditionalLectureRights_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeAdditionalLectureRights_args");
-
- private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField IS_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("isRead", org.apache.thrift.protocol.TType.BOOL, (short)3);
- private static final org.apache.thrift.protocol.TField IS_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("isWrite", org.apache.thrift.protocol.TType.BOOL, (short)4);
- private static final org.apache.thrift.protocol.TField IS_ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("isAdmin", org.apache.thrift.protocol.TType.BOOL, (short)5);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)6);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeAdditionalLectureRights_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeAdditionalLectureRights_argsTupleSchemeFactory());
- }
-
- public String lectureName; // required
- public String userID; // required
- public boolean isRead; // required
- public boolean isWrite; // required
- public boolean isAdmin; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- LECTURE_NAME((short)1, "lectureName"),
- USER_ID((short)2, "userID"),
- IS_READ((short)3, "isRead"),
- IS_WRITE((short)4, "isWrite"),
- IS_ADMIN((short)5, "isAdmin"),
- TOKEN((short)6, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // LECTURE_NAME
- return LECTURE_NAME;
- case 2: // USER_ID
- return USER_ID;
- case 3: // IS_READ
- return IS_READ;
- case 4: // IS_WRITE
- return IS_WRITE;
- case 5: // IS_ADMIN
- return IS_ADMIN;
- case 6: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ISREAD_ISSET_ID = 0;
- private static final int __ISWRITE_ISSET_ID = 1;
- private static final int __ISADMIN_ISSET_ID = 2;
- 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.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IS_READ, new org.apache.thrift.meta_data.FieldMetaData("isRead", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IS_WRITE, new org.apache.thrift.meta_data.FieldMetaData("isWrite", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.IS_ADMIN, new org.apache.thrift.meta_data.FieldMetaData("isAdmin", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeAdditionalLectureRights_args.class, metaDataMap);
- }
-
- public writeAdditionalLectureRights_args() {
- }
-
- public writeAdditionalLectureRights_args(
- String lectureName,
- String userID,
- boolean isRead,
- boolean isWrite,
- boolean isAdmin,
- String token)
- {
- this();
- this.lectureName = lectureName;
- this.userID = userID;
- this.isRead = isRead;
- setIsReadIsSet(true);
- this.isWrite = isWrite;
- setIsWriteIsSet(true);
- this.isAdmin = isAdmin;
- setIsAdminIsSet(true);
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeAdditionalLectureRights_args(writeAdditionalLectureRights_args other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetLectureName()) {
- this.lectureName = other.lectureName;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- this.isRead = other.isRead;
- this.isWrite = other.isWrite;
- this.isAdmin = other.isAdmin;
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public writeAdditionalLectureRights_args deepCopy() {
- return new writeAdditionalLectureRights_args(this);
- }
-
- @Override
- public void clear() {
- this.lectureName = null;
- this.userID = null;
- setIsReadIsSet(false);
- this.isRead = false;
- setIsWriteIsSet(false);
- this.isWrite = false;
- setIsAdminIsSet(false);
- this.isAdmin = false;
- this.token = null;
- }
-
- public String getLectureName() {
- return this.lectureName;
- }
-
- public writeAdditionalLectureRights_args setLectureName(String lectureName) {
- this.lectureName = lectureName;
- return this;
- }
-
- public void unsetLectureName() {
- this.lectureName = null;
- }
-
- /** Returns true if field lectureName is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureName() {
- return this.lectureName != null;
- }
-
- public void setLectureNameIsSet(boolean value) {
- if (!value) {
- this.lectureName = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public writeAdditionalLectureRights_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public boolean isIsRead() {
- return this.isRead;
- }
-
- public writeAdditionalLectureRights_args setIsRead(boolean isRead) {
- this.isRead = isRead;
- setIsReadIsSet(true);
- return this;
- }
-
- public void unsetIsRead() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISREAD_ISSET_ID);
- }
-
- /** Returns true if field isRead is set (has been assigned a value) and false otherwise */
- public boolean isSetIsRead() {
- return EncodingUtils.testBit(__isset_bitfield, __ISREAD_ISSET_ID);
- }
-
- public void setIsReadIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISREAD_ISSET_ID, value);
- }
-
- public boolean isIsWrite() {
- return this.isWrite;
- }
-
- public writeAdditionalLectureRights_args setIsWrite(boolean isWrite) {
- this.isWrite = isWrite;
- setIsWriteIsSet(true);
- return this;
- }
-
- public void unsetIsWrite() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISWRITE_ISSET_ID);
- }
-
- /** Returns true if field isWrite is set (has been assigned a value) and false otherwise */
- public boolean isSetIsWrite() {
- return EncodingUtils.testBit(__isset_bitfield, __ISWRITE_ISSET_ID);
- }
-
- public void setIsWriteIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISWRITE_ISSET_ID, value);
- }
-
- public boolean isIsAdmin() {
- return this.isAdmin;
- }
-
- public writeAdditionalLectureRights_args setIsAdmin(boolean isAdmin) {
- this.isAdmin = isAdmin;
- setIsAdminIsSet(true);
- return this;
- }
-
- public void unsetIsAdmin() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISADMIN_ISSET_ID);
- }
-
- /** Returns true if field isAdmin is set (has been assigned a value) and false otherwise */
- public boolean isSetIsAdmin() {
- return EncodingUtils.testBit(__isset_bitfield, __ISADMIN_ISSET_ID);
- }
-
- public void setIsAdminIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISADMIN_ISSET_ID, value);
- }
-
- public String getToken() {
- return this.token;
- }
-
- public writeAdditionalLectureRights_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LECTURE_NAME:
- if (value == null) {
- unsetLectureName();
- } else {
- setLectureName((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case IS_READ:
- if (value == null) {
- unsetIsRead();
- } else {
- setIsRead((Boolean)value);
- }
- break;
-
- case IS_WRITE:
- if (value == null) {
- unsetIsWrite();
- } else {
- setIsWrite((Boolean)value);
- }
- break;
-
- case IS_ADMIN:
- if (value == null) {
- unsetIsAdmin();
- } else {
- setIsAdmin((Boolean)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LECTURE_NAME:
- return getLectureName();
-
- case USER_ID:
- return getUserID();
-
- case IS_READ:
- return Boolean.valueOf(isIsRead());
-
- case IS_WRITE:
- return Boolean.valueOf(isIsWrite());
-
- case IS_ADMIN:
- return Boolean.valueOf(isIsAdmin());
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case LECTURE_NAME:
- return isSetLectureName();
- case USER_ID:
- return isSetUserID();
- case IS_READ:
- return isSetIsRead();
- case IS_WRITE:
- return isSetIsWrite();
- case IS_ADMIN:
- return isSetIsAdmin();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof writeAdditionalLectureRights_args)
- return this.equals((writeAdditionalLectureRights_args)that);
- return false;
- }
-
- public boolean equals(writeAdditionalLectureRights_args that) {
- if (that == null)
- return false;
-
- boolean this_present_lectureName = true && this.isSetLectureName();
- boolean that_present_lectureName = true && that.isSetLectureName();
- if (this_present_lectureName || that_present_lectureName) {
- if (!(this_present_lectureName && that_present_lectureName))
- return false;
- if (!this.lectureName.equals(that.lectureName))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_isRead = true;
- boolean that_present_isRead = true;
- if (this_present_isRead || that_present_isRead) {
- if (!(this_present_isRead && that_present_isRead))
- return false;
- if (this.isRead != that.isRead)
- return false;
- }
-
- boolean this_present_isWrite = true;
- boolean that_present_isWrite = true;
- if (this_present_isWrite || that_present_isWrite) {
- if (!(this_present_isWrite && that_present_isWrite))
- return false;
- if (this.isWrite != that.isWrite)
- return false;
- }
-
- boolean this_present_isAdmin = true;
- boolean that_present_isAdmin = true;
- if (this_present_isAdmin || that_present_isAdmin) {
- if (!(this_present_isAdmin && that_present_isAdmin))
- return false;
- if (this.isAdmin != that.isAdmin)
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(writeAdditionalLectureRights_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureName, other.lectureName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsRead()).compareTo(other.isSetIsRead());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsRead()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRead, other.isRead);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsWrite()).compareTo(other.isSetIsWrite());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsWrite()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isWrite, other.isWrite);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetIsAdmin()).compareTo(other.isSetIsAdmin());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetIsAdmin()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAdmin, other.isAdmin);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeAdditionalLectureRights_args(");
- boolean first = true;
-
- sb.append("lectureName:");
- if (this.lectureName == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("isRead:");
- sb.append(this.isRead);
- first = false;
- if (!first) sb.append(", ");
- sb.append("isWrite:");
- sb.append(this.isWrite);
- first = false;
- if (!first) sb.append(", ");
- sb.append("isAdmin:");
- sb.append(this.isAdmin);
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // 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 writeAdditionalLectureRights_argsStandardSchemeFactory implements SchemeFactory {
- public writeAdditionalLectureRights_argsStandardScheme getScheme() {
- return new writeAdditionalLectureRights_argsStandardScheme();
- }
- }
-
- private static class writeAdditionalLectureRights_argsStandardScheme extends StandardScheme<writeAdditionalLectureRights_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeAdditionalLectureRights_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: // LECTURE_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureName = iprot.readString();
- struct.setLectureNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // IS_READ
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isRead = iprot.readBool();
- struct.setIsReadIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // IS_WRITE
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isWrite = iprot.readBool();
- struct.setIsWriteIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // IS_ADMIN
- if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
- struct.isAdmin = iprot.readBool();
- struct.setIsAdminIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, writeAdditionalLectureRights_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.lectureName != null) {
- oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC);
- oprot.writeString(struct.lectureName);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(IS_READ_FIELD_DESC);
- oprot.writeBool(struct.isRead);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IS_WRITE_FIELD_DESC);
- oprot.writeBool(struct.isWrite);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IS_ADMIN_FIELD_DESC);
- oprot.writeBool(struct.isAdmin);
- oprot.writeFieldEnd();
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class writeAdditionalLectureRights_argsTupleSchemeFactory implements SchemeFactory {
- public writeAdditionalLectureRights_argsTupleScheme getScheme() {
- return new writeAdditionalLectureRights_argsTupleScheme();
- }
- }
-
- private static class writeAdditionalLectureRights_argsTupleScheme extends TupleScheme<writeAdditionalLectureRights_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeAdditionalLectureRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetLectureName()) {
- optionals.set(0);
- }
- if (struct.isSetUserID()) {
- optionals.set(1);
- }
- if (struct.isSetIsRead()) {
- optionals.set(2);
- }
- if (struct.isSetIsWrite()) {
- optionals.set(3);
- }
- if (struct.isSetIsAdmin()) {
- optionals.set(4);
- }
- if (struct.isSetToken()) {
- optionals.set(5);
- }
- oprot.writeBitSet(optionals, 6);
- if (struct.isSetLectureName()) {
- oprot.writeString(struct.lectureName);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetIsRead()) {
- oprot.writeBool(struct.isRead);
- }
- if (struct.isSetIsWrite()) {
- oprot.writeBool(struct.isWrite);
- }
- if (struct.isSetIsAdmin()) {
- oprot.writeBool(struct.isAdmin);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, writeAdditionalLectureRights_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
- if (incoming.get(0)) {
- struct.lectureName = iprot.readString();
- struct.setLectureNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(2)) {
- struct.isRead = iprot.readBool();
- struct.setIsReadIsSet(true);
- }
- if (incoming.get(3)) {
- struct.isWrite = iprot.readBool();
- struct.setIsWriteIsSet(true);
- }
- if (incoming.get(4)) {
- struct.isAdmin = iprot.readBool();
- struct.setIsAdminIsSet(true);
- }
- if (incoming.get(5)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class writeAdditionalLectureRights_result implements org.apache.thrift.TBase<writeAdditionalLectureRights_result, writeAdditionalLectureRights_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeAdditionalLectureRights_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeAdditionalLectureRights_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeAdditionalLectureRights_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeAdditionalLectureRights_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeAdditionalLectureRights_result.class, metaDataMap);
- }
-
- public writeAdditionalLectureRights_result() {
- }
-
- public writeAdditionalLectureRights_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public writeAdditionalLectureRights_result(writeAdditionalLectureRights_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public writeAdditionalLectureRights_result deepCopy() {
- return new writeAdditionalLectureRights_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public writeAdditionalLectureRights_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 writeAdditionalLectureRights_result)
- return this.equals((writeAdditionalLectureRights_result)that);
- return false;
- }
-
- public boolean equals(writeAdditionalLectureRights_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(writeAdditionalLectureRights_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("writeAdditionalLectureRights_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 writeAdditionalLectureRights_resultStandardSchemeFactory implements SchemeFactory {
- public writeAdditionalLectureRights_resultStandardScheme getScheme() {
- return new writeAdditionalLectureRights_resultStandardScheme();
- }
- }
-
- private static class writeAdditionalLectureRights_resultStandardScheme extends StandardScheme<writeAdditionalLectureRights_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, writeAdditionalLectureRights_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, writeAdditionalLectureRights_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 writeAdditionalLectureRights_resultTupleSchemeFactory implements SchemeFactory {
- public writeAdditionalLectureRights_resultTupleScheme getScheme() {
- return new writeAdditionalLectureRights_resultTupleScheme();
- }
- }
-
- private static class writeAdditionalLectureRights_resultTupleScheme extends TupleScheme<writeAdditionalLectureRights_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, writeAdditionalLectureRights_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, writeAdditionalLectureRights_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAllOtherSatelliteUsers_args implements org.apache.thrift.TBase<getAllOtherSatelliteUsers_args, getAllOtherSatelliteUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOtherSatelliteUsers_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOtherSatelliteUsers_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllOtherSatelliteUsers_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllOtherSatelliteUsers_argsTupleSchemeFactory());
- }
-
- public List<String> userID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOtherSatelliteUsers_args.class, metaDataMap);
- }
-
- public getAllOtherSatelliteUsers_args() {
- }
-
- public getAllOtherSatelliteUsers_args(
- List<String> userID,
- String token)
- {
- this();
- this.userID = userID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAllOtherSatelliteUsers_args(getAllOtherSatelliteUsers_args other) {
- if (other.isSetUserID()) {
- List<String> __this__userID = new ArrayList<String>(other.userID);
- this.userID = __this__userID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getAllOtherSatelliteUsers_args deepCopy() {
- return new getAllOtherSatelliteUsers_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.token = null;
- }
-
- public int getUserIDSize() {
- return (this.userID == null) ? 0 : this.userID.size();
- }
-
- public java.util.Iterator<String> getUserIDIterator() {
- return (this.userID == null) ? null : this.userID.iterator();
- }
-
- public void addToUserID(String elem) {
- if (this.userID == null) {
- this.userID = new ArrayList<String>();
- }
- this.userID.add(elem);
- }
-
- public List<String> getUserID() {
- return this.userID;
- }
-
- public getAllOtherSatelliteUsers_args setUserID(List<String> userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getAllOtherSatelliteUsers_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((List<String>)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAllOtherSatelliteUsers_args)
- return this.equals((getAllOtherSatelliteUsers_args)that);
- return false;
- }
-
- public boolean equals(getAllOtherSatelliteUsers_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAllOtherSatelliteUsers_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getAllOtherSatelliteUsers_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAllOtherSatelliteUsers_argsStandardSchemeFactory implements SchemeFactory {
- public getAllOtherSatelliteUsers_argsStandardScheme getScheme() {
- return new getAllOtherSatelliteUsers_argsStandardScheme();
- }
- }
-
- private static class getAllOtherSatelliteUsers_argsStandardScheme extends StandardScheme<getAllOtherSatelliteUsers_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list136 = iprot.readListBegin();
- struct.userID = new ArrayList<String>(_list136.size);
- for (int _i137 = 0; _i137 < _list136.size; ++_i137)
- {
- String _elem138;
- _elem138 = iprot.readString();
- struct.userID.add(_elem138);
- }
- iprot.readListEnd();
- }
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.userID.size()));
- for (String _iter139 : struct.userID)
- {
- oprot.writeString(_iter139);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAllOtherSatelliteUsers_argsTupleSchemeFactory implements SchemeFactory {
- public getAllOtherSatelliteUsers_argsTupleScheme getScheme() {
- return new getAllOtherSatelliteUsers_argsTupleScheme();
- }
- }
-
- private static class getAllOtherSatelliteUsers_argsTupleScheme extends TupleScheme<getAllOtherSatelliteUsers_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetUserID()) {
- {
- oprot.writeI32(struct.userID.size());
- for (String _iter140 : struct.userID)
- {
- oprot.writeString(_iter140);
- }
- }
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list141 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.userID = new ArrayList<String>(_list141.size);
- for (int _i142 = 0; _i142 < _list141.size; ++_i142)
- {
- String _elem143;
- _elem143 = iprot.readString();
- struct.userID.add(_elem143);
- }
- }
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAllOtherSatelliteUsers_result implements org.apache.thrift.TBase<getAllOtherSatelliteUsers_result, getAllOtherSatelliteUsers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOtherSatelliteUsers_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOtherSatelliteUsers_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllOtherSatelliteUsers_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllOtherSatelliteUsers_resultTupleSchemeFactory());
- }
-
- public List<Person> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Person.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOtherSatelliteUsers_result.class, metaDataMap);
- }
-
- public getAllOtherSatelliteUsers_result() {
- }
-
- public getAllOtherSatelliteUsers_result(
- List<Person> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAllOtherSatelliteUsers_result(getAllOtherSatelliteUsers_result other) {
- if (other.isSetSuccess()) {
- List<Person> __this__success = new ArrayList<Person>(other.success.size());
- for (Person other_element : other.success) {
- __this__success.add(new Person(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getAllOtherSatelliteUsers_result deepCopy() {
- return new getAllOtherSatelliteUsers_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Person> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Person elem) {
- if (this.success == null) {
- this.success = new ArrayList<Person>();
- }
- this.success.add(elem);
- }
-
- public List<Person> getSuccess() {
- return this.success;
- }
-
- public getAllOtherSatelliteUsers_result setSuccess(List<Person> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Person>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAllOtherSatelliteUsers_result)
- return this.equals((getAllOtherSatelliteUsers_result)that);
- return false;
- }
-
- public boolean equals(getAllOtherSatelliteUsers_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAllOtherSatelliteUsers_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("getAllOtherSatelliteUsers_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAllOtherSatelliteUsers_resultStandardSchemeFactory implements SchemeFactory {
- public getAllOtherSatelliteUsers_resultStandardScheme getScheme() {
- return new getAllOtherSatelliteUsers_resultStandardScheme();
- }
- }
-
- private static class getAllOtherSatelliteUsers_resultStandardScheme extends StandardScheme<getAllOtherSatelliteUsers_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list144 = iprot.readListBegin();
- struct.success = new ArrayList<Person>(_list144.size);
- for (int _i145 = 0; _i145 < _list144.size; ++_i145)
- {
- Person _elem146;
- _elem146 = new Person();
- _elem146.read(iprot);
- struct.success.add(_elem146);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Person _iter147 : struct.success)
- {
- _iter147.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAllOtherSatelliteUsers_resultTupleSchemeFactory implements SchemeFactory {
- public getAllOtherSatelliteUsers_resultTupleScheme getScheme() {
- return new getAllOtherSatelliteUsers_resultTupleScheme();
- }
- }
-
- private static class getAllOtherSatelliteUsers_resultTupleScheme extends TupleScheme<getAllOtherSatelliteUsers_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Person _iter148 : struct.success)
- {
- _iter148.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list149 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Person>(_list149.size);
- for (int _i150 = 0; _i150 < _list149.size; ++_i150)
- {
- Person _elem151;
- _elem151 = new Person();
- _elem151.read(iprot);
- struct.success.add(_elem151);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPermissionForUserAndImage_args implements org.apache.thrift.TBase<getPermissionForUserAndImage_args, getPermissionForUserAndImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPermissionForUserAndImage_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPermissionForUserAndImage_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageID", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPermissionForUserAndImage_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPermissionForUserAndImage_argsTupleSchemeFactory());
- }
-
- public String token; // required
- public String imageID; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token"),
- IMAGE_ID((short)2, "imageID"),
- USER_ID((short)3, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- case 2: // IMAGE_ID
- return IMAGE_ID;
- case 3: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPermissionForUserAndImage_args.class, metaDataMap);
- }
-
- public getPermissionForUserAndImage_args() {
- }
-
- public getPermissionForUserAndImage_args(
- String token,
- String imageID,
- String userID)
- {
- this();
- this.token = token;
- this.imageID = imageID;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPermissionForUserAndImage_args(getPermissionForUserAndImage_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetImageID()) {
- this.imageID = other.imageID;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public getPermissionForUserAndImage_args deepCopy() {
- return new getPermissionForUserAndImage_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- this.imageID = null;
- this.userID = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getPermissionForUserAndImage_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getImageID() {
- return this.imageID;
- }
-
- public getPermissionForUserAndImage_args setImageID(String imageID) {
- this.imageID = imageID;
- return this;
- }
-
- public void unsetImageID() {
- this.imageID = null;
- }
-
- /** Returns true if field imageID is set (has been assigned a value) and false otherwise */
- public boolean isSetImageID() {
- return this.imageID != null;
- }
-
- public void setImageIDIsSet(boolean value) {
- if (!value) {
- this.imageID = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public getPermissionForUserAndImage_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case IMAGE_ID:
- if (value == null) {
- unsetImageID();
- } else {
- setImageID((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- case IMAGE_ID:
- return getImageID();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- case IMAGE_ID:
- return isSetImageID();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPermissionForUserAndImage_args)
- return this.equals((getPermissionForUserAndImage_args)that);
- return false;
- }
-
- public boolean equals(getPermissionForUserAndImage_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_imageID = true && this.isSetImageID();
- boolean that_present_imageID = true && that.isSetImageID();
- if (this_present_imageID || that_present_imageID) {
- if (!(this_present_imageID && that_present_imageID))
- return false;
- if (!this.imageID.equals(that.imageID))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPermissionForUserAndImage_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetImageID()).compareTo(other.isSetImageID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageID, other.imageID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPermissionForUserAndImage_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("imageID:");
- if (this.imageID == null) {
- sb.append("null");
- } else {
- sb.append(this.imageID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPermissionForUserAndImage_argsStandardSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndImage_argsStandardScheme getScheme() {
- return new getPermissionForUserAndImage_argsStandardScheme();
- }
- }
-
- private static class getPermissionForUserAndImage_argsStandardScheme extends StandardScheme<getPermissionForUserAndImage_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPermissionForUserAndImage_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // IMAGE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPermissionForUserAndImage_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.imageID != null) {
- oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC);
- oprot.writeString(struct.imageID);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPermissionForUserAndImage_argsTupleSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndImage_argsTupleScheme getScheme() {
- return new getPermissionForUserAndImage_argsTupleScheme();
- }
- }
-
- private static class getPermissionForUserAndImage_argsTupleScheme extends TupleScheme<getPermissionForUserAndImage_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- if (struct.isSetImageID()) {
- optionals.set(1);
- }
- if (struct.isSetUserID()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetImageID()) {
- oprot.writeString(struct.imageID);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(1)) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- }
- if (incoming.get(2)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPermissionForUserAndImage_result implements org.apache.thrift.TBase<getPermissionForUserAndImage_result, getPermissionForUserAndImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPermissionForUserAndImage_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPermissionForUserAndImage_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPermissionForUserAndImage_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPermissionForUserAndImage_resultTupleSchemeFactory());
- }
-
- public List<Person> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Person.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPermissionForUserAndImage_result.class, metaDataMap);
- }
-
- public getPermissionForUserAndImage_result() {
- }
-
- public getPermissionForUserAndImage_result(
- List<Person> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPermissionForUserAndImage_result(getPermissionForUserAndImage_result other) {
- if (other.isSetSuccess()) {
- List<Person> __this__success = new ArrayList<Person>(other.success.size());
- for (Person other_element : other.success) {
- __this__success.add(new Person(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getPermissionForUserAndImage_result deepCopy() {
- return new getPermissionForUserAndImage_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Person> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Person elem) {
- if (this.success == null) {
- this.success = new ArrayList<Person>();
- }
- this.success.add(elem);
- }
-
- public List<Person> getSuccess() {
- return this.success;
- }
-
- public getPermissionForUserAndImage_result setSuccess(List<Person> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Person>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPermissionForUserAndImage_result)
- return this.equals((getPermissionForUserAndImage_result)that);
- return false;
- }
-
- public boolean equals(getPermissionForUserAndImage_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPermissionForUserAndImage_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("getPermissionForUserAndImage_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPermissionForUserAndImage_resultStandardSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndImage_resultStandardScheme getScheme() {
- return new getPermissionForUserAndImage_resultStandardScheme();
- }
- }
-
- private static class getPermissionForUserAndImage_resultStandardScheme extends StandardScheme<getPermissionForUserAndImage_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPermissionForUserAndImage_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list152 = iprot.readListBegin();
- struct.success = new ArrayList<Person>(_list152.size);
- for (int _i153 = 0; _i153 < _list152.size; ++_i153)
- {
- Person _elem154;
- _elem154 = new Person();
- _elem154.read(iprot);
- struct.success.add(_elem154);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPermissionForUserAndImage_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Person _iter155 : struct.success)
- {
- _iter155.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPermissionForUserAndImage_resultTupleSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndImage_resultTupleScheme getScheme() {
- return new getPermissionForUserAndImage_resultTupleScheme();
- }
- }
-
- private static class getPermissionForUserAndImage_resultTupleScheme extends TupleScheme<getPermissionForUserAndImage_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Person _iter156 : struct.success)
- {
- _iter156.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list157 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Person>(_list157.size);
- for (int _i158 = 0; _i158 < _list157.size; ++_i158)
- {
- Person _elem159;
- _elem159 = new Person();
- _elem159.read(iprot);
- struct.success.add(_elem159);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAdditionalImageContacts_args implements org.apache.thrift.TBase<getAdditionalImageContacts_args, getAdditionalImageContacts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAdditionalImageContacts_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAdditionalImageContacts_args");
-
- private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAdditionalImageContacts_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAdditionalImageContacts_argsTupleSchemeFactory());
- }
-
- public String imageID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGE_ID((short)1, "imageID"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGE_ID
- return IMAGE_ID;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAdditionalImageContacts_args.class, metaDataMap);
- }
-
- public getAdditionalImageContacts_args() {
- }
-
- public getAdditionalImageContacts_args(
- String imageID,
- String token)
- {
- this();
- this.imageID = imageID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAdditionalImageContacts_args(getAdditionalImageContacts_args other) {
- if (other.isSetImageID()) {
- this.imageID = other.imageID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getAdditionalImageContacts_args deepCopy() {
- return new getAdditionalImageContacts_args(this);
- }
-
- @Override
- public void clear() {
- this.imageID = null;
- this.token = null;
- }
-
- public String getImageID() {
- return this.imageID;
- }
-
- public getAdditionalImageContacts_args setImageID(String imageID) {
- this.imageID = imageID;
- return this;
- }
-
- public void unsetImageID() {
- this.imageID = null;
- }
-
- /** Returns true if field imageID is set (has been assigned a value) and false otherwise */
- public boolean isSetImageID() {
- return this.imageID != null;
- }
-
- public void setImageIDIsSet(boolean value) {
- if (!value) {
- this.imageID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getAdditionalImageContacts_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGE_ID:
- if (value == null) {
- unsetImageID();
- } else {
- setImageID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGE_ID:
- return getImageID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGE_ID:
- return isSetImageID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAdditionalImageContacts_args)
- return this.equals((getAdditionalImageContacts_args)that);
- return false;
- }
-
- public boolean equals(getAdditionalImageContacts_args that) {
- if (that == null)
- return false;
-
- boolean this_present_imageID = true && this.isSetImageID();
- boolean that_present_imageID = true && that.isSetImageID();
- if (this_present_imageID || that_present_imageID) {
- if (!(this_present_imageID && that_present_imageID))
- return false;
- if (!this.imageID.equals(that.imageID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAdditionalImageContacts_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImageID()).compareTo(other.isSetImageID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageID, other.imageID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getAdditionalImageContacts_args(");
- boolean first = true;
-
- sb.append("imageID:");
- if (this.imageID == null) {
- sb.append("null");
- } else {
- sb.append(this.imageID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAdditionalImageContacts_argsStandardSchemeFactory implements SchemeFactory {
- public getAdditionalImageContacts_argsStandardScheme getScheme() {
- return new getAdditionalImageContacts_argsStandardScheme();
- }
- }
-
- private static class getAdditionalImageContacts_argsStandardScheme extends StandardScheme<getAdditionalImageContacts_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAdditionalImageContacts_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: // IMAGE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAdditionalImageContacts_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.imageID != null) {
- oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC);
- oprot.writeString(struct.imageID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAdditionalImageContacts_argsTupleSchemeFactory implements SchemeFactory {
- public getAdditionalImageContacts_argsTupleScheme getScheme() {
- return new getAdditionalImageContacts_argsTupleScheme();
- }
- }
-
- private static class getAdditionalImageContacts_argsTupleScheme extends TupleScheme<getAdditionalImageContacts_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAdditionalImageContacts_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImageID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetImageID()) {
- oprot.writeString(struct.imageID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAdditionalImageContacts_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getAdditionalImageContacts_result implements org.apache.thrift.TBase<getAdditionalImageContacts_result, getAdditionalImageContacts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAdditionalImageContacts_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAdditionalImageContacts_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAdditionalImageContacts_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAdditionalImageContacts_resultTupleSchemeFactory());
- }
-
- public List<String> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAdditionalImageContacts_result.class, metaDataMap);
- }
-
- public getAdditionalImageContacts_result() {
- }
-
- public getAdditionalImageContacts_result(
- List<String> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getAdditionalImageContacts_result(getAdditionalImageContacts_result other) {
- if (other.isSetSuccess()) {
- List<String> __this__success = new ArrayList<String>(other.success);
- this.success = __this__success;
- }
- }
-
- public getAdditionalImageContacts_result deepCopy() {
- return new getAdditionalImageContacts_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<String> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(String elem) {
- if (this.success == null) {
- this.success = new ArrayList<String>();
- }
- this.success.add(elem);
- }
-
- public List<String> getSuccess() {
- return this.success;
- }
-
- public getAdditionalImageContacts_result setSuccess(List<String> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<String>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getAdditionalImageContacts_result)
- return this.equals((getAdditionalImageContacts_result)that);
- return false;
- }
-
- public boolean equals(getAdditionalImageContacts_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getAdditionalImageContacts_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("getAdditionalImageContacts_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getAdditionalImageContacts_resultStandardSchemeFactory implements SchemeFactory {
- public getAdditionalImageContacts_resultStandardScheme getScheme() {
- return new getAdditionalImageContacts_resultStandardScheme();
- }
- }
-
- private static class getAdditionalImageContacts_resultStandardScheme extends StandardScheme<getAdditionalImageContacts_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getAdditionalImageContacts_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list160 = iprot.readListBegin();
- struct.success = new ArrayList<String>(_list160.size);
- for (int _i161 = 0; _i161 < _list160.size; ++_i161)
- {
- String _elem162;
- _elem162 = iprot.readString();
- struct.success.add(_elem162);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getAdditionalImageContacts_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
- for (String _iter163 : struct.success)
- {
- oprot.writeString(_iter163);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getAdditionalImageContacts_resultTupleSchemeFactory implements SchemeFactory {
- public getAdditionalImageContacts_resultTupleScheme getScheme() {
- return new getAdditionalImageContacts_resultTupleScheme();
- }
- }
-
- private static class getAdditionalImageContacts_resultTupleScheme extends TupleScheme<getAdditionalImageContacts_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getAdditionalImageContacts_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (String _iter164 : struct.success)
- {
- oprot.writeString(_iter164);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getAdditionalImageContacts_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list165 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.success = new ArrayList<String>(_list165.size);
- for (int _i166 = 0; _i166 < _list165.size; ++_i166)
- {
- String _elem167;
- _elem167 = iprot.readString();
- struct.success.add(_elem167);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPermissionForUserAndLecture_args implements org.apache.thrift.TBase<getPermissionForUserAndLecture_args, getPermissionForUserAndLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPermissionForUserAndLecture_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPermissionForUserAndLecture_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureID", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPermissionForUserAndLecture_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPermissionForUserAndLecture_argsTupleSchemeFactory());
- }
-
- public String token; // required
- public String lectureID; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token"),
- LECTURE_ID((short)2, "lectureID"),
- USER_ID((short)3, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- case 2: // LECTURE_ID
- return LECTURE_ID;
- case 3: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPermissionForUserAndLecture_args.class, metaDataMap);
- }
-
- public getPermissionForUserAndLecture_args() {
- }
-
- public getPermissionForUserAndLecture_args(
- String token,
- String lectureID,
- String userID)
- {
- this();
- this.token = token;
- this.lectureID = lectureID;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPermissionForUserAndLecture_args(getPermissionForUserAndLecture_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetLectureID()) {
- this.lectureID = other.lectureID;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public getPermissionForUserAndLecture_args deepCopy() {
- return new getPermissionForUserAndLecture_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- this.lectureID = null;
- this.userID = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getPermissionForUserAndLecture_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getLectureID() {
- return this.lectureID;
- }
-
- public getPermissionForUserAndLecture_args setLectureID(String lectureID) {
- this.lectureID = lectureID;
- return this;
- }
-
- public void unsetLectureID() {
- this.lectureID = null;
- }
-
- /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureID() {
- return this.lectureID != null;
- }
-
- public void setLectureIDIsSet(boolean value) {
- if (!value) {
- this.lectureID = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public getPermissionForUserAndLecture_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case LECTURE_ID:
- if (value == null) {
- unsetLectureID();
- } else {
- setLectureID((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- case LECTURE_ID:
- return getLectureID();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- case LECTURE_ID:
- return isSetLectureID();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPermissionForUserAndLecture_args)
- return this.equals((getPermissionForUserAndLecture_args)that);
- return false;
- }
-
- public boolean equals(getPermissionForUserAndLecture_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_lectureID = true && this.isSetLectureID();
- boolean that_present_lectureID = true && that.isSetLectureID();
- if (this_present_lectureID || that_present_lectureID) {
- if (!(this_present_lectureID && that_present_lectureID))
- return false;
- if (!this.lectureID.equals(that.lectureID))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPermissionForUserAndLecture_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPermissionForUserAndLecture_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("lectureID:");
- if (this.lectureID == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPermissionForUserAndLecture_argsStandardSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndLecture_argsStandardScheme getScheme() {
- return new getPermissionForUserAndLecture_argsStandardScheme();
- }
- }
-
- private static class getPermissionForUserAndLecture_argsStandardScheme extends StandardScheme<getPermissionForUserAndLecture_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPermissionForUserAndLecture_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // LECTURE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPermissionForUserAndLecture_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.lectureID != null) {
- oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
- oprot.writeString(struct.lectureID);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPermissionForUserAndLecture_argsTupleSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndLecture_argsTupleScheme getScheme() {
- return new getPermissionForUserAndLecture_argsTupleScheme();
- }
- }
-
- private static class getPermissionForUserAndLecture_argsTupleScheme extends TupleScheme<getPermissionForUserAndLecture_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- if (struct.isSetLectureID()) {
- optionals.set(1);
- }
- if (struct.isSetUserID()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetLectureID()) {
- oprot.writeString(struct.lectureID);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(1)) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- }
- if (incoming.get(2)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class getPermissionForUserAndLecture_result implements org.apache.thrift.TBase<getPermissionForUserAndLecture_result, getPermissionForUserAndLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPermissionForUserAndLecture_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPermissionForUserAndLecture_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPermissionForUserAndLecture_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPermissionForUserAndLecture_resultTupleSchemeFactory());
- }
-
- public List<Person> success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Person.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPermissionForUserAndLecture_result.class, metaDataMap);
- }
-
- public getPermissionForUserAndLecture_result() {
- }
-
- public getPermissionForUserAndLecture_result(
- List<Person> success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getPermissionForUserAndLecture_result(getPermissionForUserAndLecture_result other) {
- if (other.isSetSuccess()) {
- List<Person> __this__success = new ArrayList<Person>(other.success.size());
- for (Person other_element : other.success) {
- __this__success.add(new Person(other_element));
- }
- this.success = __this__success;
- }
- }
-
- public getPermissionForUserAndLecture_result deepCopy() {
- return new getPermissionForUserAndLecture_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public java.util.Iterator<Person> getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(Person elem) {
- if (this.success == null) {
- this.success = new ArrayList<Person>();
- }
- this.success.add(elem);
- }
-
- public List<Person> getSuccess() {
- return this.success;
- }
-
- public getPermissionForUserAndLecture_result setSuccess(List<Person> success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((List<Person>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getPermissionForUserAndLecture_result)
- return this.equals((getPermissionForUserAndLecture_result)that);
- return false;
- }
-
- public boolean equals(getPermissionForUserAndLecture_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getPermissionForUserAndLecture_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("getPermissionForUserAndLecture_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getPermissionForUserAndLecture_resultStandardSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndLecture_resultStandardScheme getScheme() {
- return new getPermissionForUserAndLecture_resultStandardScheme();
- }
- }
-
- private static class getPermissionForUserAndLecture_resultStandardScheme extends StandardScheme<getPermissionForUserAndLecture_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getPermissionForUserAndLecture_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list168 = iprot.readListBegin();
- struct.success = new ArrayList<Person>(_list168.size);
- for (int _i169 = 0; _i169 < _list168.size; ++_i169)
- {
- Person _elem170;
- _elem170 = new Person();
- _elem170.read(iprot);
- struct.success.add(_elem170);
- }
- iprot.readListEnd();
- }
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getPermissionForUserAndLecture_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Person _iter171 : struct.success)
- {
- _iter171.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getPermissionForUserAndLecture_resultTupleSchemeFactory implements SchemeFactory {
- public getPermissionForUserAndLecture_resultTupleScheme getScheme() {
- return new getPermissionForUserAndLecture_resultTupleScheme();
- }
- }
-
- private static class getPermissionForUserAndLecture_resultTupleScheme extends TupleScheme<getPermissionForUserAndLecture_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetSuccess()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetSuccess()) {
- {
- oprot.writeI32(struct.success.size());
- for (Person _iter172 : struct.success)
- {
- _iter172.write(oprot);
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getPermissionForUserAndLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- {
- org.apache.thrift.protocol.TList _list173 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Person>(_list173.size);
- for (int _i174 = 0; _i174 < _list173.size; ++_i174)
- {
- Person _elem175;
- _elem175 = new Person();
- _elem175.read(iprot);
- struct.success.add(_elem175);
- }
- }
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteAllAdditionalImagePermissions_args implements org.apache.thrift.TBase<deleteAllAdditionalImagePermissions_args, deleteAllAdditionalImagePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteAllAdditionalImagePermissions_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllAdditionalImagePermissions_args");
-
- private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteAllAdditionalImagePermissions_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteAllAdditionalImagePermissions_argsTupleSchemeFactory());
- }
-
- public String imageID; // required
- public String token; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGE_ID((short)1, "imageID"),
- TOKEN((short)2, "token"),
- USER_ID((short)3, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGE_ID
- return IMAGE_ID;
- case 2: // TOKEN
- return TOKEN;
- case 3: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllAdditionalImagePermissions_args.class, metaDataMap);
- }
-
- public deleteAllAdditionalImagePermissions_args() {
- }
-
- public deleteAllAdditionalImagePermissions_args(
- String imageID,
- String token,
- String userID)
- {
- this();
- this.imageID = imageID;
- this.token = token;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteAllAdditionalImagePermissions_args(deleteAllAdditionalImagePermissions_args other) {
- if (other.isSetImageID()) {
- this.imageID = other.imageID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public deleteAllAdditionalImagePermissions_args deepCopy() {
- return new deleteAllAdditionalImagePermissions_args(this);
- }
-
- @Override
- public void clear() {
- this.imageID = null;
- this.token = null;
- this.userID = null;
- }
-
- public String getImageID() {
- return this.imageID;
- }
-
- public deleteAllAdditionalImagePermissions_args setImageID(String imageID) {
- this.imageID = imageID;
- return this;
- }
-
- public void unsetImageID() {
- this.imageID = null;
- }
-
- /** Returns true if field imageID is set (has been assigned a value) and false otherwise */
- public boolean isSetImageID() {
- return this.imageID != null;
- }
-
- public void setImageIDIsSet(boolean value) {
- if (!value) {
- this.imageID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public deleteAllAdditionalImagePermissions_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public deleteAllAdditionalImagePermissions_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGE_ID:
- if (value == null) {
- unsetImageID();
- } else {
- setImageID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGE_ID:
- return getImageID();
-
- case TOKEN:
- return getToken();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGE_ID:
- return isSetImageID();
- case TOKEN:
- return isSetToken();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteAllAdditionalImagePermissions_args)
- return this.equals((deleteAllAdditionalImagePermissions_args)that);
- return false;
- }
-
- public boolean equals(deleteAllAdditionalImagePermissions_args that) {
- if (that == null)
- return false;
-
- boolean this_present_imageID = true && this.isSetImageID();
- boolean that_present_imageID = true && that.isSetImageID();
- if (this_present_imageID || that_present_imageID) {
- if (!(this_present_imageID && that_present_imageID))
- return false;
- if (!this.imageID.equals(that.imageID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteAllAdditionalImagePermissions_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImageID()).compareTo(other.isSetImageID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageID, other.imageID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteAllAdditionalImagePermissions_args(");
- boolean first = true;
-
- sb.append("imageID:");
- if (this.imageID == null) {
- sb.append("null");
- } else {
- sb.append(this.imageID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteAllAdditionalImagePermissions_argsStandardSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalImagePermissions_argsStandardScheme getScheme() {
- return new deleteAllAdditionalImagePermissions_argsStandardScheme();
- }
- }
-
- private static class deleteAllAdditionalImagePermissions_argsStandardScheme extends StandardScheme<deleteAllAdditionalImagePermissions_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalImagePermissions_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: // IMAGE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllAdditionalImagePermissions_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.imageID != null) {
- oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC);
- oprot.writeString(struct.imageID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteAllAdditionalImagePermissions_argsTupleSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalImagePermissions_argsTupleScheme getScheme() {
- return new deleteAllAdditionalImagePermissions_argsTupleScheme();
- }
- }
-
- private static class deleteAllAdditionalImagePermissions_argsTupleScheme extends TupleScheme<deleteAllAdditionalImagePermissions_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImageID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- if (struct.isSetUserID()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetImageID()) {
- oprot.writeString(struct.imageID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(2)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteAllAdditionalImagePermissions_result implements org.apache.thrift.TBase<deleteAllAdditionalImagePermissions_result, deleteAllAdditionalImagePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteAllAdditionalImagePermissions_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllAdditionalImagePermissions_result");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteAllAdditionalImagePermissions_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteAllAdditionalImagePermissions_resultTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllAdditionalImagePermissions_result.class, metaDataMap);
- }
-
- public deleteAllAdditionalImagePermissions_result() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteAllAdditionalImagePermissions_result(deleteAllAdditionalImagePermissions_result other) {
- }
-
- public deleteAllAdditionalImagePermissions_result deepCopy() {
- return new deleteAllAdditionalImagePermissions_result(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteAllAdditionalImagePermissions_result)
- return this.equals((deleteAllAdditionalImagePermissions_result)that);
- return false;
- }
-
- public boolean equals(deleteAllAdditionalImagePermissions_result that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteAllAdditionalImagePermissions_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteAllAdditionalImagePermissions_result(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteAllAdditionalImagePermissions_resultStandardSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalImagePermissions_resultStandardScheme getScheme() {
- return new deleteAllAdditionalImagePermissions_resultStandardScheme();
- }
- }
-
- private static class deleteAllAdditionalImagePermissions_resultStandardScheme extends StandardScheme<deleteAllAdditionalImagePermissions_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalImagePermissions_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllAdditionalImagePermissions_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteAllAdditionalImagePermissions_resultTupleSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalImagePermissions_resultTupleScheme getScheme() {
- return new deleteAllAdditionalImagePermissions_resultTupleScheme();
- }
- }
-
- private static class deleteAllAdditionalImagePermissions_resultTupleScheme extends TupleScheme<deleteAllAdditionalImagePermissions_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalImagePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
- }
-
- public static class deleteAllAdditionalLecturePermissions_args implements org.apache.thrift.TBase<deleteAllAdditionalLecturePermissions_args, deleteAllAdditionalLecturePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteAllAdditionalLecturePermissions_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllAdditionalLecturePermissions_args");
-
- private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteAllAdditionalLecturePermissions_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteAllAdditionalLecturePermissions_argsTupleSchemeFactory());
- }
-
- public String lectureID; // required
- public String token; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- LECTURE_ID((short)1, "lectureID"),
- TOKEN((short)2, "token"),
- USER_ID((short)3, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // LECTURE_ID
- return LECTURE_ID;
- case 2: // TOKEN
- return TOKEN;
- case 3: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllAdditionalLecturePermissions_args.class, metaDataMap);
- }
-
- public deleteAllAdditionalLecturePermissions_args() {
- }
-
- public deleteAllAdditionalLecturePermissions_args(
- String lectureID,
- String token,
- String userID)
- {
- this();
- this.lectureID = lectureID;
- this.token = token;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteAllAdditionalLecturePermissions_args(deleteAllAdditionalLecturePermissions_args other) {
- if (other.isSetLectureID()) {
- this.lectureID = other.lectureID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public deleteAllAdditionalLecturePermissions_args deepCopy() {
- return new deleteAllAdditionalLecturePermissions_args(this);
- }
-
- @Override
- public void clear() {
- this.lectureID = null;
- this.token = null;
- this.userID = null;
- }
-
- public String getLectureID() {
- return this.lectureID;
- }
-
- public deleteAllAdditionalLecturePermissions_args setLectureID(String lectureID) {
- this.lectureID = lectureID;
- return this;
- }
-
- public void unsetLectureID() {
- this.lectureID = null;
- }
-
- /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureID() {
- return this.lectureID != null;
- }
-
- public void setLectureIDIsSet(boolean value) {
- if (!value) {
- this.lectureID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public deleteAllAdditionalLecturePermissions_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public deleteAllAdditionalLecturePermissions_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case LECTURE_ID:
- if (value == null) {
- unsetLectureID();
- } else {
- setLectureID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case LECTURE_ID:
- return getLectureID();
-
- case TOKEN:
- return getToken();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case LECTURE_ID:
- return isSetLectureID();
- case TOKEN:
- return isSetToken();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteAllAdditionalLecturePermissions_args)
- return this.equals((deleteAllAdditionalLecturePermissions_args)that);
- return false;
- }
-
- public boolean equals(deleteAllAdditionalLecturePermissions_args that) {
- if (that == null)
- return false;
-
- boolean this_present_lectureID = true && this.isSetLectureID();
- boolean that_present_lectureID = true && that.isSetLectureID();
- if (this_present_lectureID || that_present_lectureID) {
- if (!(this_present_lectureID && that_present_lectureID))
- return false;
- if (!this.lectureID.equals(that.lectureID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteAllAdditionalLecturePermissions_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteAllAdditionalLecturePermissions_args(");
- boolean first = true;
-
- sb.append("lectureID:");
- if (this.lectureID == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteAllAdditionalLecturePermissions_argsStandardSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalLecturePermissions_argsStandardScheme getScheme() {
- return new deleteAllAdditionalLecturePermissions_argsStandardScheme();
- }
- }
-
- private static class deleteAllAdditionalLecturePermissions_argsStandardScheme extends StandardScheme<deleteAllAdditionalLecturePermissions_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalLecturePermissions_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: // LECTURE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.lectureID != null) {
- oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
- oprot.writeString(struct.lectureID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteAllAdditionalLecturePermissions_argsTupleSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalLecturePermissions_argsTupleScheme getScheme() {
- return new deleteAllAdditionalLecturePermissions_argsTupleScheme();
- }
- }
-
- private static class deleteAllAdditionalLecturePermissions_argsTupleScheme extends TupleScheme<deleteAllAdditionalLecturePermissions_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetLectureID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- if (struct.isSetUserID()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetLectureID()) {
- oprot.writeString(struct.lectureID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(2)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class deleteAllAdditionalLecturePermissions_result implements org.apache.thrift.TBase<deleteAllAdditionalLecturePermissions_result, deleteAllAdditionalLecturePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteAllAdditionalLecturePermissions_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllAdditionalLecturePermissions_result");
-
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteAllAdditionalLecturePermissions_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteAllAdditionalLecturePermissions_resultTupleSchemeFactory());
- }
-
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-;
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllAdditionalLecturePermissions_result.class, metaDataMap);
- }
-
- public deleteAllAdditionalLecturePermissions_result() {
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public deleteAllAdditionalLecturePermissions_result(deleteAllAdditionalLecturePermissions_result other) {
- }
-
- public deleteAllAdditionalLecturePermissions_result deepCopy() {
- return new deleteAllAdditionalLecturePermissions_result(this);
- }
-
- @Override
- public void clear() {
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof deleteAllAdditionalLecturePermissions_result)
- return this.equals((deleteAllAdditionalLecturePermissions_result)that);
- return false;
- }
-
- public boolean equals(deleteAllAdditionalLecturePermissions_result that) {
- if (that == null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(deleteAllAdditionalLecturePermissions_result other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteAllAdditionalLecturePermissions_result(");
- boolean first = true;
-
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class deleteAllAdditionalLecturePermissions_resultStandardSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalLecturePermissions_resultStandardScheme getScheme() {
- return new deleteAllAdditionalLecturePermissions_resultStandardScheme();
- }
- }
-
- private static class deleteAllAdditionalLecturePermissions_resultStandardScheme extends StandardScheme<deleteAllAdditionalLecturePermissions_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class deleteAllAdditionalLecturePermissions_resultTupleSchemeFactory implements SchemeFactory {
- public deleteAllAdditionalLecturePermissions_resultTupleScheme getScheme() {
- return new deleteAllAdditionalLecturePermissions_resultTupleScheme();
- }
- }
-
- private static class deleteAllAdditionalLecturePermissions_resultTupleScheme extends TupleScheme<deleteAllAdditionalLecturePermissions_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllAdditionalLecturePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- }
- }
-
- }
-
- public static class getOsNameForGuestOs_args implements org.apache.thrift.TBase<getOsNameForGuestOs_args, getOsNameForGuestOs_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOsNameForGuestOs_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOsNameForGuestOs_args");
-
- private static final org.apache.thrift.protocol.TField GUEST_OS_FIELD_DESC = new org.apache.thrift.protocol.TField("guestOS", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOsNameForGuestOs_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOsNameForGuestOs_argsTupleSchemeFactory());
- }
-
- public String guestOS; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- GUEST_OS((short)1, "guestOS"),
- TOKEN((short)2, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // GUEST_OS
- return GUEST_OS;
- case 2: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.GUEST_OS, new org.apache.thrift.meta_data.FieldMetaData("guestOS", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOsNameForGuestOs_args.class, metaDataMap);
- }
-
- public getOsNameForGuestOs_args() {
- }
-
- public getOsNameForGuestOs_args(
- String guestOS,
- String token)
- {
- this();
- this.guestOS = guestOS;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getOsNameForGuestOs_args(getOsNameForGuestOs_args other) {
- if (other.isSetGuestOS()) {
- this.guestOS = other.guestOS;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public getOsNameForGuestOs_args deepCopy() {
- return new getOsNameForGuestOs_args(this);
- }
-
- @Override
- public void clear() {
- this.guestOS = null;
- this.token = null;
- }
-
- public String getGuestOS() {
- return this.guestOS;
- }
-
- public getOsNameForGuestOs_args setGuestOS(String guestOS) {
- this.guestOS = guestOS;
- return this;
- }
-
- public void unsetGuestOS() {
- this.guestOS = null;
- }
-
- /** Returns true if field guestOS is set (has been assigned a value) and false otherwise */
- public boolean isSetGuestOS() {
- return this.guestOS != null;
- }
-
- public void setGuestOSIsSet(boolean value) {
- if (!value) {
- this.guestOS = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public getOsNameForGuestOs_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case GUEST_OS:
- if (value == null) {
- unsetGuestOS();
- } else {
- setGuestOS((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case GUEST_OS:
- return getGuestOS();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case GUEST_OS:
- return isSetGuestOS();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getOsNameForGuestOs_args)
- return this.equals((getOsNameForGuestOs_args)that);
- return false;
- }
-
- public boolean equals(getOsNameForGuestOs_args that) {
- if (that == null)
- return false;
-
- boolean this_present_guestOS = true && this.isSetGuestOS();
- boolean that_present_guestOS = true && that.isSetGuestOS();
- if (this_present_guestOS || that_present_guestOS) {
- if (!(this_present_guestOS && that_present_guestOS))
- return false;
- if (!this.guestOS.equals(that.guestOS))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getOsNameForGuestOs_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetGuestOS()).compareTo(other.isSetGuestOS());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGuestOS()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guestOS, other.guestOS);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOsNameForGuestOs_args(");
- boolean first = true;
-
- sb.append("guestOS:");
- if (this.guestOS == null) {
- sb.append("null");
- } else {
- sb.append(this.guestOS);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getOsNameForGuestOs_argsStandardSchemeFactory implements SchemeFactory {
- public getOsNameForGuestOs_argsStandardScheme getScheme() {
- return new getOsNameForGuestOs_argsStandardScheme();
- }
- }
-
- private static class getOsNameForGuestOs_argsStandardScheme extends StandardScheme<getOsNameForGuestOs_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getOsNameForGuestOs_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: // GUEST_OS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.guestOS = iprot.readString();
- struct.setGuestOSIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.guestOS != null) {
- oprot.writeFieldBegin(GUEST_OS_FIELD_DESC);
- oprot.writeString(struct.guestOS);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getOsNameForGuestOs_argsTupleSchemeFactory implements SchemeFactory {
- public getOsNameForGuestOs_argsTupleScheme getScheme() {
- return new getOsNameForGuestOs_argsTupleScheme();
- }
- }
-
- private static class getOsNameForGuestOs_argsTupleScheme extends TupleScheme<getOsNameForGuestOs_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetGuestOS()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- oprot.writeBitSet(optionals, 2);
- if (struct.isSetGuestOS()) {
- oprot.writeString(struct.guestOS);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
- if (incoming.get(0)) {
- struct.guestOS = iprot.readString();
- struct.setGuestOSIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class getOsNameForGuestOs_result implements org.apache.thrift.TBase<getOsNameForGuestOs_result, getOsNameForGuestOs_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOsNameForGuestOs_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOsNameForGuestOs_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOsNameForGuestOs_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOsNameForGuestOs_resultTupleSchemeFactory());
- }
-
- public String success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOsNameForGuestOs_result.class, metaDataMap);
- }
-
- public getOsNameForGuestOs_result() {
- }
-
- public getOsNameForGuestOs_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getOsNameForGuestOs_result(getOsNameForGuestOs_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
- }
-
- public getOsNameForGuestOs_result deepCopy() {
- return new getOsNameForGuestOs_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public String getSuccess() {
- return this.success;
- }
-
- public getOsNameForGuestOs_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getOsNameForGuestOs_result)
- return this.equals((getOsNameForGuestOs_result)that);
- return false;
- }
-
- public boolean equals(getOsNameForGuestOs_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getOsNameForGuestOs_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("getOsNameForGuestOs_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getOsNameForGuestOs_resultStandardSchemeFactory implements SchemeFactory {
- public getOsNameForGuestOs_resultStandardScheme getScheme() {
- return new getOsNameForGuestOs_resultStandardScheme();
- }
- }
-
- private static class getOsNameForGuestOs_resultStandardScheme extends StandardScheme<getOsNameForGuestOs_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getOsNameForGuestOs_resultTupleSchemeFactory implements SchemeFactory {
- public getOsNameForGuestOs_resultTupleScheme getScheme() {
- return new getOsNameForGuestOs_resultTupleScheme();
- }
- }
-
- private static class getOsNameForGuestOs_resultTupleScheme extends TupleScheme<getOsNameForGuestOs_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_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.writeString(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getOsNameForGuestOs_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class userIsImageAdmin_args implements org.apache.thrift.TBase<userIsImageAdmin_args, userIsImageAdmin_args._Fields>, java.io.Serializable, Cloneable, Comparable<userIsImageAdmin_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userIsImageAdmin_args");
-
- private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new userIsImageAdmin_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new userIsImageAdmin_argsTupleSchemeFactory());
- }
-
- public String imageID; // required
- public String token; // required
- public String userID; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- IMAGE_ID((short)1, "imageID"),
- TOKEN((short)2, "token"),
- USER_ID((short)3, "userID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // IMAGE_ID
- return IMAGE_ID;
- case 2: // TOKEN
- return TOKEN;
- case 3: // USER_ID
- return USER_ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsImageAdmin_args.class, metaDataMap);
- }
-
- public userIsImageAdmin_args() {
- }
-
- public userIsImageAdmin_args(
- String imageID,
- String token,
- String userID)
- {
- this();
- this.imageID = imageID;
- this.token = token;
- this.userID = userID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public userIsImageAdmin_args(userIsImageAdmin_args other) {
- if (other.isSetImageID()) {
- this.imageID = other.imageID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- }
-
- public userIsImageAdmin_args deepCopy() {
- return new userIsImageAdmin_args(this);
- }
-
- @Override
- public void clear() {
- this.imageID = null;
- this.token = null;
- this.userID = null;
- }
-
- public String getImageID() {
- return this.imageID;
- }
-
- public userIsImageAdmin_args setImageID(String imageID) {
- this.imageID = imageID;
- return this;
- }
-
- public void unsetImageID() {
- this.imageID = null;
- }
-
- /** Returns true if field imageID is set (has been assigned a value) and false otherwise */
- public boolean isSetImageID() {
- return this.imageID != null;
- }
-
- public void setImageIDIsSet(boolean value) {
- if (!value) {
- this.imageID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public userIsImageAdmin_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public userIsImageAdmin_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case IMAGE_ID:
- if (value == null) {
- unsetImageID();
- } else {
- setImageID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case IMAGE_ID:
- return getImageID();
-
- case TOKEN:
- return getToken();
-
- case USER_ID:
- return getUserID();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case IMAGE_ID:
- return isSetImageID();
- case TOKEN:
- return isSetToken();
- case USER_ID:
- return isSetUserID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof userIsImageAdmin_args)
- return this.equals((userIsImageAdmin_args)that);
- return false;
- }
-
- public boolean equals(userIsImageAdmin_args that) {
- if (that == null)
- return false;
-
- boolean this_present_imageID = true && this.isSetImageID();
- boolean that_present_imageID = true && that.isSetImageID();
- if (this_present_imageID || that_present_imageID) {
- if (!(this_present_imageID && that_present_imageID))
- return false;
- if (!this.imageID.equals(that.imageID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(userIsImageAdmin_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetImageID()).compareTo(other.isSetImageID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetImageID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageID, other.imageID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("userIsImageAdmin_args(");
- boolean first = true;
-
- sb.append("imageID:");
- if (this.imageID == null) {
- sb.append("null");
- } else {
- sb.append(this.imageID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class userIsImageAdmin_argsStandardSchemeFactory implements SchemeFactory {
- public userIsImageAdmin_argsStandardScheme getScheme() {
- return new userIsImageAdmin_argsStandardScheme();
- }
- }
-
- private static class userIsImageAdmin_argsStandardScheme extends StandardScheme<userIsImageAdmin_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, userIsImageAdmin_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: // IMAGE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, userIsImageAdmin_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.imageID != null) {
- oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC);
- oprot.writeString(struct.imageID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class userIsImageAdmin_argsTupleSchemeFactory implements SchemeFactory {
- public userIsImageAdmin_argsTupleScheme getScheme() {
- return new userIsImageAdmin_argsTupleScheme();
- }
- }
-
- private static class userIsImageAdmin_argsTupleScheme extends TupleScheme<userIsImageAdmin_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, userIsImageAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetImageID()) {
- optionals.set(0);
- }
- if (struct.isSetToken()) {
- optionals.set(1);
- }
- if (struct.isSetUserID()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetImageID()) {
- oprot.writeString(struct.imageID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, userIsImageAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.imageID = iprot.readString();
- struct.setImageIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- if (incoming.get(2)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class userIsImageAdmin_result implements org.apache.thrift.TBase<userIsImageAdmin_result, userIsImageAdmin_result._Fields>, java.io.Serializable, Cloneable, Comparable<userIsImageAdmin_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userIsImageAdmin_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new userIsImageAdmin_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new userIsImageAdmin_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsImageAdmin_result.class, metaDataMap);
- }
-
- public userIsImageAdmin_result() {
- }
-
- public userIsImageAdmin_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public userIsImageAdmin_result(userIsImageAdmin_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public userIsImageAdmin_result deepCopy() {
- return new userIsImageAdmin_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public userIsImageAdmin_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 userIsImageAdmin_result)
- return this.equals((userIsImageAdmin_result)that);
- return false;
- }
-
- public boolean equals(userIsImageAdmin_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(userIsImageAdmin_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("userIsImageAdmin_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 userIsImageAdmin_resultStandardSchemeFactory implements SchemeFactory {
- public userIsImageAdmin_resultStandardScheme getScheme() {
- return new userIsImageAdmin_resultStandardScheme();
- }
- }
-
- private static class userIsImageAdmin_resultStandardScheme extends StandardScheme<userIsImageAdmin_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, userIsImageAdmin_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, userIsImageAdmin_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 userIsImageAdmin_resultTupleSchemeFactory implements SchemeFactory {
- public userIsImageAdmin_resultTupleScheme getScheme() {
- return new userIsImageAdmin_resultTupleScheme();
- }
- }
-
- private static class userIsImageAdmin_resultTupleScheme extends TupleScheme<userIsImageAdmin_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, userIsImageAdmin_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, userIsImageAdmin_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class userIsLectureAdmin_args implements org.apache.thrift.TBase<userIsLectureAdmin_args, userIsLectureAdmin_args._Fields>, java.io.Serializable, Cloneable, Comparable<userIsLectureAdmin_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userIsLectureAdmin_args");
-
- private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureID", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new userIsLectureAdmin_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new userIsLectureAdmin_argsTupleSchemeFactory());
- }
-
- public String userID; // required
- public String lectureID; // required
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_ID((short)1, "userID"),
- LECTURE_ID((short)2, "lectureID"),
- TOKEN((short)3, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_ID
- return USER_ID;
- case 2: // LECTURE_ID
- return LECTURE_ID;
- case 3: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureID", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsLectureAdmin_args.class, metaDataMap);
- }
-
- public userIsLectureAdmin_args() {
- }
-
- public userIsLectureAdmin_args(
- String userID,
- String lectureID,
- String token)
- {
- this();
- this.userID = userID;
- this.lectureID = lectureID;
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public userIsLectureAdmin_args(userIsLectureAdmin_args other) {
- if (other.isSetUserID()) {
- this.userID = other.userID;
- }
- if (other.isSetLectureID()) {
- this.lectureID = other.lectureID;
- }
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public userIsLectureAdmin_args deepCopy() {
- return new userIsLectureAdmin_args(this);
- }
-
- @Override
- public void clear() {
- this.userID = null;
- this.lectureID = null;
- this.token = null;
- }
-
- public String getUserID() {
- return this.userID;
- }
-
- public userIsLectureAdmin_args setUserID(String userID) {
- this.userID = userID;
- return this;
- }
-
- public void unsetUserID() {
- this.userID = null;
- }
-
- /** Returns true if field userID is set (has been assigned a value) and false otherwise */
- public boolean isSetUserID() {
- return this.userID != null;
- }
-
- public void setUserIDIsSet(boolean value) {
- if (!value) {
- this.userID = null;
- }
- }
-
- public String getLectureID() {
- return this.lectureID;
- }
-
- public userIsLectureAdmin_args setLectureID(String lectureID) {
- this.lectureID = lectureID;
- return this;
- }
-
- public void unsetLectureID() {
- this.lectureID = null;
- }
-
- /** Returns true if field lectureID is set (has been assigned a value) and false otherwise */
- public boolean isSetLectureID() {
- return this.lectureID != null;
- }
-
- public void setLectureIDIsSet(boolean value) {
- if (!value) {
- this.lectureID = null;
- }
- }
-
- public String getToken() {
- return this.token;
- }
-
- public userIsLectureAdmin_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_ID:
- if (value == null) {
- unsetUserID();
- } else {
- setUserID((String)value);
- }
- break;
-
- case LECTURE_ID:
- if (value == null) {
- unsetLectureID();
- } else {
- setLectureID((String)value);
- }
- break;
-
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_ID:
- return getUserID();
-
- case LECTURE_ID:
- return getLectureID();
-
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_ID:
- return isSetUserID();
- case LECTURE_ID:
- return isSetLectureID();
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof userIsLectureAdmin_args)
- return this.equals((userIsLectureAdmin_args)that);
- return false;
- }
-
- public boolean equals(userIsLectureAdmin_args that) {
- if (that == null)
- return false;
-
- boolean this_present_userID = true && this.isSetUserID();
- boolean that_present_userID = true && that.isSetUserID();
- if (this_present_userID || that_present_userID) {
- if (!(this_present_userID && that_present_userID))
- return false;
- if (!this.userID.equals(that.userID))
- return false;
- }
-
- boolean this_present_lectureID = true && this.isSetLectureID();
- boolean that_present_lectureID = true && that.isSetLectureID();
- if (this_present_lectureID || that_present_lectureID) {
- if (!(this_present_lectureID && that_present_lectureID))
- return false;
- if (!this.lectureID.equals(that.lectureID))
- return false;
- }
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(userIsLectureAdmin_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetLectureID()).compareTo(other.isSetLectureID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetLectureID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureID, other.lectureID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("userIsLectureAdmin_args(");
- boolean first = true;
-
- sb.append("userID:");
- if (this.userID == null) {
- sb.append("null");
- } else {
- sb.append(this.userID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("lectureID:");
- if (this.lectureID == null) {
- sb.append("null");
- } else {
- sb.append(this.lectureID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class userIsLectureAdmin_argsStandardSchemeFactory implements SchemeFactory {
- public userIsLectureAdmin_argsStandardScheme getScheme() {
- return new userIsLectureAdmin_argsStandardScheme();
- }
- }
-
- private static class userIsLectureAdmin_argsStandardScheme extends StandardScheme<userIsLectureAdmin_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // LECTURE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userID != null) {
- oprot.writeFieldBegin(USER_ID_FIELD_DESC);
- oprot.writeString(struct.userID);
- oprot.writeFieldEnd();
- }
- if (struct.lectureID != null) {
- oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
- oprot.writeString(struct.lectureID);
- oprot.writeFieldEnd();
- }
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class userIsLectureAdmin_argsTupleSchemeFactory implements SchemeFactory {
- public userIsLectureAdmin_argsTupleScheme getScheme() {
- return new userIsLectureAdmin_argsTupleScheme();
- }
- }
-
- private static class userIsLectureAdmin_argsTupleScheme extends TupleScheme<userIsLectureAdmin_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserID()) {
- optionals.set(0);
- }
- if (struct.isSetLectureID()) {
- optionals.set(1);
- }
- if (struct.isSetToken()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetUserID()) {
- oprot.writeString(struct.userID);
- }
- if (struct.isSetLectureID()) {
- oprot.writeString(struct.lectureID);
- }
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, userIsLectureAdmin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.userID = iprot.readString();
- struct.setUserIDIsSet(true);
- }
- if (incoming.get(1)) {
- struct.lectureID = iprot.readString();
- struct.setLectureIDIsSet(true);
- }
- if (incoming.get(2)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class userIsLectureAdmin_result implements org.apache.thrift.TBase<userIsLectureAdmin_result, userIsLectureAdmin_result._Fields>, java.io.Serializable, Cloneable, Comparable<userIsLectureAdmin_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("userIsLectureAdmin_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new userIsLectureAdmin_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new userIsLectureAdmin_resultTupleSchemeFactory());
- }
-
- public boolean success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(userIsLectureAdmin_result.class, metaDataMap);
- }
-
- public userIsLectureAdmin_result() {
- }
-
- public userIsLectureAdmin_result(
- boolean success)
- {
- this();
- this.success = success;
- setSuccessIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public userIsLectureAdmin_result(userIsLectureAdmin_result other) {
- __isset_bitfield = other.__isset_bitfield;
- this.success = other.success;
- }
-
- public userIsLectureAdmin_result deepCopy() {
- return new userIsLectureAdmin_result(this);
- }
-
- @Override
- public void clear() {
- setSuccessIsSet(false);
- this.success = false;
- }
-
- public boolean isSuccess() {
- return this.success;
- }
-
- public userIsLectureAdmin_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 userIsLectureAdmin_result)
- return this.equals((userIsLectureAdmin_result)that);
- return false;
- }
-
- public boolean equals(userIsLectureAdmin_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(userIsLectureAdmin_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("userIsLectureAdmin_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 userIsLectureAdmin_resultStandardSchemeFactory implements SchemeFactory {
- public userIsLectureAdmin_resultStandardScheme getScheme() {
- return new userIsLectureAdmin_resultStandardScheme();
- }
- }
-
- private static class userIsLectureAdmin_resultStandardScheme extends StandardScheme<userIsLectureAdmin_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, userIsLectureAdmin_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, userIsLectureAdmin_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 userIsLectureAdmin_resultTupleSchemeFactory implements SchemeFactory {
- public userIsLectureAdmin_resultTupleScheme getScheme() {
- return new userIsLectureAdmin_resultTupleScheme();
- }
- }
-
- private static class userIsLectureAdmin_resultTupleScheme extends TupleScheme<userIsLectureAdmin_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, userIsLectureAdmin_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, userIsLectureAdmin_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readBool();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class createRandomUUID_args implements org.apache.thrift.TBase<createRandomUUID_args, createRandomUUID_args._Fields>, java.io.Serializable, Cloneable, Comparable<createRandomUUID_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRandomUUID_args");
-
- private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createRandomUUID_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createRandomUUID_argsTupleSchemeFactory());
- }
-
- public String token; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TOKEN((short)1, "token");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // TOKEN
- return TOKEN;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRandomUUID_args.class, metaDataMap);
- }
-
- public createRandomUUID_args() {
- }
-
- public createRandomUUID_args(
- String token)
- {
- this();
- this.token = token;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public createRandomUUID_args(createRandomUUID_args other) {
- if (other.isSetToken()) {
- this.token = other.token;
- }
- }
-
- public createRandomUUID_args deepCopy() {
- return new createRandomUUID_args(this);
- }
-
- @Override
- public void clear() {
- this.token = null;
- }
-
- public String getToken() {
- return this.token;
- }
-
- public createRandomUUID_args setToken(String token) {
- this.token = token;
- return this;
- }
-
- public void unsetToken() {
- this.token = null;
- }
-
- /** Returns true if field token is set (has been assigned a value) and false otherwise */
- public boolean isSetToken() {
- return this.token != null;
- }
-
- public void setTokenIsSet(boolean value) {
- if (!value) {
- this.token = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOKEN:
- if (value == null) {
- unsetToken();
- } else {
- setToken((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOKEN:
- return getToken();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case TOKEN:
- return isSetToken();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof createRandomUUID_args)
- return this.equals((createRandomUUID_args)that);
- return false;
- }
-
- public boolean equals(createRandomUUID_args that) {
- if (that == null)
- return false;
-
- boolean this_present_token = true && this.isSetToken();
- boolean that_present_token = true && that.isSetToken();
- if (this_present_token || that_present_token) {
- if (!(this_present_token && that_present_token))
- return false;
- if (!this.token.equals(that.token))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(createRandomUUID_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetToken()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("createRandomUUID_args(");
- boolean first = true;
-
- sb.append("token:");
- if (this.token == null) {
- sb.append("null");
- } else {
- sb.append(this.token);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class createRandomUUID_argsStandardSchemeFactory implements SchemeFactory {
- public createRandomUUID_argsStandardScheme getScheme() {
- return new createRandomUUID_argsStandardScheme();
- }
- }
-
- private static class createRandomUUID_argsStandardScheme extends StandardScheme<createRandomUUID_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, createRandomUUID_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // TOKEN
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, createRandomUUID_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.token != null) {
- oprot.writeFieldBegin(TOKEN_FIELD_DESC);
- oprot.writeString(struct.token);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class createRandomUUID_argsTupleSchemeFactory implements SchemeFactory {
- public createRandomUUID_argsTupleScheme getScheme() {
- return new createRandomUUID_argsTupleScheme();
- }
- }
-
- private static class createRandomUUID_argsTupleScheme extends TupleScheme<createRandomUUID_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetToken()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetToken()) {
- oprot.writeString(struct.token);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.token = iprot.readString();
- struct.setTokenIsSet(true);
- }
- }
- }
-
- }
-
- public static class createRandomUUID_result implements org.apache.thrift.TBase<createRandomUUID_result, createRandomUUID_result._Fields>, java.io.Serializable, Cloneable, Comparable<createRandomUUID_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRandomUUID_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createRandomUUID_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createRandomUUID_resultTupleSchemeFactory());
- }
-
- public String success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRandomUUID_result.class, metaDataMap);
- }
-
- public createRandomUUID_result() {
- }
-
- public createRandomUUID_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public createRandomUUID_result(createRandomUUID_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
- }
-
- public createRandomUUID_result deepCopy() {
- return new createRandomUUID_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public String getSuccess() {
- return this.success;
- }
-
- public createRandomUUID_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof createRandomUUID_result)
- return this.equals((createRandomUUID_result)that);
- return false;
- }
-
- public boolean equals(createRandomUUID_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(createRandomUUID_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("createRandomUUID_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class createRandomUUID_resultStandardSchemeFactory implements SchemeFactory {
- public createRandomUUID_resultStandardScheme getScheme() {
- return new createRandomUUID_resultStandardScheme();
- }
- }
-
- private static class createRandomUUID_resultStandardScheme extends StandardScheme<createRandomUUID_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, createRandomUUID_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, createRandomUUID_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class createRandomUUID_resultTupleSchemeFactory implements SchemeFactory {
- public createRandomUUID_resultTupleScheme getScheme() {
- return new createRandomUUID_resultTupleScheme();
- }
- }
-
- private static class createRandomUUID_resultTupleScheme extends TupleScheme<createRandomUUID_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_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.writeString(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, createRandomUUID_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
- public static class getInstitutionByID_args implements org.apache.thrift.TBase<getInstitutionByID_args, getInstitutionByID_args._Fields>, java.io.Serializable, Cloneable, Comparable<getInstitutionByID_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInstitutionByID_args");
-
- private static final org.apache.thrift.protocol.TField INSTITUTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("institutionID", org.apache.thrift.protocol.TType.STRING, (short)1);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getInstitutionByID_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getInstitutionByID_argsTupleSchemeFactory());
- }
-
- public String institutionID; // 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 {
- INSTITUTION_ID((short)1, "institutionID");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // INSTITUTION_ID
- return INSTITUTION_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.INSTITUTION_ID, new org.apache.thrift.meta_data.FieldMetaData("institutionID", 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(getInstitutionByID_args.class, metaDataMap);
- }
-
- public getInstitutionByID_args() {
- }
-
- public getInstitutionByID_args(
- String institutionID)
- {
- this();
- this.institutionID = institutionID;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getInstitutionByID_args(getInstitutionByID_args other) {
- if (other.isSetInstitutionID()) {
- this.institutionID = other.institutionID;
- }
- }
-
- public getInstitutionByID_args deepCopy() {
- return new getInstitutionByID_args(this);
- }
-
- @Override
- public void clear() {
- this.institutionID = null;
- }
-
- public String getInstitutionID() {
- return this.institutionID;
- }
-
- public getInstitutionByID_args setInstitutionID(String institutionID) {
- this.institutionID = institutionID;
- return this;
- }
-
- public void unsetInstitutionID() {
- this.institutionID = null;
- }
-
- /** Returns true if field institutionID is set (has been assigned a value) and false otherwise */
- public boolean isSetInstitutionID() {
- return this.institutionID != null;
- }
-
- public void setInstitutionIDIsSet(boolean value) {
- if (!value) {
- this.institutionID = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case INSTITUTION_ID:
- if (value == null) {
- unsetInstitutionID();
- } else {
- setInstitutionID((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case INSTITUTION_ID:
- return getInstitutionID();
-
- }
- 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 INSTITUTION_ID:
- return isSetInstitutionID();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getInstitutionByID_args)
- return this.equals((getInstitutionByID_args)that);
- return false;
- }
-
- public boolean equals(getInstitutionByID_args that) {
- if (that == null)
- return false;
-
- boolean this_present_institutionID = true && this.isSetInstitutionID();
- boolean that_present_institutionID = true && that.isSetInstitutionID();
- if (this_present_institutionID || that_present_institutionID) {
- if (!(this_present_institutionID && that_present_institutionID))
- return false;
- if (!this.institutionID.equals(that.institutionID))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getInstitutionByID_args other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetInstitutionID()).compareTo(other.isSetInstitutionID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetInstitutionID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.institutionID, other.institutionID);
- 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("getInstitutionByID_args(");
- boolean first = true;
-
- sb.append("institutionID:");
- if (this.institutionID == null) {
- sb.append("null");
- } else {
- sb.append(this.institutionID);
- }
- 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 getInstitutionByID_argsStandardSchemeFactory implements SchemeFactory {
- public getInstitutionByID_argsStandardScheme getScheme() {
- return new getInstitutionByID_argsStandardScheme();
- }
- }
-
- private static class getInstitutionByID_argsStandardScheme extends StandardScheme<getInstitutionByID_args> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getInstitutionByID_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: // INSTITUTION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.institutionID = iprot.readString();
- struct.setInstitutionIDIsSet(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, getInstitutionByID_args struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.institutionID != null) {
- oprot.writeFieldBegin(INSTITUTION_ID_FIELD_DESC);
- oprot.writeString(struct.institutionID);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getInstitutionByID_argsTupleSchemeFactory implements SchemeFactory {
- public getInstitutionByID_argsTupleScheme getScheme() {
- return new getInstitutionByID_argsTupleScheme();
- }
- }
-
- private static class getInstitutionByID_argsTupleScheme extends TupleScheme<getInstitutionByID_args> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getInstitutionByID_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetInstitutionID()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetInstitutionID()) {
- oprot.writeString(struct.institutionID);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getInstitutionByID_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.institutionID = iprot.readString();
- struct.setInstitutionIDIsSet(true);
- }
- }
- }
-
- }
-
- public static class getInstitutionByID_result implements org.apache.thrift.TBase<getInstitutionByID_result, getInstitutionByID_result._Fields>, java.io.Serializable, Cloneable, Comparable<getInstitutionByID_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInstitutionByID_result");
-
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getInstitutionByID_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getInstitutionByID_resultTupleSchemeFactory());
- }
-
- public String success; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 0: // SUCCESS
- return SUCCESS;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInstitutionByID_result.class, metaDataMap);
- }
-
- public getInstitutionByID_result() {
- }
-
- public getInstitutionByID_result(
- String success)
- {
- this();
- this.success = success;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public getInstitutionByID_result(getInstitutionByID_result other) {
- if (other.isSetSuccess()) {
- this.success = other.success;
- }
- }
-
- public getInstitutionByID_result deepCopy() {
- return new getInstitutionByID_result(this);
- }
-
- @Override
- public void clear() {
- this.success = null;
- }
-
- public String getSuccess() {
- return this.success;
- }
-
- public getInstitutionByID_result setSuccess(String success) {
- this.success = success;
- return this;
- }
-
- public void unsetSuccess() {
- this.success = null;
- }
-
- /** Returns true if field success is set (has been assigned a value) and false otherwise */
- public boolean isSetSuccess() {
- return this.success != null;
- }
-
- public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUCCESS:
- return getSuccess();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUCCESS:
- return isSetSuccess();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof getInstitutionByID_result)
- return this.equals((getInstitutionByID_result)that);
- return false;
- }
-
- public boolean equals(getInstitutionByID_result that) {
- if (that == null)
- return false;
-
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(getInstitutionByID_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("getInstitutionByID_result(");
- boolean first = true;
-
- sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class getInstitutionByID_resultStandardSchemeFactory implements SchemeFactory {
- public getInstitutionByID_resultStandardScheme getScheme() {
- return new getInstitutionByID_resultStandardScheme();
- }
- }
-
- private static class getInstitutionByID_resultStandardScheme extends StandardScheme<getInstitutionByID_result> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, getInstitutionByID_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 0: // SUCCESS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, getInstitutionByID_result struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.success != null) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeString(struct.success);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class getInstitutionByID_resultTupleSchemeFactory implements SchemeFactory {
- public getInstitutionByID_resultTupleScheme getScheme() {
- return new getInstitutionByID_resultTupleScheme();
- }
- }
-
- private static class getInstitutionByID_resultTupleScheme extends TupleScheme<getInstitutionByID_result> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, getInstitutionByID_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.writeString(struct.success);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, getInstitutionByID_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.success = iprot.readString();
- struct.setSuccessIsSet(true);
- }
- }
- }
-
- }
-
-}
diff --git a/src/main/java/org/openslx/sat/thrift/iface/User.java b/src/main/java/org/openslx/sat/thrift/iface/User.java
deleted file mode 100644
index bf52f86..0000000
--- a/src/main/java/org/openslx/sat/thrift/iface/User.java
+++ /dev/null
@@ -1,588 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package org.openslx.sat.thrift.iface;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class User implements org.apache.thrift.TBase<User, User._Fields>, java.io.Serializable, Cloneable, Comparable<User> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("User");
-
- private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UserStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UserTupleSchemeFactory());
- }
-
- public String userName; // required
- public String password; // required
- public String path; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- USER_NAME((short)1, "userName"),
- PASSWORD((short)2, "password"),
- PATH((short)3, "path");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // USER_NAME
- return USER_NAME;
- case 2: // PASSWORD
- return PASSWORD;
- case 3: // PATH
- return PATH;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", 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(User.class, metaDataMap);
- }
-
- public User() {
- }
-
- public User(
- String userName,
- String password,
- String path)
- {
- this();
- this.userName = userName;
- this.password = password;
- this.path = path;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public User(User other) {
- if (other.isSetUserName()) {
- this.userName = other.userName;
- }
- if (other.isSetPassword()) {
- this.password = other.password;
- }
- if (other.isSetPath()) {
- this.path = other.path;
- }
- }
-
- public User deepCopy() {
- return new User(this);
- }
-
- @Override
- public void clear() {
- this.userName = null;
- this.password = null;
- this.path = null;
- }
-
- public String getUserName() {
- return this.userName;
- }
-
- public User setUserName(String userName) {
- this.userName = userName;
- return this;
- }
-
- public void unsetUserName() {
- this.userName = null;
- }
-
- /** Returns true if field userName is set (has been assigned a value) and false otherwise */
- public boolean isSetUserName() {
- return this.userName != null;
- }
-
- public void setUserNameIsSet(boolean value) {
- if (!value) {
- this.userName = null;
- }
- }
-
- public String getPassword() {
- return this.password;
- }
-
- public User setPassword(String password) {
- this.password = password;
- return this;
- }
-
- public void unsetPassword() {
- this.password = null;
- }
-
- /** Returns true if field password is set (has been assigned a value) and false otherwise */
- public boolean isSetPassword() {
- return this.password != null;
- }
-
- public void setPasswordIsSet(boolean value) {
- if (!value) {
- this.password = null;
- }
- }
-
- public String getPath() {
- return this.path;
- }
-
- public User setPath(String path) {
- this.path = path;
- return this;
- }
-
- public void unsetPath() {
- this.path = null;
- }
-
- /** Returns true if field path is set (has been assigned a value) and false otherwise */
- public boolean isSetPath() {
- return this.path != null;
- }
-
- public void setPathIsSet(boolean value) {
- if (!value) {
- this.path = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case USER_NAME:
- if (value == null) {
- unsetUserName();
- } else {
- setUserName((String)value);
- }
- break;
-
- case PASSWORD:
- if (value == null) {
- unsetPassword();
- } else {
- setPassword((String)value);
- }
- break;
-
- case PATH:
- if (value == null) {
- unsetPath();
- } else {
- setPath((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case USER_NAME:
- return getUserName();
-
- case PASSWORD:
- return getPassword();
-
- case PATH:
- return getPath();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case USER_NAME:
- return isSetUserName();
- case PASSWORD:
- return isSetPassword();
- case PATH:
- return isSetPath();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof User)
- return this.equals((User)that);
- return false;
- }
-
- public boolean equals(User that) {
- if (that == null)
- return false;
-
- boolean this_present_userName = true && this.isSetUserName();
- boolean that_present_userName = true && that.isSetUserName();
- if (this_present_userName || that_present_userName) {
- if (!(this_present_userName && that_present_userName))
- return false;
- if (!this.userName.equals(that.userName))
- return false;
- }
-
- boolean this_present_password = true && this.isSetPassword();
- boolean that_present_password = true && that.isSetPassword();
- if (this_present_password || that_present_password) {
- if (!(this_present_password && that_present_password))
- return false;
- if (!this.password.equals(that.password))
- return false;
- }
-
- boolean this_present_path = true && this.isSetPath();
- boolean that_present_path = true && that.isSetPath();
- if (this_present_path || that_present_path) {
- if (!(this_present_path && that_present_path))
- return false;
- if (!this.path.equals(that.path))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return 0;
- }
-
- @Override
- public int compareTo(User other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPassword()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPath()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
- 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("User(");
- boolean first = true;
-
- sb.append("userName:");
- if (this.userName == null) {
- sb.append("null");
- } else {
- sb.append(this.userName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("password:");
- if (this.password == null) {
- sb.append("null");
- } else {
- sb.append(this.password);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("path:");
- if (this.path == null) {
- sb.append("null");
- } else {
- sb.append(this.path);
- }
- 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 UserStandardSchemeFactory implements SchemeFactory {
- public UserStandardScheme getScheme() {
- return new UserStandardScheme();
- }
- }
-
- private static class UserStandardScheme extends StandardScheme<User> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, User struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // USER_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // PASSWORD
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // PATH
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.path = iprot.readString();
- struct.setPathIsSet(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, User struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.userName != null) {
- oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
- oprot.writeString(struct.userName);
- oprot.writeFieldEnd();
- }
- if (struct.password != null) {
- oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
- oprot.writeString(struct.password);
- oprot.writeFieldEnd();
- }
- if (struct.path != null) {
- oprot.writeFieldBegin(PATH_FIELD_DESC);
- oprot.writeString(struct.path);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class UserTupleSchemeFactory implements SchemeFactory {
- public UserTupleScheme getScheme() {
- return new UserTupleScheme();
- }
- }
-
- private static class UserTupleScheme extends TupleScheme<User> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetUserName()) {
- optionals.set(0);
- }
- if (struct.isSetPassword()) {
- optionals.set(1);
- }
- if (struct.isSetPath()) {
- optionals.set(2);
- }
- oprot.writeBitSet(optionals, 3);
- if (struct.isSetUserName()) {
- oprot.writeString(struct.userName);
- }
- if (struct.isSetPassword()) {
- oprot.writeString(struct.password);
- }
- if (struct.isSetPath()) {
- oprot.writeString(struct.path);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, User struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
- if (incoming.get(0)) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- }
- if (incoming.get(1)) {
- struct.password = iprot.readString();
- struct.setPasswordIsSet(true);
- }
- if (incoming.get(2)) {
- struct.path = iprot.readString();
- struct.setPathIsSet(true);
- }
- }
- }
-
-}
-
diff --git a/src/main/java/org/openslx/sat/thrift/version/Version.java b/src/main/java/org/openslx/sat/thrift/version/Version.java
index ac7a00a..c8e27a8 100644
--- a/src/main/java/org/openslx/sat/thrift/version/Version.java
+++ b/src/main/java/org/openslx/sat/thrift/version/Version.java
@@ -8,6 +8,6 @@ package org.openslx.sat.thrift.version;
*/
public class Version {
- public static final long VERSION = 1;
+ public static final long VERSION = 2;
}
diff --git a/src/main/java/org/openslx/thrifthelper/ThriftHandler.java b/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
index 0d30ccb..54d26f4 100644
--- a/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
+++ b/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
@@ -52,6 +52,7 @@ class ThriftHandler<T extends Object> implements InvocationHandler
private final Set<String> thriftMethods;
+ @Override
public Object invoke( Object tproxy, Method method, Object[] args ) throws Throwable
{
@@ -73,25 +74,31 @@ class ThriftHandler<T extends Object> implements InvocationHandler
T client = getClient( false );
Throwable cause = null;
for ( int i = 0; i < 3; i++ ) {
+ if ( client == null ) {
+ LOGGER.debug( "Transport error - re-initialising ..." );
+ try {
+ Thread.sleep( 1000 + 3000 * i );
+ } catch ( Exception eee ) {
+ }
+ client = getClient( true );
+ if ( client == null )
+ continue;
+ }
try {
return method.invoke( client, args );
} catch ( InvocationTargetException e ) {
cause = e.getCause();
- if ( cause instanceof TTransportException ) {
- LOGGER.debug( "Transport error - re-initialising ..." );
- // new client
- client = getClient( true );
- }
+ client = null;
+ if ( cause != null && ! ( cause instanceof TTransportException ) )
+ throw cause;
}
}
-
+
// Uh oh
callback.error( cause, "Could not reconnect to thrift server - network or server down?" );
-
if ( cause != null )
throw cause;
return null;
-
}
private T getClient( boolean forceNew )
@@ -101,10 +108,6 @@ class ThriftHandler<T extends Object> implements InvocationHandler
return client;
}
client = callback.getNewClient();
- if ( client == null ) {
- // TODO own exception
- throw new RuntimeException();
- }
clients.set( client );
return client;
}
diff --git a/src/main/java/org/openslx/util/TimeoutReference.java b/src/main/java/org/openslx/util/TimeoutReference.java
new file mode 100644
index 0000000..4d7a992
--- /dev/null
+++ b/src/main/java/org/openslx/util/TimeoutReference.java
@@ -0,0 +1,49 @@
+package org.openslx.util;
+
+/**
+ * A reference holder that will only return the object it is holding if
+ * the given timeout has not been reached.
+ * The timeout will start anew if you set this reference to hold a new object,
+ * or if you retrieve the object, and refreshOnGet is set to true.
+ */
+public class TimeoutReference<T>
+{
+
+ private final long timeoutMs;
+ private long deadline;
+ private boolean refreshOnGet;
+ private T item;
+
+ public TimeoutReference( boolean refreshOnGet, long timeoutMs, T item )
+ {
+ this.refreshOnGet = refreshOnGet;
+ this.item = item;
+ this.timeoutMs = timeoutMs;
+ this.deadline = System.currentTimeMillis() + timeoutMs;
+ }
+
+ public TimeoutReference( long timeoutMs, T item )
+ {
+ this( false, timeoutMs, item );
+ }
+
+ public synchronized T get()
+ {
+ if ( item != null ) {
+ final long now = System.currentTimeMillis();
+ if ( deadline < now ) {
+ item = null;
+ } else if ( refreshOnGet ) {
+ deadline = now + timeoutMs;
+ }
+ }
+ return item;
+ }
+
+ public synchronized void set( T newItem )
+ {
+ this.item = newItem;
+ this.deadline = System.currentTimeMillis() + timeoutMs;
+ }
+
+}
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
new file mode 100644
index 0000000..4d2a588
--- /dev/null
+++ b/src/main/thrift/bwlp.thrift
@@ -0,0 +1,242 @@
+/**
+ * Define some namespace/package name for our stuff
+ */
+namespace java org.openslx.bwlp.thrift.iface
+
+typedef i64 int
+
+typedef string ID
+typedef string Token
+typedef string UUID
+typedef string UserID
+typedef i64 UnixTimestamp
+
+// ################# ENUM ################
+
+enum AuthorizationError {
+ GENERIC_ERROR,
+ NOT_AUTHENTICATED,
+ NO_PERMISSION
+}
+
+enum AuthenticationError {
+ GENERIC_ERROR,
+ INVALID_CREDENTIALS,
+ ACCOUNT_SUSPENDED,
+ INVALID_ORGANIZATION,
+ INVALID_KEY,
+ CHALLENGE_FAILED,
+ BANNED_NETWORK
+}
+
+enum ImageDataError {
+ INVALID_DATA,
+ UNKNOWN_IMAGE
+}
+
+enum UploadError {
+ INVALID_CRC,
+ BROKEN_BLOCK,
+ GENERIC_ERROR,
+ INVALID_METADATA,
+ ALREADY_COMPLETE
+}
+
+// ############## STRUCT ###############
+
+struct UserInfo {
+ 1: string userId,
+ 2: string firstName,
+ 3: string lastName,
+ 4: string eMail,
+ 5: string organizationId
+}
+
+struct OrganizationData {
+ 1: string organizationId,
+ 2: string displayName,
+ 3: string ecpUrl,
+ 4: list<string> suffixList,
+}
+
+struct SessionData {
+ 1: ID sessionId,
+ 2: Token authToken,
+ 3: string serverAddress
+}
+
+struct ServerSessionData {
+ 1: ID sessionId
+}
+
+struct OperatingSystem {
+ 1: i32 osId,
+ 2: string osName,
+ 3: map<string, string> virtualizerOsId,
+ 4: string architecture,
+}
+
+struct ImagePermission {
+ 1: bool read
+ 2: bool write
+ 3: bool admin
+ 4: bool link
+}
+
+struct LecturePermission {
+ 1: bool write
+ 2: bool admin
+}
+
+struct ImageBaseData {
+ 1: UUID imageBaseId,
+ 3: string imageName,
+ 10: string description,
+ 5: i32 osId,
+ 6: UnixTimestamp createTime,
+ 7: UnixTimestamp updateTime,
+ 9: string isTemplate,
+}
+struct ImagePermissionCombined {
+ 1: Image image,
+ 2: ImagePermission permission,
+}
+
+struct Lecture {
+ 1: optional UUID lectureId,
+ 2: string lectureName,
+ 3: string isActive,
+ 4: UnixTimestamp startTime,
+ 5: UnixTimestamp endTime,
+ 6: UnixTimestamp lastUsed,
+ 7: string description,
+ 8: UUID imageId
+}
+struct LecturePermissionCombined {
+ 1: Lecture lecture,
+ 2: LecturePermission permission,
+}
+
+struct TransferInformation {
+ 1: string token,
+ 2: i32 plainPort,
+ 3: i32 sslPort,
+}
+
+// ############ EXCEPTION ######################
+
+exception TUploadFinishException {
+ 1: string reason,
+}
+
+exception TUploadRejectedException {
+ 1: string reason,
+}
+
+exception TAuthorizationException {
+ 1: AuthorizationError number,
+ 2: string message
+}
+
+exception TAuthenticationException {
+ 1: AuthenticationError number,
+ 2: string message
+}
+
+exception TInvalidTokenException {
+}
+
+exception TImageDataException {
+ 1: ImageDataError number,
+ 2: string message
+}
+
+exception TDownloadRejectedException {
+ 1: UploadError number,
+ 2: string message
+}
+
+// #############################################
+
+service SatelliteServer {
+ int getVersion(),
+
+ // File transfer related
+ TransferInformation requestUpload(1: string userToken, 2: i64 fileSize, 3: list<binary> blockHashes)
+ throws (1:TUploadRejectedException rejection),
+ void cancelUpload(1: string uploadToken),
+ TransferInformation requestDownload(1: string userToken, 2: string imageId),
+ void cancelDownload(1: string downloadToken),
+
+ // Authentication
+ bool authenticated(1: Token userToken),
+ bool setSessionInvalid(1: Token userToken),
+
+ // Misc
+ list<OperatingSystem> getOperatingSystems(),
+ list<string> getAllOrganizations(1: Token userToken),
+
+ // Image related
+ string finishImageUpload(1: string imageName, 2: string description, 10: bool license, 11: bool internet, 17: int shareMode, 18: string os, 22: Token uploadToken)
+ throws (1:TUploadFinishException failure),
+ list<ImagePermissionCombined> getImageList(1: Token userToken),
+ ImagePermissionCombined getImageData(1: UUID imageId, 3: Token userToken),
+ bool updateImageData(1: Token userToken, 9: Image image),
+
+ // Lecture related
+ bool writeLecture(1: Token userToken, 2: Lecture lecture),
+ list<Lecture> getLectureList(1: Token userToken),
+ Lecture getLectureData(1: UUID lectureId, 2: Token userToken),
+ bool deleteImage(1: string id, 2: string version, 3: string token),
+ bool connectedToLecture(1: string id, 2: string version, 3: string token),
+ bool deleteLecture(1: string lectureId, 2: string token),
+ bool checkUser(1: string username, 2: string token),
+ bool writeImagePermissions(1: Token userToken, 2: UUID imageId, 3: list<ImagePermission> permissions),
+ bool writeLecturePermissions(1: Token userToken, 2: UUID lectureId, 3: list<LecturePermission> permissions),
+ map<UserID, UserInfo> getImagePermissions(1: Token userToken, 2: UUID imageId),
+ map<UserID, UserInfo> getLecturePermissions(1: Token userToken, 2: UUID lectureId),
+ void deleteAllAdditionalImagePermissions(1: UUID imageID, 2: Token userToken),
+ void deleteAllAdditionalLecturePermissions(1: UUID lectureID, 2: Token userToken),
+}
+
+// Central master server
+
+service MasterServer {
+
+/*
+ * Client (User's Desktop App) calls
+ */
+ bool ping(),
+
+ SessionData authenticate(1:string login, 2:string password) throws (1:AuthenticationException failure),
+
+ list<OrganizationData> getOrganizations(),
+
+ list<UserInfo> findUser(1:ID sessionId, 2:string organizationId, 3:string searchTerm) throws (1:AuthorizationException failure),
+
+ list<ImageData> getPublicImages(1:ID sessionId, 2:i32 page) throws (1:AuthorizationException failure),
+
+ list<OperatingSystem> getOperatingSystems(),
+
+/*
+ * Server (Satellite) calls
+ */
+ UserInfo getUserFromToken(1:Token token) throws (1:InvalidTokenException failure),
+
+ bool isServerAuthenticated(1:string serverSessionId),
+
+ binary startServerAuthentication(1:string organization) throws (1: AuthenticationException failure),
+
+ ServerSessionData serverAuthenticate(1:string organizationId, 2:binary challengeResponse) throws (1:AuthenticationException failure),
+
+ UploadData submitImage(1:ID serverSessionId, 2:ImageData imageDescription, 3:list<i32> crcSums) throws (1:AuthorizationException failure, 2: ImageDataException failure2, 3: UploadException failure3),
+
+ DownloadData getImage(2:ID serverSessionId, 1:UUID uuid) throws (1:AuthorizationException failure, 2: ImageDataException failure2),
+
+ bool publishUser(1:ID serverSessionId, 2:UserInfo user) throws (1:AuthorizationException failure),
+
+ bool registerSatellite(1:string organizationId, 2:string address, 3:string modulus, 4:string exponent),
+
+ bool updateSatelliteAddress(1:ID serverSessionId, 2:string address),
+
+}
diff --git a/src/main/thrift/imagemaster.thrift b/src/main/thrift/imagemaster.thrift
deleted file mode 100644
index 7d7b39e..0000000
--- a/src/main/thrift/imagemaster.thrift
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Define some namespace/package name for our stuff
- */
-
-namespace java org.openslx.imagemaster.thrift.iface
-namespace php testing
-
-typedef string ID
-typedef string Token
-typedef string UUID
-typedef i64 UnixTimestamp
-
-enum AuthorizationError {
- GENERIC_ERROR,
- NOT_AUTHENTICATED,
- NO_PERMISSION
-}
-
-enum AuthenticationError {
- GENERIC_ERROR,
- INVALID_CREDENTIALS,
- ACCOUNT_SUSPENDED,
- INVALID_ORGANIZATION,
- INVALID_KEY,
- CHALLENGE_FAILED,
- BANNED_NETWORK
-}
-
-enum ImageDataError {
- INVALID_DATA,
- UNKNOWN_IMAGE
-}
-
-enum UploadError {
- INVALID_CRC,
- BROKEN_BLOCK,
- GENERIC_ERROR,
- INVALID_METADATA,
- ALREADY_COMPLETE
-}
-
-exception AuthorizationException {
- 1: AuthorizationError number,
- 2: string message
-}
-
-exception AuthenticationException {
- 1: AuthenticationError number,
- 2: string message
-}
-
-exception InvalidTokenException {
-}
-
-exception ImageDataException {
- 1: ImageDataError number,
- 2: string message
-}
-
-exception UploadException {
- 1: UploadError number,
- 2: string message
-}
-
-exception DownloadException {
- 1: UploadError number,
- 2: string message
-}
-
-struct UserInfo {
- 1: string userId,
- 2: string firstName,
- 3: string lastName,
- 4: string eMail,
- 5: string organizationId
-}
-
-struct OrganizationData {
- 1: string organizationId,
- 2: string displayName,
- 3: string ecpUrl,
- 4: list<string> suffixList,
-}
-
-struct SessionData {
- 1: ID sessionId,
- 2: Token authToken,
- 3: string serverAddress
-}
-
-struct UploadData {
- 1: string token,
- 2: i32 port
-}
-
-struct DownloadData {
- 1: string token,
- 2: i32 port,
- 3: list<i32> crcSums
-}
-
-struct ServerSessionData {
- 1: ID sessionId
-}
-
-struct ImageData {
- 1: UUID uuid,
- 2: i32 revision,
- 3: string title,
- 4: UnixTimestamp createTime,
- 5: UnixTimestamp updateTime,
- 6: string ownerLogin,
- 7: i32 operatingSystem,
- 8: bool isValid,
- 9: bool isDeleted,
- // 10: deleted, do not reuse!
- 11: string description,
- 12: i64 fileSize,
-}
-
-service ImageServer {
-
-/*
- * Client calls
- */
- bool ping(),
-
- SessionData authenticate(1:string login, 2:string password) throws (1:AuthenticationException failure),
-
- list<OrganizationData> getOrganizations(),
-
- list<UserInfo> findUser(1:ID sessionId, 2:string organizationId, 3:string searchTerm) throws (1:AuthorizationException failure),
-
- list<ImageData> getPublicImages(1:ID sessionId, 2:i32 page) throws (1:AuthorizationException failure),
-
-/*
- * Server calls
- */
- UserInfo getUserFromToken(1:Token token) throws (1:InvalidTokenException failure),
-
- bool isServerAuthenticated(1:string serverSessionId),
-
- binary startServerAuthentication(1:string organization) throws (1: AuthenticationException failure),
-
- ServerSessionData serverAuthenticate(1:string organizationId, 2:binary challengeResponse) throws (1:AuthenticationException failure),
-
- UploadData submitImage(1:ID serverSessionId, 2:ImageData imageDescription, 3:list<i32> crcSums) throws (1:AuthorizationException failure, 2: ImageDataException failure2, 3: UploadException failure3),
-
- DownloadData getImage(2:ID serverSessionId, 1:UUID uuid) throws (1:AuthorizationException failure, 2: ImageDataException failure2),
-
- bool publishUser(1:ID serverSessionId, 2:UserInfo user) throws (1:AuthorizationException failure),
-
- bool registerSatellite(1:string organizationId, 2:string address, 3:string modulus, 4:string exponent),
-
- bool updateSatelliteAddress(1:ID serverSessionId, 2:string address),
-
-/*
- * Local interfacing
- */
- ServerSessionData addSession(1:string localPassword, 2:UserInfo userInfo),
-
-}
diff --git a/src/main/thrift/sat.thrift b/src/main/thrift/sat.thrift
deleted file mode 100644
index 1a731ab..0000000
--- a/src/main/thrift/sat.thrift
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Define some namespace/package name for our stuff
- */
-namespace java org.openslx.sat.thrift.iface
-
-typedef i64 int
-
-struct User{
- 1: string userName,
- 2: string password,
- 3: string path,
-}
-
-struct Image{
- 1: string id,
- 2: string version,
- 3: string imageName,
- 4: string licenseRestriction,
- 5: string osName,
- 6: string lectureName,
- 7: string updateTime,
- 8: string userData,
- 9: string isTemplate,
- 10: string description,
- 11: string imageSize,
-}
-struct Lecture{
- 1: string id,
- 2: string lecturename,
- 3: string isActive,
- 4: string starttime,
- 5: string endtime,
- 6: string lastused,
- 7: string desc,
- 8: string imagename,
- 9: string username,
-}
-struct Person{
- 1: string userID,
- 2: string Nachname,
- 3: string Vorname,
- 4: string mail,
- 5: bool image_read
- 6: bool image_write
- 7: bool image_admin
- 8: bool image_link
- 9: bool lecture_read
- 10: bool lecture_write
- 11: bool lecture_admin
-}
-service Server{
- int getVersion(),
- User getFtpUser(1: string token),
- bool authenticated(1: string token),
- bool setSessionInvalid(1: string token),
- int DeleteFtpUser(1: string user, 2: string token),
- string getPathOfImage(1: string image_id, 2: string version, 3: string token),
- string setInstitution(1: string university, 2:string token),
- bool writeVLdata(1: string imagename, 2: string desc, 8: string Tel, 9: string Fak, 10: bool license, 11: bool internet, 12: int ram, 13: int cpu, 14: string imagePath, 15: bool isTemplate, 16: i64 filesize, 17: int shareMode, 18: string os, 19: string uid, 20:string token, 21: string userID),
- list<Image> getImageListPermissionWrite(1: string userID, 2: string token),
- list<Image> getImageListPermissionRead(1: string userID, 2: string token),
- list<Image> getImageListPermissionLink(1: string userID, 2: string token),
- list<Image> getImageListPermissionAdmin(1: string userID, 2: string token),
- list<Image> getImageListAllTemplates(1: string token),
- list<Image> getImageList(1: string userID, 2: string token),
- list<Lecture> getLectureList(1: string token),
- list<Lecture> getLectureListPermissionRead(1: string token),
- list<Lecture> getLectureListPermissionWrite(1: string token),
- list<Lecture> getLectureListPermissionAdmin(1: string token),
- list<string> getAllOS(1: string token),
- list<string> getAllUniversities(1: string token),
- map<string,string> getPersonData(1: string Vorname, 2: string Nachname, 3: string token),
- map<string,string> getItemOwner(1: string itemID, 2: string token),
- void setPerson(1: string userID, 2: string token, 3: string institution),
- bool writeLecturedata(1: string name, 2: string shortdesc, 3: string desc, 4: string startDate, 5: string endDate, 6: bool isActive, 7: string imagename, 8: string token, 13: string Tel, 14: string Fak, 16: string lectureID, 17: string university),
- bool startFileCopy(1: string file, 2:string token),
- map<string,string> getImageData(1: string imageid, 2: string imageversion, 3: string token),
- map<string,string> getLectureData(1: string lectureid, 2: string token),
- bool updateImageData(1: string name, 2: string newName, 3: string desc, 4: string image_path, 5: bool license, 6: bool internet, 7: int ram, 8: int cpu, 9: string id, 10: string version, 11: bool isTemplate, 12: i64 filesize, 13: int shareMode, 14: string os, 15: string token),
- bool deleteImageData(1: string id, 2: string version, 3: string token),
- bool updateLecturedata(1: string name, 2: string newName, 3: string shortdesc, 4: string desc, 5: string startDate, 6: string endDate, 7: bool isActive, 8: string imageid, 9: string imageversion, 10: string token, 15: string Tel, 16: string Fak, 17: string id, 18: string university),
- bool deleteImageServer(1: string id, 2: string version, 3: string token),
- bool deleteImageByPath(1: string image_path),
- bool connectedToLecture(1: string id, 2: string version, 3: string token),
- bool deleteLecture(1: string id, 2: string token, 3: string university),
- bool checkUser(1: string username, 2: string token),
- bool createUser(1: string token, 2: string university),
- bool writeImageRights(1: string imagename, 2: string token, 3: string role, 4: string university, 5: string userID),
- bool writeAdditionalImageRights(1: string imageName, 2: string userID, 3: bool isRead, 4: bool isWrite, 5: bool isLinkAllowed, 6: bool isAdmin, 7: string token),
- bool writeLectureRights(1: string lectureID, 2: string role, 3: string token, 4: string university, 5: string userID),
- bool writeAdditionalLectureRights(1: string lectureName, 2: string userID, 3: bool isRead, 4: bool isWrite, 5: bool isAdmin, 6: string token),
- list<Person>getAllOtherSatelliteUsers(1: list<string> userID, 2: string token),
- list<Person>getPermissionForUserAndImage(1: string token, 2: string imageID, 3: string userID),
- list<string>getAdditionalImageContacts(1: string imageID, 2: string token),
- list<Person>getPermissionForUserAndLecture(1: string token, 2: string lectureID, 3: string userID),
- void deleteAllAdditionalImagePermissions(1: string imageID, 2:string token, 3: string userID),
- void deleteAllAdditionalLecturePermissions(1: string lectureID, 2: string token, 3: string userID),
- string getOsNameForGuestOs(1: string guestOS, 2: string token),
- bool userIsImageAdmin(1: string imageID, 2: string token, 3: string userID),
- bool userIsLectureAdmin(1: string userID, 2: string lectureID, 3: string token),
- string createRandomUUID(1: string token),
- string getInstitutionByID(1: string institutionID)
-
-}
diff --git a/thrift-compile.sh b/thrift-compile.sh
index 82822fd..4831fd7 100755
--- a/thrift-compile.sh
+++ b/thrift-compile.sh
@@ -10,20 +10,10 @@ if ! thrift --version | grep -q "0\.9\.1"; then
echo "OK, compiling..."
fi
-echo "1) Masterserver RPC"
+echo "1) Masterserver + Satellite RPC"
[ -e gen-java ] && rm -r gen-java
-if thrift --gen java src/main/thrift/imagemaster.thrift; then
- [ -e "src/main/java/org/openslx/imagemaster/thrift/iface" ] && rm -rf src/main/java/org/openslx/imagemaster/thrift/iface
- if ! cp -r gen-java/org src/main/java/; then
- echo "Error copying compiled files! Aborting!"
- exit 1
- fi
-fi
-
-echo "2) Sat RPC"
-[ -e gen-java ] && rm -r gen-java
-if thrift --gen java src/main/thrift/sat.thrift; then
- [ -e "src/main/java/org/openslx/sat/thrift/iface" ] && rm -rf src/main/java/org/openslx/sat/thrift/iface
+if thrift --gen java src/main/thrift/bwlp.thrift; then
+ [ -e "src/main/java/org/openslx/bwlp/thrift/iface" ] && rm -rf src/main/java/org/openslx/bwlp/thrift/iface
if ! cp -r gen-java/org src/main/java/; then
echo "Error copying compiled files! Aborting!"
exit 1