summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java')
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java1458
1 files changed, 1443 insertions, 15 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
index 5559dca..53bfd52 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-09-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-05-11")
public class SatelliteServer {
public interface Iface {
@@ -47,7 +47,9 @@ public class SatelliteServer {
public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes) throws TInvalidTokenException, org.apache.thrift.TException;
+ public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws TInvalidTokenException, org.apache.thrift.TException;
+
+ public UploadOptions setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException;
public void cancelUpload(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
@@ -137,7 +139,9 @@ public class SatelliteServer {
public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void setUploadOptions(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -343,17 +347,18 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageVersionUpload failed: unknown result");
}
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes) throws TInvalidTokenException, org.apache.thrift.TException
+ public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws TInvalidTokenException, org.apache.thrift.TException
{
- send_updateBlockHashes(uploadToken, blockHashes);
+ send_updateBlockHashes(uploadToken, blockHashes, userToken);
recv_updateBlockHashes();
}
- public void send_updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes) throws org.apache.thrift.TException
+ public void send_updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws org.apache.thrift.TException
{
updateBlockHashes_args args = new updateBlockHashes_args();
args.setUploadToken(uploadToken);
args.setBlockHashes(blockHashes);
+ args.setUserToken(userToken);
sendBase("updateBlockHashes", args);
}
@@ -367,6 +372,37 @@ public class SatelliteServer {
return;
}
+ public UploadOptions setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException
+ {
+ send_setUploadOptions(userToken, uploadToken, options);
+ return recv_setUploadOptions();
+ }
+
+ public void send_setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws org.apache.thrift.TException
+ {
+ setUploadOptions_args args = new setUploadOptions_args();
+ args.setUserToken(userToken);
+ args.setUploadToken(uploadToken);
+ args.setOptions(options);
+ sendBase("setUploadOptions", args);
+ }
+
+ public UploadOptions recv_setUploadOptions() throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException
+ {
+ setUploadOptions_result result = new setUploadOptions_result();
+ receiveBase(result, "setUploadOptions");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.frootloops != null) {
+ throw result.frootloops;
+ }
+ if (result.imcyborgbutthatsok != null) {
+ throw result.imcyborgbutthatsok;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUploadOptions failed: unknown result");
+ }
+
public void cancelUpload(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
{
send_cancelUpload(uploadToken);
@@ -1637,9 +1673,9 @@ public class SatelliteServer {
}
}
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
- updateBlockHashes_call method_call = new updateBlockHashes_call(uploadToken, blockHashes, resultHandler, this, ___protocolFactory, ___transport);
+ updateBlockHashes_call method_call = new updateBlockHashes_call(uploadToken, blockHashes, userToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
@@ -1647,10 +1683,12 @@ public class SatelliteServer {
public static class updateBlockHashes_call extends org.apache.thrift.async.TAsyncMethodCall {
private String uploadToken;
private List<ByteBuffer> blockHashes;
- public updateBlockHashes_call(String uploadToken, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private String userToken;
+ public updateBlockHashes_call(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.uploadToken = uploadToken;
this.blockHashes = blockHashes;
+ this.userToken = userToken;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1658,6 +1696,7 @@ public class SatelliteServer {
updateBlockHashes_args args = new updateBlockHashes_args();
args.setUploadToken(uploadToken);
args.setBlockHashes(blockHashes);
+ args.setUserToken(userToken);
args.write(prot);
prot.writeMessageEnd();
}
@@ -1672,6 +1711,44 @@ public class SatelliteServer {
}
}
+ public void setUploadOptions(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ setUploadOptions_call method_call = new setUploadOptions_call(userToken, uploadToken, options, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class setUploadOptions_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String uploadToken;
+ private UploadOptions options;
+ public setUploadOptions_call(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.uploadToken = uploadToken;
+ this.options = options;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUploadOptions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ setUploadOptions_args args = new setUploadOptions_args();
+ args.setUserToken(userToken);
+ args.setUploadToken(uploadToken);
+ args.setOptions(options);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public UploadOptions getResult() throws TAuthorizationException, TInvalidTokenException, 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_setUploadOptions();
+ }
+ }
+
public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
cancelUpload_call method_call = new cancelUpload_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
@@ -2999,6 +3076,7 @@ public class SatelliteServer {
processMap.put("getConfiguration", new getConfiguration());
processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
processMap.put("updateBlockHashes", new updateBlockHashes());
+ processMap.put("setUploadOptions", new setUploadOptions());
processMap.put("cancelUpload", new cancelUpload());
processMap.put("queryUploadStatus", new queryUploadStatus());
processMap.put("requestDownload", new requestDownload());
@@ -3147,7 +3225,7 @@ public class SatelliteServer {
public updateBlockHashes_result getResult(I iface, updateBlockHashes_args args) throws org.apache.thrift.TException {
updateBlockHashes_result result = new updateBlockHashes_result();
try {
- iface.updateBlockHashes(args.uploadToken, args.blockHashes);
+ iface.updateBlockHashes(args.uploadToken, args.blockHashes, args.userToken);
} catch (TInvalidTokenException ex1) {
result.ex1 = ex1;
}
@@ -3155,6 +3233,32 @@ public class SatelliteServer {
}
}
+ public static class setUploadOptions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUploadOptions_args> {
+ public setUploadOptions() {
+ super("setUploadOptions");
+ }
+
+ public setUploadOptions_args getEmptyArgsInstance() {
+ return new setUploadOptions_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public setUploadOptions_result getResult(I iface, setUploadOptions_args args) throws org.apache.thrift.TException {
+ setUploadOptions_result result = new setUploadOptions_result();
+ try {
+ result.success = iface.setUploadOptions(args.userToken, args.uploadToken, args.options);
+ } catch (TAuthorizationException frootloops) {
+ result.frootloops = frootloops;
+ } catch (TInvalidTokenException imcyborgbutthatsok) {
+ result.imcyborgbutthatsok = imcyborgbutthatsok;
+ }
+ return result;
+ }
+ }
+
public static class cancelUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelUpload_args> {
public cancelUpload() {
super("cancelUpload");
@@ -4175,6 +4279,7 @@ public class SatelliteServer {
processMap.put("getConfiguration", new getConfiguration());
processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
processMap.put("updateBlockHashes", new updateBlockHashes());
+ processMap.put("setUploadOptions", new setUploadOptions());
processMap.put("cancelUpload", new cancelUpload());
processMap.put("queryUploadStatus", new queryUploadStatus());
processMap.put("requestDownload", new requestDownload());
@@ -4494,7 +4599,69 @@ public class SatelliteServer {
}
public void start(I iface, updateBlockHashes_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
- iface.updateBlockHashes(args.uploadToken, args.blockHashes,resultHandler);
+ iface.updateBlockHashes(args.uploadToken, args.blockHashes, args.userToken,resultHandler);
+ }
+ }
+
+ public static class setUploadOptions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUploadOptions_args, UploadOptions> {
+ public setUploadOptions() {
+ super("setUploadOptions");
+ }
+
+ public setUploadOptions_args getEmptyArgsInstance() {
+ return new setUploadOptions_args();
+ }
+
+ public AsyncMethodCallback<UploadOptions> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<UploadOptions>() {
+ public void onComplete(UploadOptions o) {
+ setUploadOptions_result result = new setUploadOptions_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ 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;
+ setUploadOptions_result result = new setUploadOptions_result();
+ if (e instanceof TAuthorizationException) {
+ result.frootloops = (TAuthorizationException) e;
+ result.setFrootloopsIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TInvalidTokenException) {
+ result.imcyborgbutthatsok = (TInvalidTokenException) e;
+ result.setImcyborgbutthatsokIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ 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, setUploadOptions_args args, org.apache.thrift.async.AsyncMethodCallback<UploadOptions> resultHandler) throws TException {
+ iface.setUploadOptions(args.userToken, args.uploadToken, args.options,resultHandler);
}
}
@@ -10474,6 +10641,7 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)2);
+ private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -10483,11 +10651,13 @@ public class SatelliteServer {
public String uploadToken; // required
public List<ByteBuffer> blockHashes; // required
+ public String userToken; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
UPLOAD_TOKEN((short)1, "uploadToken"),
- BLOCK_HASHES((short)2, "blockHashes");
+ BLOCK_HASHES((short)2, "blockHashes"),
+ USER_TOKEN((short)3, "userToken");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -10506,6 +10676,8 @@ public class SatelliteServer {
return UPLOAD_TOKEN;
case 2: // BLOCK_HASHES
return BLOCK_HASHES;
+ case 3: // USER_TOKEN
+ return USER_TOKEN;
default:
return null;
}
@@ -10554,6 +10726,8 @@ public class SatelliteServer {
tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
+ tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBlockHashes_args.class, metaDataMap);
}
@@ -10563,11 +10737,13 @@ public class SatelliteServer {
public updateBlockHashes_args(
String uploadToken,
- List<ByteBuffer> blockHashes)
+ List<ByteBuffer> blockHashes,
+ String userToken)
{
this();
this.uploadToken = uploadToken;
this.blockHashes = blockHashes;
+ this.userToken = userToken;
}
/**
@@ -10581,6 +10757,9 @@ public class SatelliteServer {
List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
this.blockHashes = __this__blockHashes;
}
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
}
public updateBlockHashes_args deepCopy() {
@@ -10591,6 +10770,7 @@ public class SatelliteServer {
public void clear() {
this.uploadToken = null;
this.blockHashes = null;
+ this.userToken = null;
}
public String getUploadToken() {
@@ -10656,6 +10836,30 @@ public class SatelliteServer {
}
}
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public updateBlockHashes_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case UPLOAD_TOKEN:
@@ -10674,6 +10878,14 @@ public class SatelliteServer {
}
break;
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
}
}
@@ -10685,6 +10897,9 @@ public class SatelliteServer {
case BLOCK_HASHES:
return getBlockHashes();
+ case USER_TOKEN:
+ return getUserToken();
+
}
throw new IllegalStateException();
}
@@ -10700,6 +10915,8 @@ public class SatelliteServer {
return isSetUploadToken();
case BLOCK_HASHES:
return isSetBlockHashes();
+ case USER_TOKEN:
+ return isSetUserToken();
}
throw new IllegalStateException();
}
@@ -10735,6 +10952,15 @@ public class SatelliteServer {
return false;
}
+ boolean this_present_userToken = true && this.isSetUserToken();
+ boolean that_present_userToken = true && that.isSetUserToken();
+ if (this_present_userToken || that_present_userToken) {
+ if (!(this_present_userToken && that_present_userToken))
+ return false;
+ if (!this.userToken.equals(that.userToken))
+ return false;
+ }
+
return true;
}
@@ -10752,6 +10978,11 @@ public class SatelliteServer {
if (present_blockHashes)
list.add(blockHashes);
+ boolean present_userToken = true && (isSetUserToken());
+ list.add(present_userToken);
+ if (present_userToken)
+ list.add(userToken);
+
return list.hashCode();
}
@@ -10783,6 +11014,16 @@ public class SatelliteServer {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -10818,6 +11059,14 @@ public class SatelliteServer {
org.apache.thrift.TBaseHelper.toString(this.blockHashes, sb);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("userToken:");
+ if (this.userToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userToken);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -10887,6 +11136,14 @@ public class SatelliteServer {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 3: // USER_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -10919,6 +11176,11 @@ public class SatelliteServer {
}
oprot.writeFieldEnd();
}
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -10943,7 +11205,10 @@ public class SatelliteServer {
if (struct.isSetBlockHashes()) {
optionals.set(1);
}
- oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
if (struct.isSetUploadToken()) {
oprot.writeString(struct.uploadToken);
}
@@ -10956,12 +11221,15 @@ public class SatelliteServer {
}
}
}
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.uploadToken = iprot.readString();
struct.setUploadTokenIsSet(true);
@@ -10979,6 +11247,10 @@ public class SatelliteServer {
}
struct.setBlockHashesIsSet(true);
}
+ if (incoming.get(2)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
}
}
@@ -11347,6 +11619,1162 @@ public class SatelliteServer {
}
+ public static class setUploadOptions_args implements org.apache.thrift.TBase<setUploadOptions_args, setUploadOptions_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUploadOptions_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUploadOptions_args");
+
+ private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new setUploadOptions_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new setUploadOptions_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String uploadToken; // required
+ public UploadOptions options; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_TOKEN((short)1, "userToken"),
+ UPLOAD_TOKEN((short)2, "uploadToken"),
+ OPTIONS((short)3, "options");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // UPLOAD_TOKEN
+ return UPLOAD_TOKEN;
+ case 3: // OPTIONS
+ return OPTIONS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUploadOptions_args.class, metaDataMap);
+ }
+
+ public setUploadOptions_args() {
+ }
+
+ public setUploadOptions_args(
+ String userToken,
+ String uploadToken,
+ UploadOptions options)
+ {
+ this();
+ this.userToken = userToken;
+ this.uploadToken = uploadToken;
+ this.options = options;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setUploadOptions_args(setUploadOptions_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetUploadToken()) {
+ this.uploadToken = other.uploadToken;
+ }
+ if (other.isSetOptions()) {
+ this.options = new UploadOptions(other.options);
+ }
+ }
+
+ public setUploadOptions_args deepCopy() {
+ return new setUploadOptions_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.uploadToken = null;
+ this.options = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public setUploadOptions_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getUploadToken() {
+ return this.uploadToken;
+ }
+
+ public setUploadOptions_args setUploadToken(String uploadToken) {
+ this.uploadToken = uploadToken;
+ return this;
+ }
+
+ public void unsetUploadToken() {
+ this.uploadToken = null;
+ }
+
+ /** Returns true if field uploadToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUploadToken() {
+ return this.uploadToken != null;
+ }
+
+ public void setUploadTokenIsSet(boolean value) {
+ if (!value) {
+ this.uploadToken = null;
+ }
+ }
+
+ public UploadOptions getOptions() {
+ return this.options;
+ }
+
+ public setUploadOptions_args setOptions(UploadOptions options) {
+ this.options = options;
+ return this;
+ }
+
+ public void unsetOptions() {
+ this.options = null;
+ }
+
+ /** Returns true if field options is set (has been assigned a value) and false otherwise */
+ public boolean isSetOptions() {
+ return this.options != null;
+ }
+
+ public void setOptionsIsSet(boolean value) {
+ if (!value) {
+ this.options = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case UPLOAD_TOKEN:
+ if (value == null) {
+ unsetUploadToken();
+ } else {
+ setUploadToken((String)value);
+ }
+ break;
+
+ case OPTIONS:
+ if (value == null) {
+ unsetOptions();
+ } else {
+ setOptions((UploadOptions)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case UPLOAD_TOKEN:
+ return getUploadToken();
+
+ case OPTIONS:
+ return getOptions();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case USER_TOKEN:
+ return isSetUserToken();
+ case UPLOAD_TOKEN:
+ return isSetUploadToken();
+ case OPTIONS:
+ return isSetOptions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof setUploadOptions_args)
+ return this.equals((setUploadOptions_args)that);
+ return false;
+ }
+
+ public boolean equals(setUploadOptions_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userToken = true && this.isSetUserToken();
+ boolean that_present_userToken = true && that.isSetUserToken();
+ if (this_present_userToken || that_present_userToken) {
+ if (!(this_present_userToken && that_present_userToken))
+ return false;
+ if (!this.userToken.equals(that.userToken))
+ return false;
+ }
+
+ boolean this_present_uploadToken = true && this.isSetUploadToken();
+ boolean that_present_uploadToken = true && that.isSetUploadToken();
+ if (this_present_uploadToken || that_present_uploadToken) {
+ if (!(this_present_uploadToken && that_present_uploadToken))
+ return false;
+ if (!this.uploadToken.equals(that.uploadToken))
+ return false;
+ }
+
+ boolean this_present_options = true && this.isSetOptions();
+ boolean that_present_options = true && that.isSetOptions();
+ if (this_present_options || that_present_options) {
+ if (!(this_present_options && that_present_options))
+ return false;
+ if (!this.options.equals(that.options))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_userToken = true && (isSetUserToken());
+ list.add(present_userToken);
+ if (present_userToken)
+ list.add(userToken);
+
+ boolean present_uploadToken = true && (isSetUploadToken());
+ list.add(present_uploadToken);
+ if (present_uploadToken)
+ list.add(uploadToken);
+
+ boolean present_options = true && (isSetOptions());
+ list.add(present_options);
+ if (present_options)
+ list.add(options);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(setUploadOptions_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUploadToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOptions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ 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("setUploadOptions_args(");
+ boolean first = true;
+
+ sb.append("userToken:");
+ if (this.userToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userToken);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("uploadToken:");
+ if (this.uploadToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uploadToken);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("options:");
+ if (this.options == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.options);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (options != null) {
+ options.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class setUploadOptions_argsStandardSchemeFactory implements SchemeFactory {
+ public setUploadOptions_argsStandardScheme getScheme() {
+ return new setUploadOptions_argsStandardScheme();
+ }
+ }
+
+ private static class setUploadOptions_argsStandardScheme extends StandardScheme<setUploadOptions_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // USER_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // UPLOAD_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uploadToken = iprot.readString();
+ struct.setUploadTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // OPTIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.options = new UploadOptions();
+ struct.options.read(iprot);
+ struct.setOptionsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, setUploadOptions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.uploadToken != null) {
+ oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.uploadToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.options != null) {
+ oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
+ struct.options.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setUploadOptions_argsTupleSchemeFactory implements SchemeFactory {
+ public setUploadOptions_argsTupleScheme getScheme() {
+ return new setUploadOptions_argsTupleScheme();
+ }
+ }
+
+ private static class setUploadOptions_argsTupleScheme extends TupleScheme<setUploadOptions_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetUploadToken()) {
+ optionals.set(1);
+ }
+ if (struct.isSetOptions()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetUploadToken()) {
+ oprot.writeString(struct.uploadToken);
+ }
+ if (struct.isSetOptions()) {
+ struct.options.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.uploadToken = iprot.readString();
+ struct.setUploadTokenIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.options = new UploadOptions();
+ struct.options.read(iprot);
+ struct.setOptionsIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class setUploadOptions_result implements org.apache.thrift.TBase<setUploadOptions_result, setUploadOptions_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUploadOptions_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUploadOptions_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift.protocol.TField FROOTLOOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("frootloops", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField IMCYBORGBUTTHATSOK_FIELD_DESC = new org.apache.thrift.protocol.TField("imcyborgbutthatsok", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new setUploadOptions_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new setUploadOptions_resultTupleSchemeFactory());
+ }
+
+ public UploadOptions success; // required
+ public TAuthorizationException frootloops; // required
+ public TInvalidTokenException imcyborgbutthatsok; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ FROOTLOOPS((short)1, "frootloops"),
+ IMCYBORGBUTTHATSOK((short)2, "imcyborgbutthatsok");
+
+ private static final 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: // FROOTLOOPS
+ return FROOTLOOPS;
+ case 2: // IMCYBORGBUTTHATSOK
+ return IMCYBORGBUTTHATSOK;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class)));
+ tmpMap.put(_Fields.FROOTLOOPS, new org.apache.thrift.meta_data.FieldMetaData("frootloops", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.IMCYBORGBUTTHATSOK, new org.apache.thrift.meta_data.FieldMetaData("imcyborgbutthatsok", 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(setUploadOptions_result.class, metaDataMap);
+ }
+
+ public setUploadOptions_result() {
+ }
+
+ public setUploadOptions_result(
+ UploadOptions success,
+ TAuthorizationException frootloops,
+ TInvalidTokenException imcyborgbutthatsok)
+ {
+ this();
+ this.success = success;
+ this.frootloops = frootloops;
+ this.imcyborgbutthatsok = imcyborgbutthatsok;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public setUploadOptions_result(setUploadOptions_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new UploadOptions(other.success);
+ }
+ if (other.isSetFrootloops()) {
+ this.frootloops = new TAuthorizationException(other.frootloops);
+ }
+ if (other.isSetImcyborgbutthatsok()) {
+ this.imcyborgbutthatsok = new TInvalidTokenException(other.imcyborgbutthatsok);
+ }
+ }
+
+ public setUploadOptions_result deepCopy() {
+ return new setUploadOptions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.frootloops = null;
+ this.imcyborgbutthatsok = null;
+ }
+
+ public UploadOptions getSuccess() {
+ return this.success;
+ }
+
+ public setUploadOptions_result setSuccess(UploadOptions success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public TAuthorizationException getFrootloops() {
+ return this.frootloops;
+ }
+
+ public setUploadOptions_result setFrootloops(TAuthorizationException frootloops) {
+ this.frootloops = frootloops;
+ return this;
+ }
+
+ public void unsetFrootloops() {
+ this.frootloops = null;
+ }
+
+ /** Returns true if field frootloops is set (has been assigned a value) and false otherwise */
+ public boolean isSetFrootloops() {
+ return this.frootloops != null;
+ }
+
+ public void setFrootloopsIsSet(boolean value) {
+ if (!value) {
+ this.frootloops = null;
+ }
+ }
+
+ public TInvalidTokenException getImcyborgbutthatsok() {
+ return this.imcyborgbutthatsok;
+ }
+
+ public setUploadOptions_result setImcyborgbutthatsok(TInvalidTokenException imcyborgbutthatsok) {
+ this.imcyborgbutthatsok = imcyborgbutthatsok;
+ return this;
+ }
+
+ public void unsetImcyborgbutthatsok() {
+ this.imcyborgbutthatsok = null;
+ }
+
+ /** Returns true if field imcyborgbutthatsok is set (has been assigned a value) and false otherwise */
+ public boolean isSetImcyborgbutthatsok() {
+ return this.imcyborgbutthatsok != null;
+ }
+
+ public void setImcyborgbutthatsokIsSet(boolean value) {
+ if (!value) {
+ this.imcyborgbutthatsok = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((UploadOptions)value);
+ }
+ break;
+
+ case FROOTLOOPS:
+ if (value == null) {
+ unsetFrootloops();
+ } else {
+ setFrootloops((TAuthorizationException)value);
+ }
+ break;
+
+ case IMCYBORGBUTTHATSOK:
+ if (value == null) {
+ unsetImcyborgbutthatsok();
+ } else {
+ setImcyborgbutthatsok((TInvalidTokenException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FROOTLOOPS:
+ return getFrootloops();
+
+ case IMCYBORGBUTTHATSOK:
+ return getImcyborgbutthatsok();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case FROOTLOOPS:
+ return isSetFrootloops();
+ case IMCYBORGBUTTHATSOK:
+ return isSetImcyborgbutthatsok();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof setUploadOptions_result)
+ return this.equals((setUploadOptions_result)that);
+ return false;
+ }
+
+ public boolean equals(setUploadOptions_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_frootloops = true && this.isSetFrootloops();
+ boolean that_present_frootloops = true && that.isSetFrootloops();
+ if (this_present_frootloops || that_present_frootloops) {
+ if (!(this_present_frootloops && that_present_frootloops))
+ return false;
+ if (!this.frootloops.equals(that.frootloops))
+ return false;
+ }
+
+ boolean this_present_imcyborgbutthatsok = true && this.isSetImcyborgbutthatsok();
+ boolean that_present_imcyborgbutthatsok = true && that.isSetImcyborgbutthatsok();
+ if (this_present_imcyborgbutthatsok || that_present_imcyborgbutthatsok) {
+ if (!(this_present_imcyborgbutthatsok && that_present_imcyborgbutthatsok))
+ return false;
+ if (!this.imcyborgbutthatsok.equals(that.imcyborgbutthatsok))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_frootloops = true && (isSetFrootloops());
+ list.add(present_frootloops);
+ if (present_frootloops)
+ list.add(frootloops);
+
+ boolean present_imcyborgbutthatsok = true && (isSetImcyborgbutthatsok());
+ list.add(present_imcyborgbutthatsok);
+ if (present_imcyborgbutthatsok)
+ list.add(imcyborgbutthatsok);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(setUploadOptions_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFrootloops()).compareTo(other.isSetFrootloops());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFrootloops()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.frootloops, other.frootloops);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImcyborgbutthatsok()).compareTo(other.isSetImcyborgbutthatsok());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImcyborgbutthatsok()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imcyborgbutthatsok, other.imcyborgbutthatsok);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ 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("setUploadOptions_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("frootloops:");
+ if (this.frootloops == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.frootloops);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imcyborgbutthatsok:");
+ if (this.imcyborgbutthatsok == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imcyborgbutthatsok);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class setUploadOptions_resultStandardSchemeFactory implements SchemeFactory {
+ public setUploadOptions_resultStandardScheme getScheme() {
+ return new setUploadOptions_resultStandardScheme();
+ }
+ }
+
+ private static class setUploadOptions_resultStandardScheme extends StandardScheme<setUploadOptions_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new UploadOptions();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FROOTLOOPS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.frootloops = new TAuthorizationException();
+ struct.frootloops.read(iprot);
+ struct.setFrootloopsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // IMCYBORGBUTTHATSOK
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.imcyborgbutthatsok = new TInvalidTokenException();
+ struct.imcyborgbutthatsok.read(iprot);
+ struct.setImcyborgbutthatsokIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, setUploadOptions_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ struct.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.frootloops != null) {
+ oprot.writeFieldBegin(FROOTLOOPS_FIELD_DESC);
+ struct.frootloops.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imcyborgbutthatsok != null) {
+ oprot.writeFieldBegin(IMCYBORGBUTTHATSOK_FIELD_DESC);
+ struct.imcyborgbutthatsok.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class setUploadOptions_resultTupleSchemeFactory implements SchemeFactory {
+ public setUploadOptions_resultTupleScheme getScheme() {
+ return new setUploadOptions_resultTupleScheme();
+ }
+ }
+
+ private static class setUploadOptions_resultTupleScheme extends TupleScheme<setUploadOptions_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFrootloops()) {
+ optionals.set(1);
+ }
+ if (struct.isSetImcyborgbutthatsok()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetFrootloops()) {
+ struct.frootloops.write(oprot);
+ }
+ if (struct.isSetImcyborgbutthatsok()) {
+ struct.imcyborgbutthatsok.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = new UploadOptions();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.frootloops = new TAuthorizationException();
+ struct.frootloops.read(iprot);
+ struct.setFrootloopsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.imcyborgbutthatsok = new TInvalidTokenException();
+ struct.imcyborgbutthatsok.read(iprot);
+ struct.setImcyborgbutthatsokIsSet(true);
+ }
+ }
+ }
+
+ }
+
public static class cancelUpload_args implements org.apache.thrift.TBase<cancelUpload_args, cancelUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelUpload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelUpload_args");