/**
* Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package edu.usc.pgroup.floe.thriftgen;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.protocol.TTupleProtocol;
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.server.AbstractNonblockingServer.AsyncFrameBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.ByteBuffer;
import java.util.BitSet;
import java.util.Collections;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
public class TCoordinator {
public interface Iface {
public String ping(String pingText) throws org.apache.thrift.TException;
public int beginFileUpload(String filename) throws org.apache.thrift.TException;
public void uploadChunk(int fid, ByteBuffer chunk) throws org.apache.thrift.TException;
public void finishUpload(int fid) throws org.apache.thrift.TException;
public int beginFileDownload(String filename) throws org.apache.thrift.TException;
public ByteBuffer downloadChunk(int fid) throws org.apache.thrift.TException;
public void submitApp(String appName, TFloeApp app) throws InsufficientResourcesException, DuplicateException, InvalidAppException, org.apache.thrift.TException;
public void scale(ScaleDirection direction, String appName, String pelletName, int count) throws InsufficientResourcesException, AppNotFoundException, PelletNotFoundException, org.apache.thrift.TException;
public void signal(TSignal signal) throws AppNotFoundException, PelletNotFoundException, org.apache.thrift.TException;
public void switchAlternate(String appName, String pelletName, String alternateName) throws AppNotFoundException, PelletNotFoundException, AlternateNotFoundException, org.apache.thrift.TException;
public void killApp(String appName) throws org.apache.thrift.TException;
public AppStatus getAppStatus(String appName) throws AppNotFoundException, org.apache.thrift.TException;
}
public interface AsyncIface {
public void ping(String pingText, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void beginFileUpload(String filename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void uploadChunk(int fid, ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void finishUpload(int fid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void beginFileDownload(String filename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void downloadChunk(int fid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void submitApp(String appName, TFloeApp app, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void scale(ScaleDirection direction, String appName, String pelletName, int count, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void signal(TSignal signal, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void switchAlternate(String appName, String pelletName, String alternateName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void killApp(String appName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getAppStatus(String appName, 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 String ping(String pingText) throws org.apache.thrift.TException
{
send_ping(pingText);
return recv_ping();
}
public void send_ping(String pingText) throws org.apache.thrift.TException
{
ping_args args = new ping_args();
args.set_pingText(pingText);
sendBase("ping", args);
}
public String recv_ping() throws org.apache.thrift.TException
{
ping_result result = new ping_result();
receiveBase(result, "ping");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result");
}
public int beginFileUpload(String filename) throws org.apache.thrift.TException
{
send_beginFileUpload(filename);
return recv_beginFileUpload();
}
public void send_beginFileUpload(String filename) throws org.apache.thrift.TException
{
beginFileUpload_args args = new beginFileUpload_args();
args.set_filename(filename);
sendBase("beginFileUpload", args);
}
public int recv_beginFileUpload() throws org.apache.thrift.TException
{
beginFileUpload_result result = new beginFileUpload_result();
receiveBase(result, "beginFileUpload");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result");
}
public void uploadChunk(int fid, ByteBuffer chunk) throws org.apache.thrift.TException
{
send_uploadChunk(fid, chunk);
recv_uploadChunk();
}
public void send_uploadChunk(int fid, ByteBuffer chunk) throws org.apache.thrift.TException
{
uploadChunk_args args = new uploadChunk_args();
args.set_fid(fid);
args.set_chunk(chunk);
sendBase("uploadChunk", args);
}
public void recv_uploadChunk() throws org.apache.thrift.TException
{
uploadChunk_result result = new uploadChunk_result();
receiveBase(result, "uploadChunk");
return;
}
public void finishUpload(int fid) throws org.apache.thrift.TException
{
send_finishUpload(fid);
recv_finishUpload();
}
public void send_finishUpload(int fid) throws org.apache.thrift.TException
{
finishUpload_args args = new finishUpload_args();
args.set_fid(fid);
sendBase("finishUpload", args);
}
public void recv_finishUpload() throws org.apache.thrift.TException
{
finishUpload_result result = new finishUpload_result();
receiveBase(result, "finishUpload");
return;
}
public int beginFileDownload(String filename) throws org.apache.thrift.TException
{
send_beginFileDownload(filename);
return recv_beginFileDownload();
}
public void send_beginFileDownload(String filename) throws org.apache.thrift.TException
{
beginFileDownload_args args = new beginFileDownload_args();
args.set_filename(filename);
sendBase("beginFileDownload", args);
}
public int recv_beginFileDownload() throws org.apache.thrift.TException
{
beginFileDownload_result result = new beginFileDownload_result();
receiveBase(result, "beginFileDownload");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result");
}
public ByteBuffer downloadChunk(int fid) throws org.apache.thrift.TException
{
send_downloadChunk(fid);
return recv_downloadChunk();
}
public void send_downloadChunk(int fid) throws org.apache.thrift.TException
{
downloadChunk_args args = new downloadChunk_args();
args.set_fid(fid);
sendBase("downloadChunk", args);
}
public ByteBuffer recv_downloadChunk() throws org.apache.thrift.TException
{
downloadChunk_result result = new downloadChunk_result();
receiveBase(result, "downloadChunk");
if (result.is_set_success()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "downloadChunk failed: unknown result");
}
public void submitApp(String appName, TFloeApp app) throws InsufficientResourcesException, DuplicateException, InvalidAppException, org.apache.thrift.TException
{
send_submitApp(appName, app);
recv_submitApp();
}
public void send_submitApp(String appName, TFloeApp app) throws org.apache.thrift.TException
{
submitApp_args args = new submitApp_args();
args.set_appName(appName);
args.set_app(app);
sendBase("submitApp", args);
}
public void recv_submitApp() throws InsufficientResourcesException, DuplicateException, InvalidAppException, org.apache.thrift.TException
{
submitApp_result result = new submitApp_result();
receiveBase(result, "submitApp");
if (result.ire != null) {
throw result.ire;
}
if (result.de != null) {
throw result.de;
}
if (result.iae != null) {
throw result.iae;
}
return;
}
public void scale(ScaleDirection direction, String appName, String pelletName, int count) throws InsufficientResourcesException, AppNotFoundException, PelletNotFoundException, org.apache.thrift.TException
{
send_scale(direction, appName, pelletName, count);
recv_scale();
}
public void send_scale(ScaleDirection direction, String appName, String pelletName, int count) throws org.apache.thrift.TException
{
scale_args args = new scale_args();
args.set_direction(direction);
args.set_appName(appName);
args.set_pelletName(pelletName);
args.set_count(count);
sendBase("scale", args);
}
public void recv_scale() throws InsufficientResourcesException, AppNotFoundException, PelletNotFoundException, org.apache.thrift.TException
{
scale_result result = new scale_result();
receiveBase(result, "scale");
if (result.ire != null) {
throw result.ire;
}
if (result.anfe != null) {
throw result.anfe;
}
if (result.pnfe != null) {
throw result.pnfe;
}
return;
}
public void signal(TSignal signal) throws AppNotFoundException, PelletNotFoundException, org.apache.thrift.TException
{
send_signal(signal);
recv_signal();
}
public void send_signal(TSignal signal) throws org.apache.thrift.TException
{
signal_args args = new signal_args();
args.set_signal(signal);
sendBase("signal", args);
}
public void recv_signal() throws AppNotFoundException, PelletNotFoundException, org.apache.thrift.TException
{
signal_result result = new signal_result();
receiveBase(result, "signal");
if (result.anfe != null) {
throw result.anfe;
}
if (result.pnfe != null) {
throw result.pnfe;
}
return;
}
public void switchAlternate(String appName, String pelletName, String alternateName) throws AppNotFoundException, PelletNotFoundException, AlternateNotFoundException, org.apache.thrift.TException
{
send_switchAlternate(appName, pelletName, alternateName);
recv_switchAlternate();
}
public void send_switchAlternate(String appName, String pelletName, String alternateName) throws org.apache.thrift.TException
{
switchAlternate_args args = new switchAlternate_args();
args.set_appName(appName);
args.set_pelletName(pelletName);
args.set_alternateName(alternateName);
sendBase("switchAlternate", args);
}
public void recv_switchAlternate() throws AppNotFoundException, PelletNotFoundException, AlternateNotFoundException, org.apache.thrift.TException
{
switchAlternate_result result = new switchAlternate_result();
receiveBase(result, "switchAlternate");
if (result.anfe != null) {
throw result.anfe;
}
if (result.pnfe != null) {
throw result.pnfe;
}
if (result.alnfe != null) {
throw result.alnfe;
}
return;
}
public void killApp(String appName) throws org.apache.thrift.TException
{
send_killApp(appName);
recv_killApp();
}
public void send_killApp(String appName) throws org.apache.thrift.TException
{
killApp_args args = new killApp_args();
args.set_appName(appName);
sendBase("killApp", args);
}
public void recv_killApp() throws org.apache.thrift.TException
{
killApp_result result = new killApp_result();
receiveBase(result, "killApp");
return;
}
public AppStatus getAppStatus(String appName) throws AppNotFoundException, org.apache.thrift.TException
{
send_getAppStatus(appName);
return recv_getAppStatus();
}
public void send_getAppStatus(String appName) throws org.apache.thrift.TException
{
getAppStatus_args args = new getAppStatus_args();
args.set_appName(appName);
sendBase("getAppStatus", args);
}
public AppStatus recv_getAppStatus() throws AppNotFoundException, org.apache.thrift.TException
{
getAppStatus_result result = new getAppStatus_result();
receiveBase(result, "getAppStatus");
if (result.is_set_success()) {
return result.success;
}
if (result.anfe != null) {
throw result.anfe;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAppStatus 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(String pingText, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
ping_call method_call = new ping_call(pingText, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {
private String pingText;
public ping_call(String pingText, 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.pingText = pingText;
}
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.set_pingText(pingText);
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_ping();
}
}
public void beginFileUpload(String filename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
beginFileUpload_call method_call = new beginFileUpload_call(filename, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class beginFileUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
private String filename;
public beginFileUpload_call(String filename, 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.filename = filename;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("beginFileUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
beginFileUpload_args args = new beginFileUpload_args();
args.set_filename(filename);
args.write(prot);
prot.writeMessageEnd();
}
public int 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_beginFileUpload();
}
}
public void uploadChunk(int fid, ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
uploadChunk_call method_call = new uploadChunk_call(fid, chunk, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class uploadChunk_call extends org.apache.thrift.async.TAsyncMethodCall {
private int fid;
private ByteBuffer chunk;
public uploadChunk_call(int fid, ByteBuffer chunk, 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.fid = fid;
this.chunk = chunk;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("uploadChunk", org.apache.thrift.protocol.TMessageType.CALL, 0));
uploadChunk_args args = new uploadChunk_args();
args.set_fid(fid);
args.set_chunk(chunk);
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_uploadChunk();
}
}
public void finishUpload(int fid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
finishUpload_call method_call = new finishUpload_call(fid, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class finishUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
private int fid;
public finishUpload_call(int fid, 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.fid = fid;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
finishUpload_args args = new finishUpload_args();
args.set_fid(fid);
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_finishUpload();
}
}
public void beginFileDownload(String filename, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
beginFileDownload_call method_call = new beginFileDownload_call(filename, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class beginFileDownload_call extends org.apache.thrift.async.TAsyncMethodCall {
private String filename;
public beginFileDownload_call(String filename, 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.filename = filename;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("beginFileDownload", org.apache.thrift.protocol.TMessageType.CALL, 0));
beginFileDownload_args args = new beginFileDownload_args();
args.set_filename(filename);
args.write(prot);
prot.writeMessageEnd();
}
public int 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_beginFileDownload();
}
}
public void downloadChunk(int fid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
downloadChunk_call method_call = new downloadChunk_call(fid, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class downloadChunk_call extends org.apache.thrift.async.TAsyncMethodCall {
private int fid;
public downloadChunk_call(int fid, 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.fid = fid;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("downloadChunk", org.apache.thrift.protocol.TMessageType.CALL, 0));
downloadChunk_args args = new downloadChunk_args();
args.set_fid(fid);
args.write(prot);
prot.writeMessageEnd();
}
public ByteBuffer 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_downloadChunk();
}
}
public void submitApp(String appName, TFloeApp app, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
submitApp_call method_call = new submitApp_call(appName, app, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class submitApp_call extends org.apache.thrift.async.TAsyncMethodCall {
private String appName;
private TFloeApp app;
public submitApp_call(String appName, TFloeApp app, 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.appName = appName;
this.app = app;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitApp", org.apache.thrift.protocol.TMessageType.CALL, 0));
submitApp_args args = new submitApp_args();
args.set_appName(appName);
args.set_app(app);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws InsufficientResourcesException, DuplicateException, InvalidAppException, 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_submitApp();
}
}
public void scale(ScaleDirection direction, String appName, String pelletName, int count, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
scale_call method_call = new scale_call(direction, appName, pelletName, count, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class scale_call extends org.apache.thrift.async.TAsyncMethodCall {
private ScaleDirection direction;
private String appName;
private String pelletName;
private int count;
public scale_call(ScaleDirection direction, String appName, String pelletName, int count, 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.direction = direction;
this.appName = appName;
this.pelletName = pelletName;
this.count = count;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scale", org.apache.thrift.protocol.TMessageType.CALL, 0));
scale_args args = new scale_args();
args.set_direction(direction);
args.set_appName(appName);
args.set_pelletName(pelletName);
args.set_count(count);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws InsufficientResourcesException, AppNotFoundException, PelletNotFoundException, 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_scale();
}
}
public void signal(TSignal signal, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
signal_call method_call = new signal_call(signal, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class signal_call extends org.apache.thrift.async.TAsyncMethodCall {
private TSignal signal;
public signal_call(TSignal signal, 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.signal = signal;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("signal", org.apache.thrift.protocol.TMessageType.CALL, 0));
signal_args args = new signal_args();
args.set_signal(signal);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws AppNotFoundException, PelletNotFoundException, 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_signal();
}
}
public void switchAlternate(String appName, String pelletName, String alternateName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
switchAlternate_call method_call = new switchAlternate_call(appName, pelletName, alternateName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class switchAlternate_call extends org.apache.thrift.async.TAsyncMethodCall {
private String appName;
private String pelletName;
private String alternateName;
public switchAlternate_call(String appName, String pelletName, String alternateName, 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.appName = appName;
this.pelletName = pelletName;
this.alternateName = alternateName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("switchAlternate", org.apache.thrift.protocol.TMessageType.CALL, 0));
switchAlternate_args args = new switchAlternate_args();
args.set_appName(appName);
args.set_pelletName(pelletName);
args.set_alternateName(alternateName);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws AppNotFoundException, PelletNotFoundException, AlternateNotFoundException, 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_switchAlternate();
}
}
public void killApp(String appName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
killApp_call method_call = new killApp_call(appName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class killApp_call extends org.apache.thrift.async.TAsyncMethodCall {
private String appName;
public killApp_call(String appName, 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.appName = appName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("killApp", org.apache.thrift.protocol.TMessageType.CALL, 0));
killApp_args args = new killApp_args();
args.set_appName(appName);
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_killApp();
}
}
public void getAppStatus(String appName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
getAppStatus_call method_call = new getAppStatus_call(appName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAppStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
private String appName;
public getAppStatus_call(String appName, 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.appName = appName;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAppStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAppStatus_args args = new getAppStatus_args();
args.set_appName(appName);
args.write(prot);
prot.writeMessageEnd();
}
public AppStatus getResult() throws AppNotFoundException, 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_getAppStatus();
}
}
}
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("beginFileUpload", new beginFileUpload());
processMap.put("uploadChunk", new uploadChunk());
processMap.put("finishUpload", new finishUpload());
processMap.put("beginFileDownload", new beginFileDownload());
processMap.put("downloadChunk", new downloadChunk());
processMap.put("submitApp", new submitApp());
processMap.put("scale", new scale());
processMap.put("signal", new signal());
processMap.put("switchAlternate", new switchAlternate());
processMap.put("killApp", new killApp());
processMap.put("getAppStatus", new getAppStatus());
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(args.pingText);
return result;
}
}
public static class beginFileUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, beginFileUpload_args> {
public beginFileUpload() {
super("beginFileUpload");
}
public beginFileUpload_args getEmptyArgsInstance() {
return new beginFileUpload_args();
}
protected boolean isOneway() {
return false;
}
public beginFileUpload_result getResult(I iface, beginFileUpload_args args) throws org.apache.thrift.TException {
beginFileUpload_result result = new beginFileUpload_result();
result.success = iface.beginFileUpload(args.filename);
result.set_success_isSet(true);
return result;
}
}
public static class uploadChunk<I extends Iface> extends org.apache.thrift.ProcessFunction<I, uploadChunk_args> {
public uploadChunk() {
super("uploadChunk");
}
public uploadChunk_args getEmptyArgsInstance() {
return new uploadChunk_args();
}
protected boolean isOneway() {
return false;
}
public uploadChunk_result getResult(I iface, uploadChunk_args args) throws org.apache.thrift.TException {
uploadChunk_result result = new uploadChunk_result();
iface.uploadChunk(args.fid, args.chunk);
return result;
}
}
public static class finishUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, finishUpload_args> {
public finishUpload() {
super("finishUpload");
}
public finishUpload_args getEmptyArgsInstance() {
return new finishUpload_args();
}
protected boolean isOneway() {
return false;
}
public finishUpload_result getResult(I iface, finishUpload_args args) throws org.apache.thrift.TException {
finishUpload_result result = new finishUpload_result();
iface.finishUpload(args.fid);
return result;
}
}
public static class beginFileDownload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, beginFileDownload_args> {
public beginFileDownload() {
super("beginFileDownload");
}
public beginFileDownload_args getEmptyArgsInstance() {
return new beginFileDownload_args();
}
protected boolean isOneway() {
return false;
}
public beginFileDownload_result getResult(I iface, beginFileDownload_args args) throws org.apache.thrift.TException {
beginFileDownload_result result = new beginFileDownload_result();
result.success = iface.beginFileDownload(args.filename);
result.set_success_isSet(true);
return result;
}
}
public static class downloadChunk<I extends Iface> extends org.apache.thrift.ProcessFunction<I, downloadChunk_args> {
public downloadChunk() {
super("downloadChunk");
}
public downloadChunk_args getEmptyArgsInstance() {
return new downloadChunk_args();
}
protected boolean isOneway() {
return false;
}
public downloadChunk_result getResult(I iface, downloadChunk_args args) throws org.apache.thrift.TException {
downloadChunk_result result = new downloadChunk_result();
result.success = iface.downloadChunk(args.fid);
return result;
}
}
public static class submitApp<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitApp_args> {
public submitApp() {
super("submitApp");
}
public submitApp_args getEmptyArgsInstance() {
return new submitApp_args();
}
protected boolean isOneway() {
return false;
}
public submitApp_result getResult(I iface, submitApp_args args) throws org.apache.thrift.TException {
submitApp_result result = new submitApp_result();
try {
iface.submitApp(args.appName, args.app);
} catch (InsufficientResourcesException ire) {
result.ire = ire;
} catch (DuplicateException de) {
result.de = de;
} catch (InvalidAppException iae) {
result.iae = iae;
}
return result;
}
}
public static class scale<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scale_args> {
public scale() {
super("scale");
}
public scale_args getEmptyArgsInstance() {
return new scale_args();
}
protected boolean isOneway() {
return false;
}
public scale_result getResult(I iface, scale_args args) throws org.apache.thrift.TException {
scale_result result = new scale_result();
try {
iface.scale(args.direction, args.appName, args.pelletName, args.count);
} catch (InsufficientResourcesException ire) {
result.ire = ire;
} catch (AppNotFoundException anfe) {
result.anfe = anfe;
} catch (PelletNotFoundException pnfe) {
result.pnfe = pnfe;
}
return result;
}
}
public static class signal<I extends Iface> extends org.apache.thrift.ProcessFunction<I, signal_args> {
public signal() {
super("signal");
}
public signal_args getEmptyArgsInstance() {
return new signal_args();
}
protected boolean isOneway() {
return false;
}
public signal_result getResult(I iface, signal_args args) throws org.apache.thrift.TException {
signal_result result = new signal_result();
try {
iface.signal(args.signal);
} catch (AppNotFoundException anfe) {
result.anfe = anfe;
} catch (PelletNotFoundException pnfe) {
result.pnfe = pnfe;
}
return result;
}
}
public static class switchAlternate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, switchAlternate_args> {
public switchAlternate() {
super("switchAlternate");
}
public switchAlternate_args getEmptyArgsInstance() {
return new switchAlternate_args();
}
protected boolean isOneway() {
return false;
}
public switchAlternate_result getResult(I iface, switchAlternate_args args) throws org.apache.thrift.TException {
switchAlternate_result result = new switchAlternate_result();
try {
iface.switchAlternate(args.appName, args.pelletName, args.alternateName);
} catch (AppNotFoundException anfe) {
result.anfe = anfe;
} catch (PelletNotFoundException pnfe) {
result.pnfe = pnfe;
} catch (AlternateNotFoundException alnfe) {
result.alnfe = alnfe;
}
return result;
}
}
public static class killApp<I extends Iface> extends org.apache.thrift.ProcessFunction<I, killApp_args> {
public killApp() {
super("killApp");
}
public killApp_args getEmptyArgsInstance() {
return new killApp_args();
}
protected boolean isOneway() {
return false;
}
public killApp_result getResult(I iface, killApp_args args) throws org.apache.thrift.TException {
killApp_result result = new killApp_result();
iface.killApp(args.appName);
return result;
}
}
public static class getAppStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAppStatus_args> {
public getAppStatus() {
super("getAppStatus");
}
public getAppStatus_args getEmptyArgsInstance() {
return new getAppStatus_args();
}
protected boolean isOneway() {
return false;
}
public getAppStatus_result getResult(I iface, getAppStatus_args args) throws org.apache.thrift.TException {
getAppStatus_result result = new getAppStatus_result();
try {
result.success = iface.getAppStatus(args.appName);
} catch (AppNotFoundException anfe) {
result.anfe = anfe;
}
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("beginFileUpload", new beginFileUpload());
processMap.put("uploadChunk", new uploadChunk());
processMap.put("finishUpload", new finishUpload());
processMap.put("beginFileDownload", new beginFileDownload());
processMap.put("downloadChunk", new downloadChunk());
processMap.put("submitApp", new submitApp());
processMap.put("scale", new scale());
processMap.put("signal", new signal());
processMap.put("switchAlternate", new switchAlternate());
processMap.put("killApp", new killApp());
processMap.put("getAppStatus", new getAppStatus());
return processMap;
}
public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, String> {
public ping() {
super("ping");
}
public ping_args getEmptyArgsInstance() {
return new ping_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) {
ping_result result = new ping_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;
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<String> resultHandler) throws TException {
iface.ping(args.pingText,resultHandler);
}
}
public static class beginFileUpload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, beginFileUpload_args, Integer> {
public beginFileUpload() {
super("beginFileUpload");
}
public beginFileUpload_args getEmptyArgsInstance() {
return new beginFileUpload_args();
}
public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Integer>() {
public void onComplete(Integer o) {
beginFileUpload_result result = new beginFileUpload_result();
result.success = o;
result.set_success_isSet(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;
beginFileUpload_result result = new beginFileUpload_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, beginFileUpload_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
iface.beginFileUpload(args.filename,resultHandler);
}
}
public static class uploadChunk<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, uploadChunk_args, Void> {
public uploadChunk() {
super("uploadChunk");
}
public uploadChunk_args getEmptyArgsInstance() {
return new uploadChunk_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) {
uploadChunk_result result = new uploadChunk_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;
uploadChunk_result result = new uploadChunk_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, uploadChunk_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.uploadChunk(args.fid, args.chunk,resultHandler);
}
}
public static class finishUpload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, finishUpload_args, Void> {
public finishUpload() {
super("finishUpload");
}
public finishUpload_args getEmptyArgsInstance() {
return new finishUpload_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) {
finishUpload_result result = new finishUpload_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;
finishUpload_result result = new finishUpload_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, finishUpload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.finishUpload(args.fid,resultHandler);
}
}
public static class beginFileDownload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, beginFileDownload_args, Integer> {
public beginFileDownload() {
super("beginFileDownload");
}
public beginFileDownload_args getEmptyArgsInstance() {
return new beginFileDownload_args();
}
public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Integer>() {
public void onComplete(Integer o) {
beginFileDownload_result result = new beginFileDownload_result();
result.success = o;
result.set_success_isSet(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;
beginFileDownload_result result = new beginFileDownload_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, beginFileDownload_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
iface.beginFileDownload(args.filename,resultHandler);
}
}
public static class downloadChunk<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, downloadChunk_args, ByteBuffer> {
public downloadChunk() {
super("downloadChunk");
}
public downloadChunk_args getEmptyArgsInstance() {
return new downloadChunk_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) {
downloadChunk_result result = new downloadChunk_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;
downloadChunk_result result = new downloadChunk_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, downloadChunk_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
iface.downloadChunk(args.fid,resultHandler);
}
}
public static class submitApp<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitApp_args, Void> {
public submitApp() {
super("submitApp");
}
public submitApp_args getEmptyArgsInstance() {
return new submitApp_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) {
submitApp_result result = new submitApp_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;
submitApp_result result = new submitApp_result();
if (e instanceof InsufficientResourcesException) {
result.ire = (InsufficientResourcesException) e;
result.set_ire_isSet(true);
msg = result;
}
else if (e instanceof DuplicateException) {
result.de = (DuplicateException) e;
result.set_de_isSet(true);
msg = result;
}
else if (e instanceof InvalidAppException) {
result.iae = (InvalidAppException) e;
result.set_iae_isSet(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, submitApp_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.submitApp(args.appName, args.app,resultHandler);
}
}
public static class scale<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, scale_args, Void> {
public scale() {
super("scale");
}
public scale_args getEmptyArgsInstance() {
return new scale_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) {
scale_result result = new scale_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;
scale_result result = new scale_result();
if (e instanceof InsufficientResourcesException) {
result.ire = (InsufficientResourcesException) e;
result.set_ire_isSet(true);
msg = result;
}
else if (e instanceof AppNotFoundException) {
result.anfe = (AppNotFoundException) e;
result.set_anfe_isSet(true);
msg = result;
}
else if (e instanceof PelletNotFoundException) {
result.pnfe = (PelletNotFoundException) e;
result.set_pnfe_isSet(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, scale_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.scale(args.direction, args.appName, args.pelletName, args.count,resultHandler);
}
}
public static class signal<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, signal_args, Void> {
public signal() {
super("signal");
}
public signal_args getEmptyArgsInstance() {
return new signal_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) {
signal_result result = new signal_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;
signal_result result = new signal_result();
if (e instanceof AppNotFoundException) {
result.anfe = (AppNotFoundException) e;
result.set_anfe_isSet(true);
msg = result;
}
else if (e instanceof PelletNotFoundException) {
result.pnfe = (PelletNotFoundException) e;
result.set_pnfe_isSet(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, signal_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.signal(args.signal,resultHandler);
}
}
public static class switchAlternate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, switchAlternate_args, Void> {
public switchAlternate() {
super("switchAlternate");
}
public switchAlternate_args getEmptyArgsInstance() {
return new switchAlternate_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) {
switchAlternate_result result = new switchAlternate_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;
switchAlternate_result result = new switchAlternate_result();
if (e instanceof AppNotFoundException) {
result.anfe = (AppNotFoundException) e;
result.set_anfe_isSet(true);
msg = result;
}
else if (e instanceof PelletNotFoundException) {
result.pnfe = (PelletNotFoundException) e;
result.set_pnfe_isSet(true);
msg = result;
}
else if (e instanceof AlternateNotFoundException) {
result.alnfe = (AlternateNotFoundException) e;
result.set_alnfe_isSet(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, switchAlternate_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.switchAlternate(args.appName, args.pelletName, args.alternateName,resultHandler);
}
}
public static class killApp<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, killApp_args, Void> {
public killApp() {
super("killApp");
}
public killApp_args getEmptyArgsInstance() {
return new killApp_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) {
killApp_result result = new killApp_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;
killApp_result result = new killApp_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, killApp_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
iface.killApp(args.appName,resultHandler);
}
}
public static class getAppStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAppStatus_args, AppStatus> {
public getAppStatus() {
super("getAppStatus");
}
public getAppStatus_args getEmptyArgsInstance() {
return new getAppStatus_args();
}
public AsyncMethodCallback<AppStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<AppStatus>() {
public void onComplete(AppStatus o) {
getAppStatus_result result = new getAppStatus_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;
getAppStatus_result result = new getAppStatus_result();
if (e instanceof AppNotFoundException) {
result.anfe = (AppNotFoundException) e;
result.set_anfe_isSet(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, getAppStatus_args args, org.apache.thrift.async.AsyncMethodCallback<AppStatus> resultHandler) throws TException {
iface.getAppStatus(args.appName,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 org.apache.thrift.protocol.TField PING_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("pingText", 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 ping_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory());
}
private String pingText; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PING_TEXT((short)1, "pingText");
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: // PING_TEXT
return PING_TEXT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.PING_TEXT, new org.apache.thrift.meta_data.FieldMetaData("pingText", 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(ping_args.class, metaDataMap);
}
public ping_args() {
}
public ping_args(
String pingText)
{
this();
this.pingText = pingText;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ping_args(ping_args other) {
if (other.is_set_pingText()) {
this.pingText = other.pingText;
}
}
public ping_args deepCopy() {
return new ping_args(this);
}
@Override
public void clear() {
this.pingText = null;
}
public String get_pingText() {
return this.pingText;
}
public void set_pingText(String pingText) {
this.pingText = pingText;
}
public void unset_pingText() {
this.pingText = null;
}
/** Returns true if field pingText is set (has been assigned a value) and false otherwise */
public boolean is_set_pingText() {
return this.pingText != null;
}
public void set_pingText_isSet(boolean value) {
if (!value) {
this.pingText = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PING_TEXT:
if (value == null) {
unset_pingText();
} else {
set_pingText((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PING_TEXT:
return get_pingText();
}
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 PING_TEXT:
return is_set_pingText();
}
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;
boolean this_present_pingText = true && this.is_set_pingText();
boolean that_present_pingText = true && that.is_set_pingText();
if (this_present_pingText || that_present_pingText) {
if (!(this_present_pingText && that_present_pingText))
return false;
if (!this.pingText.equals(that.pingText))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_pingText = true && (is_set_pingText());
builder.append(present_pingText);
if (present_pingText)
builder.append(pingText);
return builder.toHashCode();
}
@Override
public int compareTo(ping_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_pingText()).compareTo(other.is_set_pingText());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_pingText()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pingText, other.pingText);
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_args(");
boolean first = true;
sb.append("pingText:");
if (this.pingText == null) {
sb.append("null");
} else {
sb.append(this.pingText);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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) {
case 1: // PING_TEXT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.pingText = iprot.readString();
struct.set_pingText_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
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);
if (struct.pingText != null) {
oprot.writeFieldBegin(PING_TEXT_FIELD_DESC);
oprot.writeString(struct.pingText);
oprot.writeFieldEnd();
}
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;
BitSet optionals = new BitSet();
if (struct.is_set_pingText()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_pingText()) {
oprot.writeString(struct.pingText);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.pingText = iprot.readString();
struct.set_pingText_isSet(true);
}
}
}
}
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.STRING, (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());
}
private 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(ping_result.class, metaDataMap);
}
public ping_result() {
}
public ping_result(
String success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ping_result(ping_result other) {
if (other.is_set_success()) {
this.success = other.success;
}
}
public ping_result deepCopy() {
return new ping_result(this);
}
@Override
public void clear() {
this.success = null;
}
public String get_success() {
return this.success;
}
public void set_success(String success) {
this.success = success;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean is_set_success() {
return this.success != null;
}
public void set_success_isSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
}
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 is_set_success();
}
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 && this.is_set_success();
boolean that_present_success = true && that.is_set_success();
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() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_success = true && (is_set_success());
builder.append(present_success);
if (present_success)
builder.append(success);
return builder.toHashCode();
}
@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(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
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:");
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 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.STRING) {
struct.success = iprot.readString();
struct.set_success_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
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.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(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.is_set_success()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_success()) {
oprot.writeString(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.readString();
struct.set_success_isSet(true);
}
}
}
}
public static class beginFileUpload_args implements org.apache.thrift.TBase<beginFileUpload_args, beginFileUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<beginFileUpload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileUpload_args");
private static final org.apache.thrift.protocol.TField FILENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("filename", 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 beginFileUpload_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new beginFileUpload_argsTupleSchemeFactory());
}
private String filename; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FILENAME((short)1, "filename");
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: // FILENAME
return FILENAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.FILENAME, new org.apache.thrift.meta_data.FieldMetaData("filename", 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(beginFileUpload_args.class, metaDataMap);
}
public beginFileUpload_args() {
}
public beginFileUpload_args(
String filename)
{
this();
this.filename = filename;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public beginFileUpload_args(beginFileUpload_args other) {
if (other.is_set_filename()) {
this.filename = other.filename;
}
}
public beginFileUpload_args deepCopy() {
return new beginFileUpload_args(this);
}
@Override
public void clear() {
this.filename = null;
}
public String get_filename() {
return this.filename;
}
public void set_filename(String filename) {
this.filename = filename;
}
public void unset_filename() {
this.filename = null;
}
/** Returns true if field filename is set (has been assigned a value) and false otherwise */
public boolean is_set_filename() {
return this.filename != null;
}
public void set_filename_isSet(boolean value) {
if (!value) {
this.filename = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FILENAME:
if (value == null) {
unset_filename();
} else {
set_filename((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FILENAME:
return get_filename();
}
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 FILENAME:
return is_set_filename();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof beginFileUpload_args)
return this.equals((beginFileUpload_args)that);
return false;
}
public boolean equals(beginFileUpload_args that) {
if (that == null)
return false;
boolean this_present_filename = true && this.is_set_filename();
boolean that_present_filename = true && that.is_set_filename();
if (this_present_filename || that_present_filename) {
if (!(this_present_filename && that_present_filename))
return false;
if (!this.filename.equals(that.filename))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_filename = true && (is_set_filename());
builder.append(present_filename);
if (present_filename)
builder.append(filename);
return builder.toHashCode();
}
@Override
public int compareTo(beginFileUpload_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_filename()).compareTo(other.is_set_filename());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_filename()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filename, other.filename);
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("beginFileUpload_args(");
boolean first = true;
sb.append("filename:");
if (this.filename == null) {
sb.append("null");
} else {
sb.append(this.filename);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 beginFileUpload_argsStandardSchemeFactory implements SchemeFactory {
public beginFileUpload_argsStandardScheme getScheme() {
return new beginFileUpload_argsStandardScheme();
}
}
private static class beginFileUpload_argsStandardScheme extends StandardScheme<beginFileUpload_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, beginFileUpload_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: // FILENAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.filename = iprot.readString();
struct.set_filename_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, beginFileUpload_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.filename != null) {
oprot.writeFieldBegin(FILENAME_FIELD_DESC);
oprot.writeString(struct.filename);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class beginFileUpload_argsTupleSchemeFactory implements SchemeFactory {
public beginFileUpload_argsTupleScheme getScheme() {
return new beginFileUpload_argsTupleScheme();
}
}
private static class beginFileUpload_argsTupleScheme extends TupleScheme<beginFileUpload_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, beginFileUpload_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_filename()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_filename()) {
oprot.writeString(struct.filename);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, beginFileUpload_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.filename = iprot.readString();
struct.set_filename_isSet(true);
}
}
}
}
public static class beginFileUpload_result implements org.apache.thrift.TBase<beginFileUpload_result, beginFileUpload_result._Fields>, java.io.Serializable, Cloneable, Comparable<beginFileUpload_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileUpload_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new beginFileUpload_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new beginFileUpload_resultTupleSchemeFactory());
}
private int 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.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileUpload_result.class, metaDataMap);
}
public beginFileUpload_result() {
}
public beginFileUpload_result(
int success)
{
this();
this.success = success;
set_success_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public beginFileUpload_result(beginFileUpload_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
public beginFileUpload_result deepCopy() {
return new beginFileUpload_result(this);
}
@Override
public void clear() {
set_success_isSet(false);
this.success = 0;
}
public int get_success() {
return this.success;
}
public void set_success(int success) {
this.success = success;
set_success_isSet(true);
}
public void unset_success() {
__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 is_set_success() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void set_success_isSet(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) {
unset_success();
} else {
set_success((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(get_success());
}
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 is_set_success();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof beginFileUpload_result)
return this.equals((beginFileUpload_result)that);
return false;
}
public boolean equals(beginFileUpload_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() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_success = true;
builder.append(present_success);
if (present_success)
builder.append(success);
return builder.toHashCode();
}
@Override
public int compareTo(beginFileUpload_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
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("beginFileUpload_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 beginFileUpload_resultStandardSchemeFactory implements SchemeFactory {
public beginFileUpload_resultStandardScheme getScheme() {
return new beginFileUpload_resultStandardScheme();
}
}
private static class beginFileUpload_resultStandardScheme extends StandardScheme<beginFileUpload_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, beginFileUpload_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.success = iprot.readI32();
struct.set_success_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, beginFileUpload_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class beginFileUpload_resultTupleSchemeFactory implements SchemeFactory {
public beginFileUpload_resultTupleScheme getScheme() {
return new beginFileUpload_resultTupleScheme();
}
}
private static class beginFileUpload_resultTupleScheme extends TupleScheme<beginFileUpload_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_success()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_success()) {
oprot.writeI32(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI32();
struct.set_success_isSet(true);
}
}
}
}
public static class uploadChunk_args implements org.apache.thrift.TBase<uploadChunk_args, uploadChunk_args._Fields>, java.io.Serializable, Cloneable, Comparable<uploadChunk_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("uploadChunk_args");
private static final org.apache.thrift.protocol.TField FID_FIELD_DESC = new org.apache.thrift.protocol.TField("fid", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField CHUNK_FIELD_DESC = new org.apache.thrift.protocol.TField("chunk", 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 uploadChunk_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new uploadChunk_argsTupleSchemeFactory());
}
private int fid; // required
private ByteBuffer chunk; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FID((short)1, "fid"),
CHUNK((short)2, "chunk");
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: // FID
return FID;
case 2: // CHUNK
return CHUNK;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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 __FID_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.FID, new org.apache.thrift.meta_data.FieldMetaData("fid", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.CHUNK, new org.apache.thrift.meta_data.FieldMetaData("chunk", 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(uploadChunk_args.class, metaDataMap);
}
public uploadChunk_args() {
}
public uploadChunk_args(
int fid,
ByteBuffer chunk)
{
this();
this.fid = fid;
set_fid_isSet(true);
this.chunk = chunk;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public uploadChunk_args(uploadChunk_args other) {
__isset_bitfield = other.__isset_bitfield;
this.fid = other.fid;
if (other.is_set_chunk()) {
this.chunk = org.apache.thrift.TBaseHelper.copyBinary(other.chunk);
;
}
}
public uploadChunk_args deepCopy() {
return new uploadChunk_args(this);
}
@Override
public void clear() {
set_fid_isSet(false);
this.fid = 0;
this.chunk = null;
}
public int get_fid() {
return this.fid;
}
public void set_fid(int fid) {
this.fid = fid;
set_fid_isSet(true);
}
public void unset_fid() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FID_ISSET_ID);
}
/** Returns true if field fid is set (has been assigned a value) and false otherwise */
public boolean is_set_fid() {
return EncodingUtils.testBit(__isset_bitfield, __FID_ISSET_ID);
}
public void set_fid_isSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FID_ISSET_ID, value);
}
public byte[] get_chunk() {
set_chunk(org.apache.thrift.TBaseHelper.rightSize(chunk));
return chunk == null ? null : chunk.array();
}
public ByteBuffer buffer_for_chunk() {
return chunk;
}
public void set_chunk(byte[] chunk) {
set_chunk(chunk == null ? (ByteBuffer)null : ByteBuffer.wrap(chunk));
}
public void set_chunk(ByteBuffer chunk) {
this.chunk = chunk;
}
public void unset_chunk() {
this.chunk = null;
}
/** Returns true if field chunk is set (has been assigned a value) and false otherwise */
public boolean is_set_chunk() {
return this.chunk != null;
}
public void set_chunk_isSet(boolean value) {
if (!value) {
this.chunk = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FID:
if (value == null) {
unset_fid();
} else {
set_fid((Integer)value);
}
break;
case CHUNK:
if (value == null) {
unset_chunk();
} else {
set_chunk((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FID:
return Integer.valueOf(get_fid());
case CHUNK:
return get_chunk();
}
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 FID:
return is_set_fid();
case CHUNK:
return is_set_chunk();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof uploadChunk_args)
return this.equals((uploadChunk_args)that);
return false;
}
public boolean equals(uploadChunk_args that) {
if (that == null)
return false;
boolean this_present_fid = true;
boolean that_present_fid = true;
if (this_present_fid || that_present_fid) {
if (!(this_present_fid && that_present_fid))
return false;
if (this.fid != that.fid)
return false;
}
boolean this_present_chunk = true && this.is_set_chunk();
boolean that_present_chunk = true && that.is_set_chunk();
if (this_present_chunk || that_present_chunk) {
if (!(this_present_chunk && that_present_chunk))
return false;
if (!this.chunk.equals(that.chunk))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_fid = true;
builder.append(present_fid);
if (present_fid)
builder.append(fid);
boolean present_chunk = true && (is_set_chunk());
builder.append(present_chunk);
if (present_chunk)
builder.append(chunk);
return builder.toHashCode();
}
@Override
public int compareTo(uploadChunk_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_fid()).compareTo(other.is_set_fid());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_fid()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fid, other.fid);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_chunk()).compareTo(other.is_set_chunk());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_chunk()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.chunk, other.chunk);
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("uploadChunk_args(");
boolean first = true;
sb.append("fid:");
sb.append(this.fid);
first = false;
if (!first) sb.append(", ");
sb.append("chunk:");
if (this.chunk == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.chunk, 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 {
// 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 uploadChunk_argsStandardSchemeFactory implements SchemeFactory {
public uploadChunk_argsStandardScheme getScheme() {
return new uploadChunk_argsStandardScheme();
}
}
private static class uploadChunk_argsStandardScheme extends StandardScheme<uploadChunk_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, uploadChunk_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: // FID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fid = iprot.readI32();
struct.set_fid_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // CHUNK
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.chunk = iprot.readBinary();
struct.set_chunk_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, uploadChunk_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(FID_FIELD_DESC);
oprot.writeI32(struct.fid);
oprot.writeFieldEnd();
if (struct.chunk != null) {
oprot.writeFieldBegin(CHUNK_FIELD_DESC);
oprot.writeBinary(struct.chunk);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class uploadChunk_argsTupleSchemeFactory implements SchemeFactory {
public uploadChunk_argsTupleScheme getScheme() {
return new uploadChunk_argsTupleScheme();
}
}
private static class uploadChunk_argsTupleScheme extends TupleScheme<uploadChunk_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, uploadChunk_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_fid()) {
optionals.set(0);
}
if (struct.is_set_chunk()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.is_set_fid()) {
oprot.writeI32(struct.fid);
}
if (struct.is_set_chunk()) {
oprot.writeBinary(struct.chunk);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, uploadChunk_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.fid = iprot.readI32();
struct.set_fid_isSet(true);
}
if (incoming.get(1)) {
struct.chunk = iprot.readBinary();
struct.set_chunk_isSet(true);
}
}
}
}
public static class uploadChunk_result implements org.apache.thrift.TBase<uploadChunk_result, uploadChunk_result._Fields>, java.io.Serializable, Cloneable, Comparable<uploadChunk_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("uploadChunk_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new uploadChunk_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new uploadChunk_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(uploadChunk_result.class, metaDataMap);
}
public uploadChunk_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public uploadChunk_result(uploadChunk_result other) {
}
public uploadChunk_result deepCopy() {
return new uploadChunk_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 uploadChunk_result)
return this.equals((uploadChunk_result)that);
return false;
}
public boolean equals(uploadChunk_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
return builder.toHashCode();
}
@Override
public int compareTo(uploadChunk_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("uploadChunk_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 uploadChunk_resultStandardSchemeFactory implements SchemeFactory {
public uploadChunk_resultStandardScheme getScheme() {
return new uploadChunk_resultStandardScheme();
}
}
private static class uploadChunk_resultStandardScheme extends StandardScheme<uploadChunk_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, uploadChunk_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();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, uploadChunk_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class uploadChunk_resultTupleSchemeFactory implements SchemeFactory {
public uploadChunk_resultTupleScheme getScheme() {
return new uploadChunk_resultTupleScheme();
}
}
private static class uploadChunk_resultTupleScheme extends TupleScheme<uploadChunk_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, uploadChunk_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, uploadChunk_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class finishUpload_args implements org.apache.thrift.TBase<finishUpload_args, finishUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<finishUpload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("finishUpload_args");
private static final org.apache.thrift.protocol.TField FID_FIELD_DESC = new org.apache.thrift.protocol.TField("fid", org.apache.thrift.protocol.TType.I32, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new finishUpload_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new finishUpload_argsTupleSchemeFactory());
}
private int fid; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FID((short)1, "fid");
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: // FID
return FID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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 __FID_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.FID, new org.apache.thrift.meta_data.FieldMetaData("fid", 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(finishUpload_args.class, metaDataMap);
}
public finishUpload_args() {
}
public finishUpload_args(
int fid)
{
this();
this.fid = fid;
set_fid_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public finishUpload_args(finishUpload_args other) {
__isset_bitfield = other.__isset_bitfield;
this.fid = other.fid;
}
public finishUpload_args deepCopy() {
return new finishUpload_args(this);
}
@Override
public void clear() {
set_fid_isSet(false);
this.fid = 0;
}
public int get_fid() {
return this.fid;
}
public void set_fid(int fid) {
this.fid = fid;
set_fid_isSet(true);
}
public void unset_fid() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FID_ISSET_ID);
}
/** Returns true if field fid is set (has been assigned a value) and false otherwise */
public boolean is_set_fid() {
return EncodingUtils.testBit(__isset_bitfield, __FID_ISSET_ID);
}
public void set_fid_isSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FID:
if (value == null) {
unset_fid();
} else {
set_fid((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FID:
return Integer.valueOf(get_fid());
}
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 FID:
return is_set_fid();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof finishUpload_args)
return this.equals((finishUpload_args)that);
return false;
}
public boolean equals(finishUpload_args that) {
if (that == null)
return false;
boolean this_present_fid = true;
boolean that_present_fid = true;
if (this_present_fid || that_present_fid) {
if (!(this_present_fid && that_present_fid))
return false;
if (this.fid != that.fid)
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_fid = true;
builder.append(present_fid);
if (present_fid)
builder.append(fid);
return builder.toHashCode();
}
@Override
public int compareTo(finishUpload_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_fid()).compareTo(other.is_set_fid());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_fid()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fid, other.fid);
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("finishUpload_args(");
boolean first = true;
sb.append("fid:");
sb.append(this.fid);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 finishUpload_argsStandardSchemeFactory implements SchemeFactory {
public finishUpload_argsStandardScheme getScheme() {
return new finishUpload_argsStandardScheme();
}
}
private static class finishUpload_argsStandardScheme extends StandardScheme<finishUpload_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, finishUpload_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: // FID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fid = iprot.readI32();
struct.set_fid_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, finishUpload_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(FID_FIELD_DESC);
oprot.writeI32(struct.fid);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class finishUpload_argsTupleSchemeFactory implements SchemeFactory {
public finishUpload_argsTupleScheme getScheme() {
return new finishUpload_argsTupleScheme();
}
}
private static class finishUpload_argsTupleScheme extends TupleScheme<finishUpload_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, finishUpload_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_fid()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_fid()) {
oprot.writeI32(struct.fid);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, finishUpload_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.fid = iprot.readI32();
struct.set_fid_isSet(true);
}
}
}
}
public static class finishUpload_result implements org.apache.thrift.TBase<finishUpload_result, finishUpload_result._Fields>, java.io.Serializable, Cloneable, Comparable<finishUpload_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("finishUpload_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new finishUpload_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new finishUpload_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(finishUpload_result.class, metaDataMap);
}
public finishUpload_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public finishUpload_result(finishUpload_result other) {
}
public finishUpload_result deepCopy() {
return new finishUpload_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 finishUpload_result)
return this.equals((finishUpload_result)that);
return false;
}
public boolean equals(finishUpload_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
return builder.toHashCode();
}
@Override
public int compareTo(finishUpload_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("finishUpload_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 finishUpload_resultStandardSchemeFactory implements SchemeFactory {
public finishUpload_resultStandardScheme getScheme() {
return new finishUpload_resultStandardScheme();
}
}
private static class finishUpload_resultStandardScheme extends StandardScheme<finishUpload_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, finishUpload_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();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, finishUpload_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class finishUpload_resultTupleSchemeFactory implements SchemeFactory {
public finishUpload_resultTupleScheme getScheme() {
return new finishUpload_resultTupleScheme();
}
}
private static class finishUpload_resultTupleScheme extends TupleScheme<finishUpload_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, finishUpload_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, finishUpload_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class beginFileDownload_args implements org.apache.thrift.TBase<beginFileDownload_args, beginFileDownload_args._Fields>, java.io.Serializable, Cloneable, Comparable<beginFileDownload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileDownload_args");
private static final org.apache.thrift.protocol.TField FILENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("filename", 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 beginFileDownload_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new beginFileDownload_argsTupleSchemeFactory());
}
private String filename; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FILENAME((short)1, "filename");
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: // FILENAME
return FILENAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.FILENAME, new org.apache.thrift.meta_data.FieldMetaData("filename", 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(beginFileDownload_args.class, metaDataMap);
}
public beginFileDownload_args() {
}
public beginFileDownload_args(
String filename)
{
this();
this.filename = filename;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public beginFileDownload_args(beginFileDownload_args other) {
if (other.is_set_filename()) {
this.filename = other.filename;
}
}
public beginFileDownload_args deepCopy() {
return new beginFileDownload_args(this);
}
@Override
public void clear() {
this.filename = null;
}
public String get_filename() {
return this.filename;
}
public void set_filename(String filename) {
this.filename = filename;
}
public void unset_filename() {
this.filename = null;
}
/** Returns true if field filename is set (has been assigned a value) and false otherwise */
public boolean is_set_filename() {
return this.filename != null;
}
public void set_filename_isSet(boolean value) {
if (!value) {
this.filename = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FILENAME:
if (value == null) {
unset_filename();
} else {
set_filename((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FILENAME:
return get_filename();
}
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 FILENAME:
return is_set_filename();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof beginFileDownload_args)
return this.equals((beginFileDownload_args)that);
return false;
}
public boolean equals(beginFileDownload_args that) {
if (that == null)
return false;
boolean this_present_filename = true && this.is_set_filename();
boolean that_present_filename = true && that.is_set_filename();
if (this_present_filename || that_present_filename) {
if (!(this_present_filename && that_present_filename))
return false;
if (!this.filename.equals(that.filename))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_filename = true && (is_set_filename());
builder.append(present_filename);
if (present_filename)
builder.append(filename);
return builder.toHashCode();
}
@Override
public int compareTo(beginFileDownload_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_filename()).compareTo(other.is_set_filename());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_filename()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filename, other.filename);
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("beginFileDownload_args(");
boolean first = true;
sb.append("filename:");
if (this.filename == null) {
sb.append("null");
} else {
sb.append(this.filename);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 beginFileDownload_argsStandardSchemeFactory implements SchemeFactory {
public beginFileDownload_argsStandardScheme getScheme() {
return new beginFileDownload_argsStandardScheme();
}
}
private static class beginFileDownload_argsStandardScheme extends StandardScheme<beginFileDownload_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, beginFileDownload_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: // FILENAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.filename = iprot.readString();
struct.set_filename_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, beginFileDownload_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.filename != null) {
oprot.writeFieldBegin(FILENAME_FIELD_DESC);
oprot.writeString(struct.filename);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class beginFileDownload_argsTupleSchemeFactory implements SchemeFactory {
public beginFileDownload_argsTupleScheme getScheme() {
return new beginFileDownload_argsTupleScheme();
}
}
private static class beginFileDownload_argsTupleScheme extends TupleScheme<beginFileDownload_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, beginFileDownload_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_filename()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_filename()) {
oprot.writeString(struct.filename);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, beginFileDownload_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.filename = iprot.readString();
struct.set_filename_isSet(true);
}
}
}
}
public static class beginFileDownload_result implements org.apache.thrift.TBase<beginFileDownload_result, beginFileDownload_result._Fields>, java.io.Serializable, Cloneable, Comparable<beginFileDownload_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileDownload_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new beginFileDownload_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new beginFileDownload_resultTupleSchemeFactory());
}
private int 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.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_result.class, metaDataMap);
}
public beginFileDownload_result() {
}
public beginFileDownload_result(
int success)
{
this();
this.success = success;
set_success_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public beginFileDownload_result(beginFileDownload_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
public beginFileDownload_result deepCopy() {
return new beginFileDownload_result(this);
}
@Override
public void clear() {
set_success_isSet(false);
this.success = 0;
}
public int get_success() {
return this.success;
}
public void set_success(int success) {
this.success = success;
set_success_isSet(true);
}
public void unset_success() {
__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 is_set_success() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void set_success_isSet(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) {
unset_success();
} else {
set_success((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Integer.valueOf(get_success());
}
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 is_set_success();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof beginFileDownload_result)
return this.equals((beginFileDownload_result)that);
return false;
}
public boolean equals(beginFileDownload_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() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_success = true;
builder.append(present_success);
if (present_success)
builder.append(success);
return builder.toHashCode();
}
@Override
public int compareTo(beginFileDownload_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
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("beginFileDownload_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 beginFileDownload_resultStandardSchemeFactory implements SchemeFactory {
public beginFileDownload_resultStandardScheme getScheme() {
return new beginFileDownload_resultStandardScheme();
}
}
private static class beginFileDownload_resultStandardScheme extends StandardScheme<beginFileDownload_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, beginFileDownload_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.success = iprot.readI32();
struct.set_success_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, beginFileDownload_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.is_set_success()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class beginFileDownload_resultTupleSchemeFactory implements SchemeFactory {
public beginFileDownload_resultTupleScheme getScheme() {
return new beginFileDownload_resultTupleScheme();
}
}
private static class beginFileDownload_resultTupleScheme extends TupleScheme<beginFileDownload_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, beginFileDownload_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_success()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_success()) {
oprot.writeI32(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, beginFileDownload_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI32();
struct.set_success_isSet(true);
}
}
}
}
public static class downloadChunk_args implements org.apache.thrift.TBase<downloadChunk_args, downloadChunk_args._Fields>, java.io.Serializable, Cloneable, Comparable<downloadChunk_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("downloadChunk_args");
private static final org.apache.thrift.protocol.TField FID_FIELD_DESC = new org.apache.thrift.protocol.TField("fid", org.apache.thrift.protocol.TType.I32, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new downloadChunk_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new downloadChunk_argsTupleSchemeFactory());
}
private int fid; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
FID((short)1, "fid");
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: // FID
return FID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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 __FID_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.FID, new org.apache.thrift.meta_data.FieldMetaData("fid", 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(downloadChunk_args.class, metaDataMap);
}
public downloadChunk_args() {
}
public downloadChunk_args(
int fid)
{
this();
this.fid = fid;
set_fid_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public downloadChunk_args(downloadChunk_args other) {
__isset_bitfield = other.__isset_bitfield;
this.fid = other.fid;
}
public downloadChunk_args deepCopy() {
return new downloadChunk_args(this);
}
@Override
public void clear() {
set_fid_isSet(false);
this.fid = 0;
}
public int get_fid() {
return this.fid;
}
public void set_fid(int fid) {
this.fid = fid;
set_fid_isSet(true);
}
public void unset_fid() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FID_ISSET_ID);
}
/** Returns true if field fid is set (has been assigned a value) and false otherwise */
public boolean is_set_fid() {
return EncodingUtils.testBit(__isset_bitfield, __FID_ISSET_ID);
}
public void set_fid_isSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FID:
if (value == null) {
unset_fid();
} else {
set_fid((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FID:
return Integer.valueOf(get_fid());
}
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 FID:
return is_set_fid();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof downloadChunk_args)
return this.equals((downloadChunk_args)that);
return false;
}
public boolean equals(downloadChunk_args that) {
if (that == null)
return false;
boolean this_present_fid = true;
boolean that_present_fid = true;
if (this_present_fid || that_present_fid) {
if (!(this_present_fid && that_present_fid))
return false;
if (this.fid != that.fid)
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_fid = true;
builder.append(present_fid);
if (present_fid)
builder.append(fid);
return builder.toHashCode();
}
@Override
public int compareTo(downloadChunk_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_fid()).compareTo(other.is_set_fid());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_fid()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fid, other.fid);
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("downloadChunk_args(");
boolean first = true;
sb.append("fid:");
sb.append(this.fid);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 downloadChunk_argsStandardSchemeFactory implements SchemeFactory {
public downloadChunk_argsStandardScheme getScheme() {
return new downloadChunk_argsStandardScheme();
}
}
private static class downloadChunk_argsStandardScheme extends StandardScheme<downloadChunk_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, downloadChunk_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: // FID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fid = iprot.readI32();
struct.set_fid_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, downloadChunk_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(FID_FIELD_DESC);
oprot.writeI32(struct.fid);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class downloadChunk_argsTupleSchemeFactory implements SchemeFactory {
public downloadChunk_argsTupleScheme getScheme() {
return new downloadChunk_argsTupleScheme();
}
}
private static class downloadChunk_argsTupleScheme extends TupleScheme<downloadChunk_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, downloadChunk_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_fid()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_fid()) {
oprot.writeI32(struct.fid);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, downloadChunk_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.fid = iprot.readI32();
struct.set_fid_isSet(true);
}
}
}
}
public static class downloadChunk_result implements org.apache.thrift.TBase<downloadChunk_result, downloadChunk_result._Fields>, java.io.Serializable, Cloneable, Comparable<downloadChunk_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("downloadChunk_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 downloadChunk_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new downloadChunk_resultTupleSchemeFactory());
}
private ByteBuffer 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 , true)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(downloadChunk_result.class, metaDataMap);
}
public downloadChunk_result() {
}
public downloadChunk_result(
ByteBuffer success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public downloadChunk_result(downloadChunk_result other) {
if (other.is_set_success()) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
;
}
}
public downloadChunk_result deepCopy() {
return new downloadChunk_result(this);
}
@Override
public void clear() {
this.success = null;
}
public byte[] get_success() {
set_success(org.apache.thrift.TBaseHelper.rightSize(success));
return success == null ? null : success.array();
}
public ByteBuffer buffer_for_success() {
return success;
}
public void set_success(byte[] success) {
set_success(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
}
public void set_success(ByteBuffer success) {
this.success = success;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean is_set_success() {
return this.success != null;
}
public void set_success_isSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((ByteBuffer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
}
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 is_set_success();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof downloadChunk_result)
return this.equals((downloadChunk_result)that);
return false;
}
public boolean equals(downloadChunk_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.is_set_success();
boolean that_present_success = true && that.is_set_success();
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() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_success = true && (is_set_success());
builder.append(present_success);
if (present_success)
builder.append(success);
return builder.toHashCode();
}
@Override
public int compareTo(downloadChunk_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
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("downloadChunk_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;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 downloadChunk_resultStandardSchemeFactory implements SchemeFactory {
public downloadChunk_resultStandardScheme getScheme() {
return new downloadChunk_resultStandardScheme();
}
}
private static class downloadChunk_resultStandardScheme extends StandardScheme<downloadChunk_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, downloadChunk_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.set_success_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, downloadChunk_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();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class downloadChunk_resultTupleSchemeFactory implements SchemeFactory {
public downloadChunk_resultTupleScheme getScheme() {
return new downloadChunk_resultTupleScheme();
}
}
private static class downloadChunk_resultTupleScheme extends TupleScheme<downloadChunk_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, downloadChunk_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_success()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_success()) {
oprot.writeBinary(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, downloadChunk_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.set_success_isSet(true);
}
}
}
}
public static class submitApp_args implements org.apache.thrift.TBase<submitApp_args, submitApp_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitApp_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitApp_args");
private static final org.apache.thrift.protocol.TField APP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("appName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField APP_FIELD_DESC = new org.apache.thrift.protocol.TField("app", 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 submitApp_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new submitApp_argsTupleSchemeFactory());
}
private String appName; // required
private TFloeApp app; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
APP_NAME((short)1, "appName"),
APP((short)2, "app");
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: // APP_NAME
return APP_NAME;
case 2: // APP
return APP;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.APP_NAME, new org.apache.thrift.meta_data.FieldMetaData("appName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.APP, new org.apache.thrift.meta_data.FieldMetaData("app", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFloeApp.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitApp_args.class, metaDataMap);
}
public submitApp_args() {
}
public submitApp_args(
String appName,
TFloeApp app)
{
this();
this.appName = appName;
this.app = app;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public submitApp_args(submitApp_args other) {
if (other.is_set_appName()) {
this.appName = other.appName;
}
if (other.is_set_app()) {
this.app = new TFloeApp(other.app);
}
}
public submitApp_args deepCopy() {
return new submitApp_args(this);
}
@Override
public void clear() {
this.appName = null;
this.app = null;
}
public String get_appName() {
return this.appName;
}
public void set_appName(String appName) {
this.appName = appName;
}
public void unset_appName() {
this.appName = null;
}
/** Returns true if field appName is set (has been assigned a value) and false otherwise */
public boolean is_set_appName() {
return this.appName != null;
}
public void set_appName_isSet(boolean value) {
if (!value) {
this.appName = null;
}
}
public TFloeApp get_app() {
return this.app;
}
public void set_app(TFloeApp app) {
this.app = app;
}
public void unset_app() {
this.app = null;
}
/** Returns true if field app is set (has been assigned a value) and false otherwise */
public boolean is_set_app() {
return this.app != null;
}
public void set_app_isSet(boolean value) {
if (!value) {
this.app = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case APP_NAME:
if (value == null) {
unset_appName();
} else {
set_appName((String)value);
}
break;
case APP:
if (value == null) {
unset_app();
} else {
set_app((TFloeApp)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case APP_NAME:
return get_appName();
case APP:
return get_app();
}
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 APP_NAME:
return is_set_appName();
case APP:
return is_set_app();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof submitApp_args)
return this.equals((submitApp_args)that);
return false;
}
public boolean equals(submitApp_args that) {
if (that == null)
return false;
boolean this_present_appName = true && this.is_set_appName();
boolean that_present_appName = true && that.is_set_appName();
if (this_present_appName || that_present_appName) {
if (!(this_present_appName && that_present_appName))
return false;
if (!this.appName.equals(that.appName))
return false;
}
boolean this_present_app = true && this.is_set_app();
boolean that_present_app = true && that.is_set_app();
if (this_present_app || that_present_app) {
if (!(this_present_app && that_present_app))
return false;
if (!this.app.equals(that.app))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_appName = true && (is_set_appName());
builder.append(present_appName);
if (present_appName)
builder.append(appName);
boolean present_app = true && (is_set_app());
builder.append(present_app);
if (present_app)
builder.append(app);
return builder.toHashCode();
}
@Override
public int compareTo(submitApp_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_appName()).compareTo(other.is_set_appName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_appName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appName, other.appName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_app()).compareTo(other.is_set_app());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_app()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.app, other.app);
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("submitApp_args(");
boolean first = true;
sb.append("appName:");
if (this.appName == null) {
sb.append("null");
} else {
sb.append(this.appName);
}
first = false;
if (!first) sb.append(", ");
sb.append("app:");
if (this.app == null) {
sb.append("null");
} else {
sb.append(this.app);
}
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 (app != null) {
app.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 submitApp_argsStandardSchemeFactory implements SchemeFactory {
public submitApp_argsStandardScheme getScheme() {
return new submitApp_argsStandardScheme();
}
}
private static class submitApp_argsStandardScheme extends StandardScheme<submitApp_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, submitApp_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: // APP_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // APP
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.app = new TFloeApp();
struct.app.read(iprot);
struct.set_app_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, submitApp_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.appName != null) {
oprot.writeFieldBegin(APP_NAME_FIELD_DESC);
oprot.writeString(struct.appName);
oprot.writeFieldEnd();
}
if (struct.app != null) {
oprot.writeFieldBegin(APP_FIELD_DESC);
struct.app.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class submitApp_argsTupleSchemeFactory implements SchemeFactory {
public submitApp_argsTupleScheme getScheme() {
return new submitApp_argsTupleScheme();
}
}
private static class submitApp_argsTupleScheme extends TupleScheme<submitApp_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, submitApp_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_appName()) {
optionals.set(0);
}
if (struct.is_set_app()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.is_set_appName()) {
oprot.writeString(struct.appName);
}
if (struct.is_set_app()) {
struct.app.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, submitApp_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
}
if (incoming.get(1)) {
struct.app = new TFloeApp();
struct.app.read(iprot);
struct.set_app_isSet(true);
}
}
}
}
public static class submitApp_result implements org.apache.thrift.TBase<submitApp_result, submitApp_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitApp_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitApp_result");
private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField DE_FIELD_DESC = new org.apache.thrift.protocol.TField("de", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField IAE_FIELD_DESC = new org.apache.thrift.protocol.TField("iae", 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 submitApp_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new submitApp_resultTupleSchemeFactory());
}
private InsufficientResourcesException ire; // required
private DuplicateException de; // required
private InvalidAppException iae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
IRE((short)1, "ire"),
DE((short)2, "de"),
IAE((short)3, "iae");
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: // IRE
return IRE;
case 2: // DE
return DE;
case 3: // IAE
return IAE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.DE, new org.apache.thrift.meta_data.FieldMetaData("de", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.IAE, new org.apache.thrift.meta_data.FieldMetaData("iae", 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(submitApp_result.class, metaDataMap);
}
public submitApp_result() {
}
public submitApp_result(
InsufficientResourcesException ire,
DuplicateException de,
InvalidAppException iae)
{
this();
this.ire = ire;
this.de = de;
this.iae = iae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public submitApp_result(submitApp_result other) {
if (other.is_set_ire()) {
this.ire = new InsufficientResourcesException(other.ire);
}
if (other.is_set_de()) {
this.de = new DuplicateException(other.de);
}
if (other.is_set_iae()) {
this.iae = new InvalidAppException(other.iae);
}
}
public submitApp_result deepCopy() {
return new submitApp_result(this);
}
@Override
public void clear() {
this.ire = null;
this.de = null;
this.iae = null;
}
public InsufficientResourcesException get_ire() {
return this.ire;
}
public void set_ire(InsufficientResourcesException ire) {
this.ire = ire;
}
public void unset_ire() {
this.ire = null;
}
/** Returns true if field ire is set (has been assigned a value) and false otherwise */
public boolean is_set_ire() {
return this.ire != null;
}
public void set_ire_isSet(boolean value) {
if (!value) {
this.ire = null;
}
}
public DuplicateException get_de() {
return this.de;
}
public void set_de(DuplicateException de) {
this.de = de;
}
public void unset_de() {
this.de = null;
}
/** Returns true if field de is set (has been assigned a value) and false otherwise */
public boolean is_set_de() {
return this.de != null;
}
public void set_de_isSet(boolean value) {
if (!value) {
this.de = null;
}
}
public InvalidAppException get_iae() {
return this.iae;
}
public void set_iae(InvalidAppException iae) {
this.iae = iae;
}
public void unset_iae() {
this.iae = null;
}
/** Returns true if field iae is set (has been assigned a value) and false otherwise */
public boolean is_set_iae() {
return this.iae != null;
}
public void set_iae_isSet(boolean value) {
if (!value) {
this.iae = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IRE:
if (value == null) {
unset_ire();
} else {
set_ire((InsufficientResourcesException)value);
}
break;
case DE:
if (value == null) {
unset_de();
} else {
set_de((DuplicateException)value);
}
break;
case IAE:
if (value == null) {
unset_iae();
} else {
set_iae((InvalidAppException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IRE:
return get_ire();
case DE:
return get_de();
case IAE:
return get_iae();
}
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 IRE:
return is_set_ire();
case DE:
return is_set_de();
case IAE:
return is_set_iae();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof submitApp_result)
return this.equals((submitApp_result)that);
return false;
}
public boolean equals(submitApp_result that) {
if (that == null)
return false;
boolean this_present_ire = true && this.is_set_ire();
boolean that_present_ire = true && that.is_set_ire();
if (this_present_ire || that_present_ire) {
if (!(this_present_ire && that_present_ire))
return false;
if (!this.ire.equals(that.ire))
return false;
}
boolean this_present_de = true && this.is_set_de();
boolean that_present_de = true && that.is_set_de();
if (this_present_de || that_present_de) {
if (!(this_present_de && that_present_de))
return false;
if (!this.de.equals(that.de))
return false;
}
boolean this_present_iae = true && this.is_set_iae();
boolean that_present_iae = true && that.is_set_iae();
if (this_present_iae || that_present_iae) {
if (!(this_present_iae && that_present_iae))
return false;
if (!this.iae.equals(that.iae))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_ire = true && (is_set_ire());
builder.append(present_ire);
if (present_ire)
builder.append(ire);
boolean present_de = true && (is_set_de());
builder.append(present_de);
if (present_de)
builder.append(de);
boolean present_iae = true && (is_set_iae());
builder.append(present_iae);
if (present_iae)
builder.append(iae);
return builder.toHashCode();
}
@Override
public int compareTo(submitApp_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_ire()).compareTo(other.is_set_ire());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ire()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_de()).compareTo(other.is_set_de());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_de()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.de, other.de);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_iae()).compareTo(other.is_set_iae());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_iae()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iae, other.iae);
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("submitApp_result(");
boolean first = true;
sb.append("ire:");
if (this.ire == null) {
sb.append("null");
} else {
sb.append(this.ire);
}
first = false;
if (!first) sb.append(", ");
sb.append("de:");
if (this.de == null) {
sb.append("null");
} else {
sb.append(this.de);
}
first = false;
if (!first) sb.append(", ");
sb.append("iae:");
if (this.iae == null) {
sb.append("null");
} else {
sb.append(this.iae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 submitApp_resultStandardSchemeFactory implements SchemeFactory {
public submitApp_resultStandardScheme getScheme() {
return new submitApp_resultStandardScheme();
}
}
private static class submitApp_resultStandardScheme extends StandardScheme<submitApp_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, submitApp_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IRE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ire = new InsufficientResourcesException();
struct.ire.read(iprot);
struct.set_ire_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.de = new DuplicateException();
struct.de.read(iprot);
struct.set_de_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // IAE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.iae = new InvalidAppException();
struct.iae.read(iprot);
struct.set_iae_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, submitApp_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ire != null) {
oprot.writeFieldBegin(IRE_FIELD_DESC);
struct.ire.write(oprot);
oprot.writeFieldEnd();
}
if (struct.de != null) {
oprot.writeFieldBegin(DE_FIELD_DESC);
struct.de.write(oprot);
oprot.writeFieldEnd();
}
if (struct.iae != null) {
oprot.writeFieldBegin(IAE_FIELD_DESC);
struct.iae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class submitApp_resultTupleSchemeFactory implements SchemeFactory {
public submitApp_resultTupleScheme getScheme() {
return new submitApp_resultTupleScheme();
}
}
private static class submitApp_resultTupleScheme extends TupleScheme<submitApp_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, submitApp_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_ire()) {
optionals.set(0);
}
if (struct.is_set_de()) {
optionals.set(1);
}
if (struct.is_set_iae()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.is_set_ire()) {
struct.ire.write(oprot);
}
if (struct.is_set_de()) {
struct.de.write(oprot);
}
if (struct.is_set_iae()) {
struct.iae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, submitApp_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.ire = new InsufficientResourcesException();
struct.ire.read(iprot);
struct.set_ire_isSet(true);
}
if (incoming.get(1)) {
struct.de = new DuplicateException();
struct.de.read(iprot);
struct.set_de_isSet(true);
}
if (incoming.get(2)) {
struct.iae = new InvalidAppException();
struct.iae.read(iprot);
struct.set_iae_isSet(true);
}
}
}
}
public static class scale_args implements org.apache.thrift.TBase<scale_args, scale_args._Fields>, java.io.Serializable, Cloneable, Comparable<scale_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scale_args");
private static final org.apache.thrift.protocol.TField DIRECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("direction", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField APP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("appName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PELLET_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pelletName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new scale_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new scale_argsTupleSchemeFactory());
}
private ScaleDirection direction; // required
private String appName; // required
private String pelletName; // required
private int count; // required
/** 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 ScaleDirection
*/
DIRECTION((short)1, "direction"),
APP_NAME((short)2, "appName"),
PELLET_NAME((short)3, "pelletName"),
COUNT((short)4, "count");
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: // DIRECTION
return DIRECTION;
case 2: // APP_NAME
return APP_NAME;
case 3: // PELLET_NAME
return PELLET_NAME;
case 4: // COUNT
return COUNT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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 __COUNT_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.DIRECTION, new org.apache.thrift.meta_data.FieldMetaData("direction", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScaleDirection.class)));
tmpMap.put(_Fields.APP_NAME, new org.apache.thrift.meta_data.FieldMetaData("appName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PELLET_NAME, new org.apache.thrift.meta_data.FieldMetaData("pelletName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COUNT, new org.apache.thrift.meta_data.FieldMetaData("count", 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(scale_args.class, metaDataMap);
}
public scale_args() {
}
public scale_args(
ScaleDirection direction,
String appName,
String pelletName,
int count)
{
this();
this.direction = direction;
this.appName = appName;
this.pelletName = pelletName;
this.count = count;
set_count_isSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scale_args(scale_args other) {
__isset_bitfield = other.__isset_bitfield;
if (other.is_set_direction()) {
this.direction = other.direction;
}
if (other.is_set_appName()) {
this.appName = other.appName;
}
if (other.is_set_pelletName()) {
this.pelletName = other.pelletName;
}
this.count = other.count;
}
public scale_args deepCopy() {
return new scale_args(this);
}
@Override
public void clear() {
this.direction = null;
this.appName = null;
this.pelletName = null;
set_count_isSet(false);
this.count = 0;
}
/**
*
* @see ScaleDirection
*/
public ScaleDirection get_direction() {
return this.direction;
}
/**
*
* @see ScaleDirection
*/
public void set_direction(ScaleDirection direction) {
this.direction = direction;
}
public void unset_direction() {
this.direction = null;
}
/** Returns true if field direction is set (has been assigned a value) and false otherwise */
public boolean is_set_direction() {
return this.direction != null;
}
public void set_direction_isSet(boolean value) {
if (!value) {
this.direction = null;
}
}
public String get_appName() {
return this.appName;
}
public void set_appName(String appName) {
this.appName = appName;
}
public void unset_appName() {
this.appName = null;
}
/** Returns true if field appName is set (has been assigned a value) and false otherwise */
public boolean is_set_appName() {
return this.appName != null;
}
public void set_appName_isSet(boolean value) {
if (!value) {
this.appName = null;
}
}
public String get_pelletName() {
return this.pelletName;
}
public void set_pelletName(String pelletName) {
this.pelletName = pelletName;
}
public void unset_pelletName() {
this.pelletName = null;
}
/** Returns true if field pelletName is set (has been assigned a value) and false otherwise */
public boolean is_set_pelletName() {
return this.pelletName != null;
}
public void set_pelletName_isSet(boolean value) {
if (!value) {
this.pelletName = null;
}
}
public int get_count() {
return this.count;
}
public void set_count(int count) {
this.count = count;
set_count_isSet(true);
}
public void unset_count() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
}
/** Returns true if field count is set (has been assigned a value) and false otherwise */
public boolean is_set_count() {
return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
}
public void set_count_isSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DIRECTION:
if (value == null) {
unset_direction();
} else {
set_direction((ScaleDirection)value);
}
break;
case APP_NAME:
if (value == null) {
unset_appName();
} else {
set_appName((String)value);
}
break;
case PELLET_NAME:
if (value == null) {
unset_pelletName();
} else {
set_pelletName((String)value);
}
break;
case COUNT:
if (value == null) {
unset_count();
} else {
set_count((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DIRECTION:
return get_direction();
case APP_NAME:
return get_appName();
case PELLET_NAME:
return get_pelletName();
case COUNT:
return Integer.valueOf(get_count());
}
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 DIRECTION:
return is_set_direction();
case APP_NAME:
return is_set_appName();
case PELLET_NAME:
return is_set_pelletName();
case COUNT:
return is_set_count();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scale_args)
return this.equals((scale_args)that);
return false;
}
public boolean equals(scale_args that) {
if (that == null)
return false;
boolean this_present_direction = true && this.is_set_direction();
boolean that_present_direction = true && that.is_set_direction();
if (this_present_direction || that_present_direction) {
if (!(this_present_direction && that_present_direction))
return false;
if (!this.direction.equals(that.direction))
return false;
}
boolean this_present_appName = true && this.is_set_appName();
boolean that_present_appName = true && that.is_set_appName();
if (this_present_appName || that_present_appName) {
if (!(this_present_appName && that_present_appName))
return false;
if (!this.appName.equals(that.appName))
return false;
}
boolean this_present_pelletName = true && this.is_set_pelletName();
boolean that_present_pelletName = true && that.is_set_pelletName();
if (this_present_pelletName || that_present_pelletName) {
if (!(this_present_pelletName && that_present_pelletName))
return false;
if (!this.pelletName.equals(that.pelletName))
return false;
}
boolean this_present_count = true;
boolean that_present_count = true;
if (this_present_count || that_present_count) {
if (!(this_present_count && that_present_count))
return false;
if (this.count != that.count)
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_direction = true && (is_set_direction());
builder.append(present_direction);
if (present_direction)
builder.append(direction.getValue());
boolean present_appName = true && (is_set_appName());
builder.append(present_appName);
if (present_appName)
builder.append(appName);
boolean present_pelletName = true && (is_set_pelletName());
builder.append(present_pelletName);
if (present_pelletName)
builder.append(pelletName);
boolean present_count = true;
builder.append(present_count);
if (present_count)
builder.append(count);
return builder.toHashCode();
}
@Override
public int compareTo(scale_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_direction()).compareTo(other.is_set_direction());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_direction()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.direction, other.direction);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_appName()).compareTo(other.is_set_appName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_appName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appName, other.appName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_pelletName()).compareTo(other.is_set_pelletName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_pelletName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pelletName, other.pelletName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_count()).compareTo(other.is_set_count());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_count()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.count, other.count);
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("scale_args(");
boolean first = true;
sb.append("direction:");
if (this.direction == null) {
sb.append("null");
} else {
sb.append(this.direction);
}
first = false;
if (!first) sb.append(", ");
sb.append("appName:");
if (this.appName == null) {
sb.append("null");
} else {
sb.append(this.appName);
}
first = false;
if (!first) sb.append(", ");
sb.append("pelletName:");
if (this.pelletName == null) {
sb.append("null");
} else {
sb.append(this.pelletName);
}
first = false;
if (!first) sb.append(", ");
sb.append("count:");
sb.append(this.count);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 scale_argsStandardSchemeFactory implements SchemeFactory {
public scale_argsStandardScheme getScheme() {
return new scale_argsStandardScheme();
}
}
private static class scale_argsStandardScheme extends StandardScheme<scale_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scale_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: // DIRECTION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.direction = ScaleDirection.findByValue(iprot.readI32());
struct.set_direction_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // APP_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PELLET_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.pelletName = iprot.readString();
struct.set_pelletName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.count = iprot.readI32();
struct.set_count_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, scale_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.direction != null) {
oprot.writeFieldBegin(DIRECTION_FIELD_DESC);
oprot.writeI32(struct.direction.getValue());
oprot.writeFieldEnd();
}
if (struct.appName != null) {
oprot.writeFieldBegin(APP_NAME_FIELD_DESC);
oprot.writeString(struct.appName);
oprot.writeFieldEnd();
}
if (struct.pelletName != null) {
oprot.writeFieldBegin(PELLET_NAME_FIELD_DESC);
oprot.writeString(struct.pelletName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(COUNT_FIELD_DESC);
oprot.writeI32(struct.count);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scale_argsTupleSchemeFactory implements SchemeFactory {
public scale_argsTupleScheme getScheme() {
return new scale_argsTupleScheme();
}
}
private static class scale_argsTupleScheme extends TupleScheme<scale_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scale_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_direction()) {
optionals.set(0);
}
if (struct.is_set_appName()) {
optionals.set(1);
}
if (struct.is_set_pelletName()) {
optionals.set(2);
}
if (struct.is_set_count()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.is_set_direction()) {
oprot.writeI32(struct.direction.getValue());
}
if (struct.is_set_appName()) {
oprot.writeString(struct.appName);
}
if (struct.is_set_pelletName()) {
oprot.writeString(struct.pelletName);
}
if (struct.is_set_count()) {
oprot.writeI32(struct.count);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scale_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.direction = ScaleDirection.findByValue(iprot.readI32());
struct.set_direction_isSet(true);
}
if (incoming.get(1)) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
}
if (incoming.get(2)) {
struct.pelletName = iprot.readString();
struct.set_pelletName_isSet(true);
}
if (incoming.get(3)) {
struct.count = iprot.readI32();
struct.set_count_isSet(true);
}
}
}
}
public static class scale_result implements org.apache.thrift.TBase<scale_result, scale_result._Fields>, java.io.Serializable, Cloneable, Comparable<scale_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scale_result");
private static final org.apache.thrift.protocol.TField IRE_FIELD_DESC = new org.apache.thrift.protocol.TField("ire", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ANFE_FIELD_DESC = new org.apache.thrift.protocol.TField("anfe", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField PNFE_FIELD_DESC = new org.apache.thrift.protocol.TField("pnfe", 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 scale_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new scale_resultTupleSchemeFactory());
}
private InsufficientResourcesException ire; // required
private AppNotFoundException anfe; // required
private PelletNotFoundException pnfe; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
IRE((short)1, "ire"),
ANFE((short)2, "anfe"),
PNFE((short)3, "pnfe");
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: // IRE
return IRE;
case 2: // ANFE
return ANFE;
case 3: // PNFE
return PNFE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.IRE, new org.apache.thrift.meta_data.FieldMetaData("ire", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.ANFE, new org.apache.thrift.meta_data.FieldMetaData("anfe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.PNFE, new org.apache.thrift.meta_data.FieldMetaData("pnfe", 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(scale_result.class, metaDataMap);
}
public scale_result() {
}
public scale_result(
InsufficientResourcesException ire,
AppNotFoundException anfe,
PelletNotFoundException pnfe)
{
this();
this.ire = ire;
this.anfe = anfe;
this.pnfe = pnfe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public scale_result(scale_result other) {
if (other.is_set_ire()) {
this.ire = new InsufficientResourcesException(other.ire);
}
if (other.is_set_anfe()) {
this.anfe = new AppNotFoundException(other.anfe);
}
if (other.is_set_pnfe()) {
this.pnfe = new PelletNotFoundException(other.pnfe);
}
}
public scale_result deepCopy() {
return new scale_result(this);
}
@Override
public void clear() {
this.ire = null;
this.anfe = null;
this.pnfe = null;
}
public InsufficientResourcesException get_ire() {
return this.ire;
}
public void set_ire(InsufficientResourcesException ire) {
this.ire = ire;
}
public void unset_ire() {
this.ire = null;
}
/** Returns true if field ire is set (has been assigned a value) and false otherwise */
public boolean is_set_ire() {
return this.ire != null;
}
public void set_ire_isSet(boolean value) {
if (!value) {
this.ire = null;
}
}
public AppNotFoundException get_anfe() {
return this.anfe;
}
public void set_anfe(AppNotFoundException anfe) {
this.anfe = anfe;
}
public void unset_anfe() {
this.anfe = null;
}
/** Returns true if field anfe is set (has been assigned a value) and false otherwise */
public boolean is_set_anfe() {
return this.anfe != null;
}
public void set_anfe_isSet(boolean value) {
if (!value) {
this.anfe = null;
}
}
public PelletNotFoundException get_pnfe() {
return this.pnfe;
}
public void set_pnfe(PelletNotFoundException pnfe) {
this.pnfe = pnfe;
}
public void unset_pnfe() {
this.pnfe = null;
}
/** Returns true if field pnfe is set (has been assigned a value) and false otherwise */
public boolean is_set_pnfe() {
return this.pnfe != null;
}
public void set_pnfe_isSet(boolean value) {
if (!value) {
this.pnfe = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IRE:
if (value == null) {
unset_ire();
} else {
set_ire((InsufficientResourcesException)value);
}
break;
case ANFE:
if (value == null) {
unset_anfe();
} else {
set_anfe((AppNotFoundException)value);
}
break;
case PNFE:
if (value == null) {
unset_pnfe();
} else {
set_pnfe((PelletNotFoundException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IRE:
return get_ire();
case ANFE:
return get_anfe();
case PNFE:
return get_pnfe();
}
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 IRE:
return is_set_ire();
case ANFE:
return is_set_anfe();
case PNFE:
return is_set_pnfe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof scale_result)
return this.equals((scale_result)that);
return false;
}
public boolean equals(scale_result that) {
if (that == null)
return false;
boolean this_present_ire = true && this.is_set_ire();
boolean that_present_ire = true && that.is_set_ire();
if (this_present_ire || that_present_ire) {
if (!(this_present_ire && that_present_ire))
return false;
if (!this.ire.equals(that.ire))
return false;
}
boolean this_present_anfe = true && this.is_set_anfe();
boolean that_present_anfe = true && that.is_set_anfe();
if (this_present_anfe || that_present_anfe) {
if (!(this_present_anfe && that_present_anfe))
return false;
if (!this.anfe.equals(that.anfe))
return false;
}
boolean this_present_pnfe = true && this.is_set_pnfe();
boolean that_present_pnfe = true && that.is_set_pnfe();
if (this_present_pnfe || that_present_pnfe) {
if (!(this_present_pnfe && that_present_pnfe))
return false;
if (!this.pnfe.equals(that.pnfe))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_ire = true && (is_set_ire());
builder.append(present_ire);
if (present_ire)
builder.append(ire);
boolean present_anfe = true && (is_set_anfe());
builder.append(present_anfe);
if (present_anfe)
builder.append(anfe);
boolean present_pnfe = true && (is_set_pnfe());
builder.append(present_pnfe);
if (present_pnfe)
builder.append(pnfe);
return builder.toHashCode();
}
@Override
public int compareTo(scale_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_ire()).compareTo(other.is_set_ire());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_ire()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ire, other.ire);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_anfe()).compareTo(other.is_set_anfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_anfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.anfe, other.anfe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_pnfe()).compareTo(other.is_set_pnfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_pnfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pnfe, other.pnfe);
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("scale_result(");
boolean first = true;
sb.append("ire:");
if (this.ire == null) {
sb.append("null");
} else {
sb.append(this.ire);
}
first = false;
if (!first) sb.append(", ");
sb.append("anfe:");
if (this.anfe == null) {
sb.append("null");
} else {
sb.append(this.anfe);
}
first = false;
if (!first) sb.append(", ");
sb.append("pnfe:");
if (this.pnfe == null) {
sb.append("null");
} else {
sb.append(this.pnfe);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 scale_resultStandardSchemeFactory implements SchemeFactory {
public scale_resultStandardScheme getScheme() {
return new scale_resultStandardScheme();
}
}
private static class scale_resultStandardScheme extends StandardScheme<scale_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, scale_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // IRE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ire = new InsufficientResourcesException();
struct.ire.read(iprot);
struct.set_ire_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ANFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PNFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.pnfe = new PelletNotFoundException();
struct.pnfe.read(iprot);
struct.set_pnfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, scale_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ire != null) {
oprot.writeFieldBegin(IRE_FIELD_DESC);
struct.ire.write(oprot);
oprot.writeFieldEnd();
}
if (struct.anfe != null) {
oprot.writeFieldBegin(ANFE_FIELD_DESC);
struct.anfe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.pnfe != null) {
oprot.writeFieldBegin(PNFE_FIELD_DESC);
struct.pnfe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class scale_resultTupleSchemeFactory implements SchemeFactory {
public scale_resultTupleScheme getScheme() {
return new scale_resultTupleScheme();
}
}
private static class scale_resultTupleScheme extends TupleScheme<scale_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scale_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_ire()) {
optionals.set(0);
}
if (struct.is_set_anfe()) {
optionals.set(1);
}
if (struct.is_set_pnfe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.is_set_ire()) {
struct.ire.write(oprot);
}
if (struct.is_set_anfe()) {
struct.anfe.write(oprot);
}
if (struct.is_set_pnfe()) {
struct.pnfe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, scale_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.ire = new InsufficientResourcesException();
struct.ire.read(iprot);
struct.set_ire_isSet(true);
}
if (incoming.get(1)) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
}
if (incoming.get(2)) {
struct.pnfe = new PelletNotFoundException();
struct.pnfe.read(iprot);
struct.set_pnfe_isSet(true);
}
}
}
}
public static class signal_args implements org.apache.thrift.TBase<signal_args, signal_args._Fields>, java.io.Serializable, Cloneable, Comparable<signal_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("signal_args");
private static final org.apache.thrift.protocol.TField SIGNAL_FIELD_DESC = new org.apache.thrift.protocol.TField("signal", 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 signal_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new signal_argsTupleSchemeFactory());
}
private TSignal signal; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SIGNAL((short)1, "signal");
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: // SIGNAL
return SIGNAL;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.SIGNAL, new org.apache.thrift.meta_data.FieldMetaData("signal", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSignal.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(signal_args.class, metaDataMap);
}
public signal_args() {
}
public signal_args(
TSignal signal)
{
this();
this.signal = signal;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public signal_args(signal_args other) {
if (other.is_set_signal()) {
this.signal = new TSignal(other.signal);
}
}
public signal_args deepCopy() {
return new signal_args(this);
}
@Override
public void clear() {
this.signal = null;
}
public TSignal get_signal() {
return this.signal;
}
public void set_signal(TSignal signal) {
this.signal = signal;
}
public void unset_signal() {
this.signal = null;
}
/** Returns true if field signal is set (has been assigned a value) and false otherwise */
public boolean is_set_signal() {
return this.signal != null;
}
public void set_signal_isSet(boolean value) {
if (!value) {
this.signal = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SIGNAL:
if (value == null) {
unset_signal();
} else {
set_signal((TSignal)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SIGNAL:
return get_signal();
}
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 SIGNAL:
return is_set_signal();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof signal_args)
return this.equals((signal_args)that);
return false;
}
public boolean equals(signal_args that) {
if (that == null)
return false;
boolean this_present_signal = true && this.is_set_signal();
boolean that_present_signal = true && that.is_set_signal();
if (this_present_signal || that_present_signal) {
if (!(this_present_signal && that_present_signal))
return false;
if (!this.signal.equals(that.signal))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_signal = true && (is_set_signal());
builder.append(present_signal);
if (present_signal)
builder.append(signal);
return builder.toHashCode();
}
@Override
public int compareTo(signal_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_signal()).compareTo(other.is_set_signal());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_signal()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.signal, other.signal);
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("signal_args(");
boolean first = true;
sb.append("signal:");
if (this.signal == null) {
sb.append("null");
} else {
sb.append(this.signal);
}
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 (signal != null) {
signal.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 signal_argsStandardSchemeFactory implements SchemeFactory {
public signal_argsStandardScheme getScheme() {
return new signal_argsStandardScheme();
}
}
private static class signal_argsStandardScheme extends StandardScheme<signal_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, signal_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: // SIGNAL
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.signal = new TSignal();
struct.signal.read(iprot);
struct.set_signal_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, signal_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.signal != null) {
oprot.writeFieldBegin(SIGNAL_FIELD_DESC);
struct.signal.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class signal_argsTupleSchemeFactory implements SchemeFactory {
public signal_argsTupleScheme getScheme() {
return new signal_argsTupleScheme();
}
}
private static class signal_argsTupleScheme extends TupleScheme<signal_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, signal_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_signal()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_signal()) {
struct.signal.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, signal_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.signal = new TSignal();
struct.signal.read(iprot);
struct.set_signal_isSet(true);
}
}
}
}
public static class signal_result implements org.apache.thrift.TBase<signal_result, signal_result._Fields>, java.io.Serializable, Cloneable, Comparable<signal_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("signal_result");
private static final org.apache.thrift.protocol.TField ANFE_FIELD_DESC = new org.apache.thrift.protocol.TField("anfe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField PNFE_FIELD_DESC = new org.apache.thrift.protocol.TField("pnfe", 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 signal_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new signal_resultTupleSchemeFactory());
}
private AppNotFoundException anfe; // required
private PelletNotFoundException pnfe; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ANFE((short)1, "anfe"),
PNFE((short)2, "pnfe");
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: // ANFE
return ANFE;
case 2: // PNFE
return PNFE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.ANFE, new org.apache.thrift.meta_data.FieldMetaData("anfe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.PNFE, new org.apache.thrift.meta_data.FieldMetaData("pnfe", 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(signal_result.class, metaDataMap);
}
public signal_result() {
}
public signal_result(
AppNotFoundException anfe,
PelletNotFoundException pnfe)
{
this();
this.anfe = anfe;
this.pnfe = pnfe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public signal_result(signal_result other) {
if (other.is_set_anfe()) {
this.anfe = new AppNotFoundException(other.anfe);
}
if (other.is_set_pnfe()) {
this.pnfe = new PelletNotFoundException(other.pnfe);
}
}
public signal_result deepCopy() {
return new signal_result(this);
}
@Override
public void clear() {
this.anfe = null;
this.pnfe = null;
}
public AppNotFoundException get_anfe() {
return this.anfe;
}
public void set_anfe(AppNotFoundException anfe) {
this.anfe = anfe;
}
public void unset_anfe() {
this.anfe = null;
}
/** Returns true if field anfe is set (has been assigned a value) and false otherwise */
public boolean is_set_anfe() {
return this.anfe != null;
}
public void set_anfe_isSet(boolean value) {
if (!value) {
this.anfe = null;
}
}
public PelletNotFoundException get_pnfe() {
return this.pnfe;
}
public void set_pnfe(PelletNotFoundException pnfe) {
this.pnfe = pnfe;
}
public void unset_pnfe() {
this.pnfe = null;
}
/** Returns true if field pnfe is set (has been assigned a value) and false otherwise */
public boolean is_set_pnfe() {
return this.pnfe != null;
}
public void set_pnfe_isSet(boolean value) {
if (!value) {
this.pnfe = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ANFE:
if (value == null) {
unset_anfe();
} else {
set_anfe((AppNotFoundException)value);
}
break;
case PNFE:
if (value == null) {
unset_pnfe();
} else {
set_pnfe((PelletNotFoundException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ANFE:
return get_anfe();
case PNFE:
return get_pnfe();
}
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 ANFE:
return is_set_anfe();
case PNFE:
return is_set_pnfe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof signal_result)
return this.equals((signal_result)that);
return false;
}
public boolean equals(signal_result that) {
if (that == null)
return false;
boolean this_present_anfe = true && this.is_set_anfe();
boolean that_present_anfe = true && that.is_set_anfe();
if (this_present_anfe || that_present_anfe) {
if (!(this_present_anfe && that_present_anfe))
return false;
if (!this.anfe.equals(that.anfe))
return false;
}
boolean this_present_pnfe = true && this.is_set_pnfe();
boolean that_present_pnfe = true && that.is_set_pnfe();
if (this_present_pnfe || that_present_pnfe) {
if (!(this_present_pnfe && that_present_pnfe))
return false;
if (!this.pnfe.equals(that.pnfe))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_anfe = true && (is_set_anfe());
builder.append(present_anfe);
if (present_anfe)
builder.append(anfe);
boolean present_pnfe = true && (is_set_pnfe());
builder.append(present_pnfe);
if (present_pnfe)
builder.append(pnfe);
return builder.toHashCode();
}
@Override
public int compareTo(signal_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_anfe()).compareTo(other.is_set_anfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_anfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.anfe, other.anfe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_pnfe()).compareTo(other.is_set_pnfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_pnfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pnfe, other.pnfe);
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("signal_result(");
boolean first = true;
sb.append("anfe:");
if (this.anfe == null) {
sb.append("null");
} else {
sb.append(this.anfe);
}
first = false;
if (!first) sb.append(", ");
sb.append("pnfe:");
if (this.pnfe == null) {
sb.append("null");
} else {
sb.append(this.pnfe);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 signal_resultStandardSchemeFactory implements SchemeFactory {
public signal_resultStandardScheme getScheme() {
return new signal_resultStandardScheme();
}
}
private static class signal_resultStandardScheme extends StandardScheme<signal_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, signal_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // ANFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PNFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.pnfe = new PelletNotFoundException();
struct.pnfe.read(iprot);
struct.set_pnfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, signal_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.anfe != null) {
oprot.writeFieldBegin(ANFE_FIELD_DESC);
struct.anfe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.pnfe != null) {
oprot.writeFieldBegin(PNFE_FIELD_DESC);
struct.pnfe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class signal_resultTupleSchemeFactory implements SchemeFactory {
public signal_resultTupleScheme getScheme() {
return new signal_resultTupleScheme();
}
}
private static class signal_resultTupleScheme extends TupleScheme<signal_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, signal_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_anfe()) {
optionals.set(0);
}
if (struct.is_set_pnfe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.is_set_anfe()) {
struct.anfe.write(oprot);
}
if (struct.is_set_pnfe()) {
struct.pnfe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, signal_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
}
if (incoming.get(1)) {
struct.pnfe = new PelletNotFoundException();
struct.pnfe.read(iprot);
struct.set_pnfe_isSet(true);
}
}
}
}
public static class switchAlternate_args implements org.apache.thrift.TBase<switchAlternate_args, switchAlternate_args._Fields>, java.io.Serializable, Cloneable, Comparable<switchAlternate_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("switchAlternate_args");
private static final org.apache.thrift.protocol.TField APP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("appName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PELLET_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("pelletName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ALTERNATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("alternateName", 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 switchAlternate_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new switchAlternate_argsTupleSchemeFactory());
}
private String appName; // required
private String pelletName; // required
private String alternateName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
APP_NAME((short)1, "appName"),
PELLET_NAME((short)2, "pelletName"),
ALTERNATE_NAME((short)3, "alternateName");
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: // APP_NAME
return APP_NAME;
case 2: // PELLET_NAME
return PELLET_NAME;
case 3: // ALTERNATE_NAME
return ALTERNATE_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new 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.APP_NAME, new org.apache.thrift.meta_data.FieldMetaData("appName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PELLET_NAME, new org.apache.thrift.meta_data.FieldMetaData("pelletName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ALTERNATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("alternateName", 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(switchAlternate_args.class, metaDataMap);
}
public switchAlternate_args() {
}
public switchAlternate_args(
String appName,
String pelletName,
String alternateName)
{
this();
this.appName = appName;
this.pelletName = pelletName;
this.alternateName = alternateName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public switchAlternate_args(switchAlternate_args other) {
if (other.is_set_appName()) {
this.appName = other.appName;
}
if (other.is_set_pelletName()) {
this.pelletName = other.pelletName;
}
if (other.is_set_alternateName()) {
this.alternateName = other.alternateName;
}
}
public switchAlternate_args deepCopy() {
return new switchAlternate_args(this);
}
@Override
public void clear() {
this.appName = null;
this.pelletName = null;
this.alternateName = null;
}
public String get_appName() {
return this.appName;
}
public void set_appName(String appName) {
this.appName = appName;
}
public void unset_appName() {
this.appName = null;
}
/** Returns true if field appName is set (has been assigned a value) and false otherwise */
public boolean is_set_appName() {
return this.appName != null;
}
public void set_appName_isSet(boolean value) {
if (!value) {
this.appName = null;
}
}
public String get_pelletName() {
return this.pelletName;
}
public void set_pelletName(String pelletName) {
this.pelletName = pelletName;
}
public void unset_pelletName() {
this.pelletName = null;
}
/** Returns true if field pelletName is set (has been assigned a value) and false otherwise */
public boolean is_set_pelletName() {
return this.pelletName != null;
}
public void set_pelletName_isSet(boolean value) {
if (!value) {
this.pelletName = null;
}
}
public String get_alternateName() {
return this.alternateName;
}
public void set_alternateName(String alternateName) {
this.alternateName = alternateName;
}
public void unset_alternateName() {
this.alternateName = null;
}
/** Returns true if field alternateName is set (has been assigned a value) and false otherwise */
public boolean is_set_alternateName() {
return this.alternateName != null;
}
public void set_alternateName_isSet(boolean value) {
if (!value) {
this.alternateName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case APP_NAME:
if (value == null) {
unset_appName();
} else {
set_appName((String)value);
}
break;
case PELLET_NAME:
if (value == null) {
unset_pelletName();
} else {
set_pelletName((String)value);
}
break;
case ALTERNATE_NAME:
if (value == null) {
unset_alternateName();
} else {
set_alternateName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case APP_NAME:
return get_appName();
case PELLET_NAME:
return get_pelletName();
case ALTERNATE_NAME:
return get_alternateName();
}
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 APP_NAME:
return is_set_appName();
case PELLET_NAME:
return is_set_pelletName();
case ALTERNATE_NAME:
return is_set_alternateName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof switchAlternate_args)
return this.equals((switchAlternate_args)that);
return false;
}
public boolean equals(switchAlternate_args that) {
if (that == null)
return false;
boolean this_present_appName = true && this.is_set_appName();
boolean that_present_appName = true && that.is_set_appName();
if (this_present_appName || that_present_appName) {
if (!(this_present_appName && that_present_appName))
return false;
if (!this.appName.equals(that.appName))
return false;
}
boolean this_present_pelletName = true && this.is_set_pelletName();
boolean that_present_pelletName = true && that.is_set_pelletName();
if (this_present_pelletName || that_present_pelletName) {
if (!(this_present_pelletName && that_present_pelletName))
return false;
if (!this.pelletName.equals(that.pelletName))
return false;
}
boolean this_present_alternateName = true && this.is_set_alternateName();
boolean that_present_alternateName = true && that.is_set_alternateName();
if (this_present_alternateName || that_present_alternateName) {
if (!(this_present_alternateName && that_present_alternateName))
return false;
if (!this.alternateName.equals(that.alternateName))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_appName = true && (is_set_appName());
builder.append(present_appName);
if (present_appName)
builder.append(appName);
boolean present_pelletName = true && (is_set_pelletName());
builder.append(present_pelletName);
if (present_pelletName)
builder.append(pelletName);
boolean present_alternateName = true && (is_set_alternateName());
builder.append(present_alternateName);
if (present_alternateName)
builder.append(alternateName);
return builder.toHashCode();
}
@Override
public int compareTo(switchAlternate_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_appName()).compareTo(other.is_set_appName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_appName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appName, other.appName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_pelletName()).compareTo(other.is_set_pelletName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_pelletName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pelletName, other.pelletName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_alternateName()).compareTo(other.is_set_alternateName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_alternateName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alternateName, other.alternateName);
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("switchAlternate_args(");
boolean first = true;
sb.append("appName:");
if (this.appName == null) {
sb.append("null");
} else {
sb.append(this.appName);
}
first = false;
if (!first) sb.append(", ");
sb.append("pelletName:");
if (this.pelletName == null) {
sb.append("null");
} else {
sb.append(this.pelletName);
}
first = false;
if (!first) sb.append(", ");
sb.append("alternateName:");
if (this.alternateName == null) {
sb.append("null");
} else {
sb.append(this.alternateName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 switchAlternate_argsStandardSchemeFactory implements SchemeFactory {
public switchAlternate_argsStandardScheme getScheme() {
return new switchAlternate_argsStandardScheme();
}
}
private static class switchAlternate_argsStandardScheme extends StandardScheme<switchAlternate_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, switchAlternate_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: // APP_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PELLET_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.pelletName = iprot.readString();
struct.set_pelletName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ALTERNATE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.alternateName = iprot.readString();
struct.set_alternateName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, switchAlternate_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.appName != null) {
oprot.writeFieldBegin(APP_NAME_FIELD_DESC);
oprot.writeString(struct.appName);
oprot.writeFieldEnd();
}
if (struct.pelletName != null) {
oprot.writeFieldBegin(PELLET_NAME_FIELD_DESC);
oprot.writeString(struct.pelletName);
oprot.writeFieldEnd();
}
if (struct.alternateName != null) {
oprot.writeFieldBegin(ALTERNATE_NAME_FIELD_DESC);
oprot.writeString(struct.alternateName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class switchAlternate_argsTupleSchemeFactory implements SchemeFactory {
public switchAlternate_argsTupleScheme getScheme() {
return new switchAlternate_argsTupleScheme();
}
}
private static class switchAlternate_argsTupleScheme extends TupleScheme<switchAlternate_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, switchAlternate_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_appName()) {
optionals.set(0);
}
if (struct.is_set_pelletName()) {
optionals.set(1);
}
if (struct.is_set_alternateName()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.is_set_appName()) {
oprot.writeString(struct.appName);
}
if (struct.is_set_pelletName()) {
oprot.writeString(struct.pelletName);
}
if (struct.is_set_alternateName()) {
oprot.writeString(struct.alternateName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, switchAlternate_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
}
if (incoming.get(1)) {
struct.pelletName = iprot.readString();
struct.set_pelletName_isSet(true);
}
if (incoming.get(2)) {
struct.alternateName = iprot.readString();
struct.set_alternateName_isSet(true);
}
}
}
}
public static class switchAlternate_result implements org.apache.thrift.TBase<switchAlternate_result, switchAlternate_result._Fields>, java.io.Serializable, Cloneable, Comparable<switchAlternate_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("switchAlternate_result");
private static final org.apache.thrift.protocol.TField ANFE_FIELD_DESC = new org.apache.thrift.protocol.TField("anfe", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField PNFE_FIELD_DESC = new org.apache.thrift.protocol.TField("pnfe", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField ALNFE_FIELD_DESC = new org.apache.thrift.protocol.TField("alnfe", 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 switchAlternate_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new switchAlternate_resultTupleSchemeFactory());
}
private AppNotFoundException anfe; // required
private PelletNotFoundException pnfe; // required
private AlternateNotFoundException alnfe; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ANFE((short)1, "anfe"),
PNFE((short)2, "pnfe"),
ALNFE((short)3, "alnfe");
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: // ANFE
return ANFE;
case 2: // PNFE
return PNFE;
case 3: // ALNFE
return ALNFE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.ANFE, new org.apache.thrift.meta_data.FieldMetaData("anfe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.PNFE, new org.apache.thrift.meta_data.FieldMetaData("pnfe", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.ALNFE, new org.apache.thrift.meta_data.FieldMetaData("alnfe", 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(switchAlternate_result.class, metaDataMap);
}
public switchAlternate_result() {
}
public switchAlternate_result(
AppNotFoundException anfe,
PelletNotFoundException pnfe,
AlternateNotFoundException alnfe)
{
this();
this.anfe = anfe;
this.pnfe = pnfe;
this.alnfe = alnfe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public switchAlternate_result(switchAlternate_result other) {
if (other.is_set_anfe()) {
this.anfe = new AppNotFoundException(other.anfe);
}
if (other.is_set_pnfe()) {
this.pnfe = new PelletNotFoundException(other.pnfe);
}
if (other.is_set_alnfe()) {
this.alnfe = new AlternateNotFoundException(other.alnfe);
}
}
public switchAlternate_result deepCopy() {
return new switchAlternate_result(this);
}
@Override
public void clear() {
this.anfe = null;
this.pnfe = null;
this.alnfe = null;
}
public AppNotFoundException get_anfe() {
return this.anfe;
}
public void set_anfe(AppNotFoundException anfe) {
this.anfe = anfe;
}
public void unset_anfe() {
this.anfe = null;
}
/** Returns true if field anfe is set (has been assigned a value) and false otherwise */
public boolean is_set_anfe() {
return this.anfe != null;
}
public void set_anfe_isSet(boolean value) {
if (!value) {
this.anfe = null;
}
}
public PelletNotFoundException get_pnfe() {
return this.pnfe;
}
public void set_pnfe(PelletNotFoundException pnfe) {
this.pnfe = pnfe;
}
public void unset_pnfe() {
this.pnfe = null;
}
/** Returns true if field pnfe is set (has been assigned a value) and false otherwise */
public boolean is_set_pnfe() {
return this.pnfe != null;
}
public void set_pnfe_isSet(boolean value) {
if (!value) {
this.pnfe = null;
}
}
public AlternateNotFoundException get_alnfe() {
return this.alnfe;
}
public void set_alnfe(AlternateNotFoundException alnfe) {
this.alnfe = alnfe;
}
public void unset_alnfe() {
this.alnfe = null;
}
/** Returns true if field alnfe is set (has been assigned a value) and false otherwise */
public boolean is_set_alnfe() {
return this.alnfe != null;
}
public void set_alnfe_isSet(boolean value) {
if (!value) {
this.alnfe = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ANFE:
if (value == null) {
unset_anfe();
} else {
set_anfe((AppNotFoundException)value);
}
break;
case PNFE:
if (value == null) {
unset_pnfe();
} else {
set_pnfe((PelletNotFoundException)value);
}
break;
case ALNFE:
if (value == null) {
unset_alnfe();
} else {
set_alnfe((AlternateNotFoundException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ANFE:
return get_anfe();
case PNFE:
return get_pnfe();
case ALNFE:
return get_alnfe();
}
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 ANFE:
return is_set_anfe();
case PNFE:
return is_set_pnfe();
case ALNFE:
return is_set_alnfe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof switchAlternate_result)
return this.equals((switchAlternate_result)that);
return false;
}
public boolean equals(switchAlternate_result that) {
if (that == null)
return false;
boolean this_present_anfe = true && this.is_set_anfe();
boolean that_present_anfe = true && that.is_set_anfe();
if (this_present_anfe || that_present_anfe) {
if (!(this_present_anfe && that_present_anfe))
return false;
if (!this.anfe.equals(that.anfe))
return false;
}
boolean this_present_pnfe = true && this.is_set_pnfe();
boolean that_present_pnfe = true && that.is_set_pnfe();
if (this_present_pnfe || that_present_pnfe) {
if (!(this_present_pnfe && that_present_pnfe))
return false;
if (!this.pnfe.equals(that.pnfe))
return false;
}
boolean this_present_alnfe = true && this.is_set_alnfe();
boolean that_present_alnfe = true && that.is_set_alnfe();
if (this_present_alnfe || that_present_alnfe) {
if (!(this_present_alnfe && that_present_alnfe))
return false;
if (!this.alnfe.equals(that.alnfe))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_anfe = true && (is_set_anfe());
builder.append(present_anfe);
if (present_anfe)
builder.append(anfe);
boolean present_pnfe = true && (is_set_pnfe());
builder.append(present_pnfe);
if (present_pnfe)
builder.append(pnfe);
boolean present_alnfe = true && (is_set_alnfe());
builder.append(present_alnfe);
if (present_alnfe)
builder.append(alnfe);
return builder.toHashCode();
}
@Override
public int compareTo(switchAlternate_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_anfe()).compareTo(other.is_set_anfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_anfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.anfe, other.anfe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_pnfe()).compareTo(other.is_set_pnfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_pnfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pnfe, other.pnfe);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_alnfe()).compareTo(other.is_set_alnfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_alnfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alnfe, other.alnfe);
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("switchAlternate_result(");
boolean first = true;
sb.append("anfe:");
if (this.anfe == null) {
sb.append("null");
} else {
sb.append(this.anfe);
}
first = false;
if (!first) sb.append(", ");
sb.append("pnfe:");
if (this.pnfe == null) {
sb.append("null");
} else {
sb.append(this.pnfe);
}
first = false;
if (!first) sb.append(", ");
sb.append("alnfe:");
if (this.alnfe == null) {
sb.append("null");
} else {
sb.append(this.alnfe);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 switchAlternate_resultStandardSchemeFactory implements SchemeFactory {
public switchAlternate_resultStandardScheme getScheme() {
return new switchAlternate_resultStandardScheme();
}
}
private static class switchAlternate_resultStandardScheme extends StandardScheme<switchAlternate_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, switchAlternate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // ANFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PNFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.pnfe = new PelletNotFoundException();
struct.pnfe.read(iprot);
struct.set_pnfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // ALNFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.alnfe = new AlternateNotFoundException();
struct.alnfe.read(iprot);
struct.set_alnfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, switchAlternate_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.anfe != null) {
oprot.writeFieldBegin(ANFE_FIELD_DESC);
struct.anfe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.pnfe != null) {
oprot.writeFieldBegin(PNFE_FIELD_DESC);
struct.pnfe.write(oprot);
oprot.writeFieldEnd();
}
if (struct.alnfe != null) {
oprot.writeFieldBegin(ALNFE_FIELD_DESC);
struct.alnfe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class switchAlternate_resultTupleSchemeFactory implements SchemeFactory {
public switchAlternate_resultTupleScheme getScheme() {
return new switchAlternate_resultTupleScheme();
}
}
private static class switchAlternate_resultTupleScheme extends TupleScheme<switchAlternate_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, switchAlternate_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_anfe()) {
optionals.set(0);
}
if (struct.is_set_pnfe()) {
optionals.set(1);
}
if (struct.is_set_alnfe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.is_set_anfe()) {
struct.anfe.write(oprot);
}
if (struct.is_set_pnfe()) {
struct.pnfe.write(oprot);
}
if (struct.is_set_alnfe()) {
struct.alnfe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, switchAlternate_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
}
if (incoming.get(1)) {
struct.pnfe = new PelletNotFoundException();
struct.pnfe.read(iprot);
struct.set_pnfe_isSet(true);
}
if (incoming.get(2)) {
struct.alnfe = new AlternateNotFoundException();
struct.alnfe.read(iprot);
struct.set_alnfe_isSet(true);
}
}
}
}
public static class killApp_args implements org.apache.thrift.TBase<killApp_args, killApp_args._Fields>, java.io.Serializable, Cloneable, Comparable<killApp_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("killApp_args");
private static final org.apache.thrift.protocol.TField APP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("appName", 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 killApp_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new killApp_argsTupleSchemeFactory());
}
private String appName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
APP_NAME((short)1, "appName");
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: // APP_NAME
return APP_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new 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.APP_NAME, new org.apache.thrift.meta_data.FieldMetaData("appName", 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(killApp_args.class, metaDataMap);
}
public killApp_args() {
}
public killApp_args(
String appName)
{
this();
this.appName = appName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public killApp_args(killApp_args other) {
if (other.is_set_appName()) {
this.appName = other.appName;
}
}
public killApp_args deepCopy() {
return new killApp_args(this);
}
@Override
public void clear() {
this.appName = null;
}
public String get_appName() {
return this.appName;
}
public void set_appName(String appName) {
this.appName = appName;
}
public void unset_appName() {
this.appName = null;
}
/** Returns true if field appName is set (has been assigned a value) and false otherwise */
public boolean is_set_appName() {
return this.appName != null;
}
public void set_appName_isSet(boolean value) {
if (!value) {
this.appName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case APP_NAME:
if (value == null) {
unset_appName();
} else {
set_appName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case APP_NAME:
return get_appName();
}
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 APP_NAME:
return is_set_appName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof killApp_args)
return this.equals((killApp_args)that);
return false;
}
public boolean equals(killApp_args that) {
if (that == null)
return false;
boolean this_present_appName = true && this.is_set_appName();
boolean that_present_appName = true && that.is_set_appName();
if (this_present_appName || that_present_appName) {
if (!(this_present_appName && that_present_appName))
return false;
if (!this.appName.equals(that.appName))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_appName = true && (is_set_appName());
builder.append(present_appName);
if (present_appName)
builder.append(appName);
return builder.toHashCode();
}
@Override
public int compareTo(killApp_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_appName()).compareTo(other.is_set_appName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_appName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appName, other.appName);
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("killApp_args(");
boolean first = true;
sb.append("appName:");
if (this.appName == null) {
sb.append("null");
} else {
sb.append(this.appName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 killApp_argsStandardSchemeFactory implements SchemeFactory {
public killApp_argsStandardScheme getScheme() {
return new killApp_argsStandardScheme();
}
}
private static class killApp_argsStandardScheme extends StandardScheme<killApp_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, killApp_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: // APP_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, killApp_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.appName != null) {
oprot.writeFieldBegin(APP_NAME_FIELD_DESC);
oprot.writeString(struct.appName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class killApp_argsTupleSchemeFactory implements SchemeFactory {
public killApp_argsTupleScheme getScheme() {
return new killApp_argsTupleScheme();
}
}
private static class killApp_argsTupleScheme extends TupleScheme<killApp_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, killApp_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_appName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_appName()) {
oprot.writeString(struct.appName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, killApp_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
}
}
}
}
public static class killApp_result implements org.apache.thrift.TBase<killApp_result, killApp_result._Fields>, java.io.Serializable, Cloneable, Comparable<killApp_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("killApp_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new killApp_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new killApp_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(killApp_result.class, metaDataMap);
}
public killApp_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public killApp_result(killApp_result other) {
}
public killApp_result deepCopy() {
return new killApp_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 killApp_result)
return this.equals((killApp_result)that);
return false;
}
public boolean equals(killApp_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
return builder.toHashCode();
}
@Override
public int compareTo(killApp_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("killApp_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 killApp_resultStandardSchemeFactory implements SchemeFactory {
public killApp_resultStandardScheme getScheme() {
return new killApp_resultStandardScheme();
}
}
private static class killApp_resultStandardScheme extends StandardScheme<killApp_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, killApp_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();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, killApp_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class killApp_resultTupleSchemeFactory implements SchemeFactory {
public killApp_resultTupleScheme getScheme() {
return new killApp_resultTupleScheme();
}
}
private static class killApp_resultTupleScheme extends TupleScheme<killApp_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, killApp_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, killApp_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class getAppStatus_args implements org.apache.thrift.TBase<getAppStatus_args, getAppStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAppStatus_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAppStatus_args");
private static final org.apache.thrift.protocol.TField APP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("appName", 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 getAppStatus_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new getAppStatus_argsTupleSchemeFactory());
}
private String appName; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
APP_NAME((short)1, "appName");
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: // APP_NAME
return APP_NAME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new 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.APP_NAME, new org.apache.thrift.meta_data.FieldMetaData("appName", 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(getAppStatus_args.class, metaDataMap);
}
public getAppStatus_args() {
}
public getAppStatus_args(
String appName)
{
this();
this.appName = appName;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAppStatus_args(getAppStatus_args other) {
if (other.is_set_appName()) {
this.appName = other.appName;
}
}
public getAppStatus_args deepCopy() {
return new getAppStatus_args(this);
}
@Override
public void clear() {
this.appName = null;
}
public String get_appName() {
return this.appName;
}
public void set_appName(String appName) {
this.appName = appName;
}
public void unset_appName() {
this.appName = null;
}
/** Returns true if field appName is set (has been assigned a value) and false otherwise */
public boolean is_set_appName() {
return this.appName != null;
}
public void set_appName_isSet(boolean value) {
if (!value) {
this.appName = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case APP_NAME:
if (value == null) {
unset_appName();
} else {
set_appName((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case APP_NAME:
return get_appName();
}
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 APP_NAME:
return is_set_appName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getAppStatus_args)
return this.equals((getAppStatus_args)that);
return false;
}
public boolean equals(getAppStatus_args that) {
if (that == null)
return false;
boolean this_present_appName = true && this.is_set_appName();
boolean that_present_appName = true && that.is_set_appName();
if (this_present_appName || that_present_appName) {
if (!(this_present_appName && that_present_appName))
return false;
if (!this.appName.equals(that.appName))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_appName = true && (is_set_appName());
builder.append(present_appName);
if (present_appName)
builder.append(appName);
return builder.toHashCode();
}
@Override
public int compareTo(getAppStatus_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_appName()).compareTo(other.is_set_appName());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_appName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.appName, other.appName);
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("getAppStatus_args(");
boolean first = true;
sb.append("appName:");
if (this.appName == null) {
sb.append("null");
} else {
sb.append(this.appName);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 getAppStatus_argsStandardSchemeFactory implements SchemeFactory {
public getAppStatus_argsStandardScheme getScheme() {
return new getAppStatus_argsStandardScheme();
}
}
private static class getAppStatus_argsStandardScheme extends StandardScheme<getAppStatus_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAppStatus_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: // APP_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getAppStatus_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.appName != null) {
oprot.writeFieldBegin(APP_NAME_FIELD_DESC);
oprot.writeString(struct.appName);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAppStatus_argsTupleSchemeFactory implements SchemeFactory {
public getAppStatus_argsTupleScheme getScheme() {
return new getAppStatus_argsTupleScheme();
}
}
private static class getAppStatus_argsTupleScheme extends TupleScheme<getAppStatus_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAppStatus_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_appName()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.is_set_appName()) {
oprot.writeString(struct.appName);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAppStatus_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.appName = iprot.readString();
struct.set_appName_isSet(true);
}
}
}
}
public static class getAppStatus_result implements org.apache.thrift.TBase<getAppStatus_result, getAppStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAppStatus_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAppStatus_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final org.apache.thrift.protocol.TField ANFE_FIELD_DESC = new org.apache.thrift.protocol.TField("anfe", 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 getAppStatus_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new getAppStatus_resultTupleSchemeFactory());
}
private AppStatus success; // required
private AppNotFoundException anfe; // required
/** 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 AppStatus
*/
SUCCESS((short)0, "success"),
ANFE((short)1, "anfe");
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: // ANFE
return ANFE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches 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.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AppStatus.class)));
tmpMap.put(_Fields.ANFE, new org.apache.thrift.meta_data.FieldMetaData("anfe", 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(getAppStatus_result.class, metaDataMap);
}
public getAppStatus_result() {
}
public getAppStatus_result(
AppStatus success,
AppNotFoundException anfe)
{
this();
this.success = success;
this.anfe = anfe;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAppStatus_result(getAppStatus_result other) {
if (other.is_set_success()) {
this.success = other.success;
}
if (other.is_set_anfe()) {
this.anfe = new AppNotFoundException(other.anfe);
}
}
public getAppStatus_result deepCopy() {
return new getAppStatus_result(this);
}
@Override
public void clear() {
this.success = null;
this.anfe = null;
}
/**
*
* @see AppStatus
*/
public AppStatus get_success() {
return this.success;
}
/**
*
* @see AppStatus
*/
public void set_success(AppStatus success) {
this.success = success;
}
public void unset_success() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean is_set_success() {
return this.success != null;
}
public void set_success_isSet(boolean value) {
if (!value) {
this.success = null;
}
}
public AppNotFoundException get_anfe() {
return this.anfe;
}
public void set_anfe(AppNotFoundException anfe) {
this.anfe = anfe;
}
public void unset_anfe() {
this.anfe = null;
}
/** Returns true if field anfe is set (has been assigned a value) and false otherwise */
public boolean is_set_anfe() {
return this.anfe != null;
}
public void set_anfe_isSet(boolean value) {
if (!value) {
this.anfe = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
set_success((AppStatus)value);
}
break;
case ANFE:
if (value == null) {
unset_anfe();
} else {
set_anfe((AppNotFoundException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
case ANFE:
return get_anfe();
}
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 is_set_success();
case ANFE:
return is_set_anfe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof getAppStatus_result)
return this.equals((getAppStatus_result)that);
return false;
}
public boolean equals(getAppStatus_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.is_set_success();
boolean that_present_success = true && that.is_set_success();
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_anfe = true && this.is_set_anfe();
boolean that_present_anfe = true && that.is_set_anfe();
if (this_present_anfe || that_present_anfe) {
if (!(this_present_anfe && that_present_anfe))
return false;
if (!this.anfe.equals(that.anfe))
return false;
}
return true;
}
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_success = true && (is_set_success());
builder.append(present_success);
if (present_success)
builder.append(success.getValue());
boolean present_anfe = true && (is_set_anfe());
builder.append(present_anfe);
if (present_anfe)
builder.append(anfe);
return builder.toHashCode();
}
@Override
public int compareTo(getAppStatus_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_success()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(is_set_anfe()).compareTo(other.is_set_anfe());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_anfe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.anfe, other.anfe);
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("getAppStatus_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("anfe:");
if (this.anfe == null) {
sb.append("null");
} else {
sb.append(this.anfe);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(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 getAppStatus_resultStandardSchemeFactory implements SchemeFactory {
public getAppStatus_resultStandardScheme getScheme() {
return new getAppStatus_resultStandardScheme();
}
}
private static class getAppStatus_resultStandardScheme extends StandardScheme<getAppStatus_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAppStatus_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.success = AppStatus.findByValue(iprot.readI32());
struct.set_success_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // ANFE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, getAppStatus_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success.getValue());
oprot.writeFieldEnd();
}
if (struct.anfe != null) {
oprot.writeFieldBegin(ANFE_FIELD_DESC);
struct.anfe.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class getAppStatus_resultTupleSchemeFactory implements SchemeFactory {
public getAppStatus_resultTupleScheme getScheme() {
return new getAppStatus_resultTupleScheme();
}
}
private static class getAppStatus_resultTupleScheme extends TupleScheme<getAppStatus_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAppStatus_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.is_set_success()) {
optionals.set(0);
}
if (struct.is_set_anfe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.is_set_success()) {
oprot.writeI32(struct.success.getValue());
}
if (struct.is_set_anfe()) {
struct.anfe.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAppStatus_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = AppStatus.findByValue(iprot.readI32());
struct.set_success_isSet(true);
}
if (incoming.get(1)) {
struct.anfe = new AppNotFoundException();
struct.anfe.read(iprot);
struct.set_anfe_isSet(true);
}
}
}
}
}