summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-04-26 15:36:44 +0200
committerSimon Rettberg2016-04-26 15:36:44 +0200
commit7e6ae485d3e797d6c793e3a9aa6c11f6373216aa (patch)
tree9e2f53c5ad71be39f0702037db05a5462ecdd53a
parentTruncate files if they are resumed and bigger than expected (diff)
downloadmaster-sync-shared-7e6ae485d3e797d6c793e3a9aa6c11f6373216aa.tar.gz
master-sync-shared-7e6ae485d3e797d6c793e3a9aa6c11f6373216aa.tar.xz
master-sync-shared-7e6ae485d3e797d6c793e3a9aa6c11f6373216aa.zip
Rework master.getPublicImages to use ImageSummaryRead, add master.getImageDetails
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java2704
-rw-r--r--src/main/thrift/bwlp.thrift10
2 files changed, 2683 insertions, 31 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
index d086ddb..8b68c04 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.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 = "2016-04-18")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-26")
public class MasterServer {
public interface Iface {
@@ -49,7 +49,11 @@ public class MasterServer {
public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public List<ImagePublishData> getPublicImages(String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public List<ImageSummaryRead> getPublicImages(String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+
+ public ImageDetailsRead getImageDetails(String sessionId, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+
+ public UserInfo getUser(String userToken, String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
public void invalidateSession(String sessionId) throws TInvalidTokenException, org.apache.thrift.TException;
@@ -99,6 +103,10 @@ public class MasterServer {
public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageDetails(String sessionId, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUser(String userToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
public void invalidateSession(String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -287,7 +295,7 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findUser failed: unknown result");
}
- public List<ImagePublishData> getPublicImages(String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public List<ImageSummaryRead> getPublicImages(String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_getPublicImages(sessionId, page);
return recv_getPublicImages();
@@ -301,7 +309,7 @@ public class MasterServer {
sendBase("getPublicImages", args);
}
- public List<ImagePublishData> recv_getPublicImages() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public List<ImageSummaryRead> recv_getPublicImages() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
getPublicImages_result result = new getPublicImages_result();
receiveBase(result, "getPublicImages");
@@ -317,6 +325,72 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPublicImages failed: unknown result");
}
+ public ImageDetailsRead getImageDetails(String sessionId, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ {
+ send_getImageDetails(sessionId, imageBaseId);
+ return recv_getImageDetails();
+ }
+
+ public void send_getImageDetails(String sessionId, String imageBaseId) throws org.apache.thrift.TException
+ {
+ getImageDetails_args args = new getImageDetails_args();
+ args.setSessionId(sessionId);
+ args.setImageBaseId(imageBaseId);
+ sendBase("getImageDetails", args);
+ }
+
+ public ImageDetailsRead recv_getImageDetails() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ {
+ getImageDetails_result result = new getImageDetails_result();
+ receiveBase(result, "getImageDetails");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ if (result.serverError != null) {
+ throw result.serverError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result");
+ }
+
+ public UserInfo getUser(String userToken, String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ {
+ send_getUser(userToken, userId);
+ return recv_getUser();
+ }
+
+ public void send_getUser(String userToken, String userId) throws org.apache.thrift.TException
+ {
+ getUser_args args = new getUser_args();
+ args.setUserToken(userToken);
+ args.setUserId(userId);
+ sendBase("getUser", args);
+ }
+
+ public UserInfo recv_getUser() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ {
+ getUser_result result = new getUser_result();
+ receiveBase(result, "getUser");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ if (result.serverError != null) {
+ throw result.serverError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
+ }
+
public void invalidateSession(String sessionId) throws TInvalidTokenException, org.apache.thrift.TException
{
send_invalidateSession(sessionId);
@@ -978,7 +1052,7 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<ImagePublishData> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ public List<ImageSummaryRead> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
@@ -988,6 +1062,76 @@ public class MasterServer {
}
}
+ public void getImageDetails(String sessionId, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getImageDetails_call method_call = new getImageDetails_call(sessionId, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String sessionId;
+ private String imageBaseId;
+ public getImageDetails_call(String sessionId, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.sessionId = sessionId;
+ this.imageBaseId = imageBaseId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getImageDetails_args args = new getImageDetails_args();
+ args.setSessionId(sessionId);
+ args.setImageBaseId(imageBaseId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ImageDetailsRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, 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_getImageDetails();
+ }
+ }
+
+ public void getUser(String userToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUser_call method_call = new getUser_call(userToken, userId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String userId;
+ public getUser_call(String userToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.userId = userId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUser_args args = new getUser_args();
+ args.setUserToken(userToken);
+ args.setUserId(userId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public UserInfo getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, 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_getUser();
+ }
+ }
+
public void invalidateSession(String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
invalidateSession_call method_call = new invalidateSession_call(sessionId, resultHandler, this, ___protocolFactory, ___transport);
@@ -1546,6 +1690,8 @@ public class MasterServer {
processMap.put("setUsedSatellite", new setUsedSatellite());
processMap.put("findUser", new findUser());
processMap.put("getPublicImages", new getPublicImages());
+ processMap.put("getImageDetails", new getImageDetails());
+ processMap.put("getUser", new getUser());
processMap.put("invalidateSession", new invalidateSession());
processMap.put("getUserFromToken", new getUserFromToken());
processMap.put("isServerAuthenticated", new isServerAuthenticated());
@@ -1710,6 +1856,62 @@ public class MasterServer {
}
}
+ public static class getImageDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageDetails_args> {
+ public getImageDetails() {
+ super("getImageDetails");
+ }
+
+ public getImageDetails_args getEmptyArgsInstance() {
+ return new getImageDetails_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getImageDetails_result getResult(I iface, getImageDetails_args args) throws org.apache.thrift.TException {
+ getImageDetails_result result = new getImageDetails_result();
+ try {
+ result.success = iface.getImageDetails(args.sessionId, args.imageBaseId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ } catch (TInvocationException serverError) {
+ result.serverError = serverError;
+ }
+ return result;
+ }
+ }
+
+ public static class getUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUser_args> {
+ public getUser() {
+ super("getUser");
+ }
+
+ public getUser_args getEmptyArgsInstance() {
+ return new getUser_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getUser_result getResult(I iface, getUser_args args) throws org.apache.thrift.TException {
+ getUser_result result = new getUser_result();
+ try {
+ result.success = iface.getUser(args.userToken, args.userId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ } catch (TInvocationException serverError) {
+ result.serverError = serverError;
+ }
+ return result;
+ }
+ }
+
public static class invalidateSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, invalidateSession_args> {
public invalidateSession() {
super("invalidateSession");
@@ -2130,6 +2332,8 @@ public class MasterServer {
processMap.put("setUsedSatellite", new setUsedSatellite());
processMap.put("findUser", new findUser());
processMap.put("getPublicImages", new getPublicImages());
+ processMap.put("getImageDetails", new getImageDetails());
+ processMap.put("getUser", new getUser());
processMap.put("invalidateSession", new invalidateSession());
processMap.put("getUserFromToken", new getUserFromToken());
processMap.put("isServerAuthenticated", new isServerAuthenticated());
@@ -2437,7 +2641,7 @@ public class MasterServer {
}
}
- public static class getPublicImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPublicImages_args, List<ImagePublishData>> {
+ public static class getPublicImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPublicImages_args, List<ImageSummaryRead>> {
public getPublicImages() {
super("getPublicImages");
}
@@ -2446,10 +2650,10 @@ public class MasterServer {
return new getPublicImages_args();
}
- public AsyncMethodCallback<List<ImagePublishData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public AsyncMethodCallback<List<ImageSummaryRead>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<ImagePublishData>>() {
- public void onComplete(List<ImagePublishData> o) {
+ return new AsyncMethodCallback<List<ImageSummaryRead>>() {
+ public void onComplete(List<ImageSummaryRead> o) {
getPublicImages_result result = new getPublicImages_result();
result.success = o;
try {
@@ -2494,11 +2698,145 @@ public class MasterServer {
return false;
}
- public void start(I iface, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImagePublishData>> resultHandler) throws TException {
+ public void start(I iface, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageSummaryRead>> resultHandler) throws TException {
iface.getPublicImages(args.sessionId, args.page,resultHandler);
}
}
+ public static class getImageDetails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageDetails_args, ImageDetailsRead> {
+ public getImageDetails() {
+ super("getImageDetails");
+ }
+
+ public getImageDetails_args getEmptyArgsInstance() {
+ return new getImageDetails_args();
+ }
+
+ public AsyncMethodCallback<ImageDetailsRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<ImageDetailsRead>() {
+ public void onComplete(ImageDetailsRead o) {
+ getImageDetails_result result = new getImageDetails_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ 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;
+ getImageDetails_result result = new getImageDetails_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ 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, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws TException {
+ iface.getImageDetails(args.sessionId, args.imageBaseId,resultHandler);
+ }
+ }
+
+ public static class getUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUser_args, UserInfo> {
+ public getUser() {
+ super("getUser");
+ }
+
+ public getUser_args getEmptyArgsInstance() {
+ return new getUser_args();
+ }
+
+ public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<UserInfo>() {
+ public void onComplete(UserInfo o) {
+ getUser_result result = new getUser_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;
+ getUser_result result = new getUser_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ 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, getUser_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException {
+ iface.getUser(args.userToken, args.userId,resultHandler);
+ }
+ }
+
public static class invalidateSession<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, invalidateSession_args, Void> {
public invalidateSession() {
super("invalidateSession");
@@ -8546,7 +8884,7 @@ public class MasterServer {
schemes.put(TupleScheme.class, new getPublicImages_resultTupleSchemeFactory());
}
- public List<ImagePublishData> success; // required
+ public List<ImageSummaryRead> success; // required
public TAuthorizationException failure; // required
public TInvocationException error; // required
@@ -8620,7 +8958,7 @@ public class MasterServer {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePublishData.class))));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageSummaryRead.class))));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -8633,7 +8971,7 @@ public class MasterServer {
}
public getPublicImages_result(
- List<ImagePublishData> success,
+ List<ImageSummaryRead> success,
TAuthorizationException failure,
TInvocationException error)
{
@@ -8648,9 +8986,9 @@ public class MasterServer {
*/
public getPublicImages_result(getPublicImages_result other) {
if (other.isSetSuccess()) {
- List<ImagePublishData> __this__success = new ArrayList<ImagePublishData>(other.success.size());
- for (ImagePublishData other_element : other.success) {
- __this__success.add(new ImagePublishData(other_element));
+ List<ImageSummaryRead> __this__success = new ArrayList<ImageSummaryRead>(other.success.size());
+ for (ImageSummaryRead other_element : other.success) {
+ __this__success.add(new ImageSummaryRead(other_element));
}
this.success = __this__success;
}
@@ -8677,22 +9015,22 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
- public java.util.Iterator<ImagePublishData> getSuccessIterator() {
+ public java.util.Iterator<ImageSummaryRead> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
- public void addToSuccess(ImagePublishData elem) {
+ public void addToSuccess(ImageSummaryRead elem) {
if (this.success == null) {
- this.success = new ArrayList<ImagePublishData>();
+ this.success = new ArrayList<ImageSummaryRead>();
}
this.success.add(elem);
}
- public List<ImagePublishData> getSuccess() {
+ public List<ImageSummaryRead> getSuccess() {
return this.success;
}
- public getPublicImages_result setSuccess(List<ImagePublishData> success) {
+ public getPublicImages_result setSuccess(List<ImageSummaryRead> success) {
this.success = success;
return this;
}
@@ -8766,7 +9104,7 @@ public class MasterServer {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<ImagePublishData>)value);
+ setSuccess((List<ImageSummaryRead>)value);
}
break;
@@ -9014,11 +9352,11 @@ public class MasterServer {
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list298 = iprot.readListBegin();
- struct.success = new ArrayList<ImagePublishData>(_list298.size);
- ImagePublishData _elem299;
+ struct.success = new ArrayList<ImageSummaryRead>(_list298.size);
+ ImageSummaryRead _elem299;
for (int _i300 = 0; _i300 < _list298.size; ++_i300)
{
- _elem299 = new ImagePublishData();
+ _elem299 = new ImageSummaryRead();
_elem299.read(iprot);
struct.success.add(_elem299);
}
@@ -9066,7 +9404,7 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (ImagePublishData _iter301 : struct.success)
+ for (ImageSummaryRead _iter301 : struct.success)
{
_iter301.write(oprot);
}
@@ -9115,7 +9453,7 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (ImagePublishData _iter302 : struct.success)
+ for (ImageSummaryRead _iter302 : struct.success)
{
_iter302.write(oprot);
}
@@ -9136,11 +9474,11 @@ public class MasterServer {
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list303 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<ImagePublishData>(_list303.size);
- ImagePublishData _elem304;
+ struct.success = new ArrayList<ImageSummaryRead>(_list303.size);
+ ImageSummaryRead _elem304;
for (int _i305 = 0; _i305 < _list303.size; ++_i305)
{
- _elem304 = new ImagePublishData();
+ _elem304 = new ImageSummaryRead();
_elem304.read(iprot);
struct.success.add(_elem304);
}
@@ -9162,6 +9500,2312 @@ public class MasterServer {
}
+ public static class getImageDetails_args implements org.apache.thrift.TBase<getImageDetails_args, getImageDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_args");
+
+ private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageDetails_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageDetails_argsTupleSchemeFactory());
+ }
+
+ public String sessionId; // required
+ public String imageBaseId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SESSION_ID((short)1, "sessionId"),
+ IMAGE_BASE_ID((short)2, "imageBaseId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SESSION_ID
+ return SESSION_ID;
+ case 2: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_args.class, metaDataMap);
+ }
+
+ public getImageDetails_args() {
+ }
+
+ public getImageDetails_args(
+ String sessionId,
+ String imageBaseId)
+ {
+ this();
+ this.sessionId = sessionId;
+ this.imageBaseId = imageBaseId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageDetails_args(getImageDetails_args other) {
+ if (other.isSetSessionId()) {
+ this.sessionId = other.sessionId;
+ }
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ }
+
+ public getImageDetails_args deepCopy() {
+ return new getImageDetails_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.sessionId = null;
+ this.imageBaseId = null;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public getImageDetails_args setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ public void unsetSessionId() {
+ this.sessionId = null;
+ }
+
+ /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetSessionId() {
+ return this.sessionId != null;
+ }
+
+ public void setSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.sessionId = null;
+ }
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public getImageDetails_args setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SESSION_ID:
+ if (value == null) {
+ unsetSessionId();
+ } else {
+ setSessionId((String)value);
+ }
+ break;
+
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SESSION_ID:
+ return getSessionId();
+
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SESSION_ID:
+ return isSetSessionId();
+ case IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImageDetails_args)
+ return this.equals((getImageDetails_args)that);
+ return false;
+ }
+
+ public boolean equals(getImageDetails_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_sessionId = true && this.isSetSessionId();
+ boolean that_present_sessionId = true && that.isSetSessionId();
+ if (this_present_sessionId || that_present_sessionId) {
+ if (!(this_present_sessionId && that_present_sessionId))
+ return false;
+ if (!this.sessionId.equals(that.sessionId))
+ return false;
+ }
+
+ boolean this_present_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_sessionId = true && (isSetSessionId());
+ list.add(present_sessionId);
+ if (present_sessionId)
+ list.add(sessionId);
+
+ boolean present_imageBaseId = true && (isSetImageBaseId());
+ list.add(present_imageBaseId);
+ if (present_imageBaseId)
+ list.add(imageBaseId);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getImageDetails_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ 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("getImageDetails_args(");
+ boolean first = true;
+
+ sb.append("sessionId:");
+ if (this.sessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getImageDetails_argsStandardSchemeFactory implements SchemeFactory {
+ public getImageDetails_argsStandardScheme getScheme() {
+ return new getImageDetails_argsStandardScheme();
+ }
+ }
+
+ private static class getImageDetails_argsStandardScheme extends StandardScheme<getImageDetails_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sessionId != null) {
+ oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.sessionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageDetails_argsTupleSchemeFactory implements SchemeFactory {
+ public getImageDetails_argsTupleScheme getScheme() {
+ return new getImageDetails_argsTupleScheme();
+ }
+ }
+
+ private static class getImageDetails_argsTupleScheme extends TupleScheme<getImageDetails_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageBaseId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSessionId()) {
+ oprot.writeString(struct.sessionId);
+ }
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImageDetails_result implements org.apache.thrift.TBase<getImageDetails_result, getImageDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageDetails_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageDetails_resultTupleSchemeFactory());
+ }
+
+ public ImageDetailsRead success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // required
+ public TInvocationException serverError; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ AUTH_ERROR((short)1, "authError"),
+ NOT_FOUND((short)2, "notFound"),
+ SERVER_ERROR((short)3, "serverError");
+
+ private static final 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: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ case 3: // SERVER_ERROR
+ return SERVER_ERROR;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new 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, ImageDetailsRead.class)));
+ tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", 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(getImageDetails_result.class, metaDataMap);
+ }
+
+ public getImageDetails_result() {
+ }
+
+ public getImageDetails_result(
+ ImageDetailsRead success,
+ TAuthorizationException authError,
+ TNotFoundException notFound,
+ TInvocationException serverError)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ this.notFound = notFound;
+ this.serverError = serverError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageDetails_result(getImageDetails_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new ImageDetailsRead(other.success);
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ if (other.isSetServerError()) {
+ this.serverError = new TInvocationException(other.serverError);
+ }
+ }
+
+ public getImageDetails_result deepCopy() {
+ return new getImageDetails_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ this.notFound = null;
+ this.serverError = null;
+ }
+
+ public ImageDetailsRead getSuccess() {
+ return this.success;
+ }
+
+ public getImageDetails_result setSuccess(ImageDetailsRead success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public getImageDetails_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public getImageDetails_result setNotFound(TNotFoundException notFound) {
+ this.notFound = notFound;
+ return this;
+ }
+
+ public void unsetNotFound() {
+ this.notFound = null;
+ }
+
+ /** Returns true if field notFound is set (has been assigned a value) and false otherwise */
+ public boolean isSetNotFound() {
+ return this.notFound != null;
+ }
+
+ public void setNotFoundIsSet(boolean value) {
+ if (!value) {
+ this.notFound = null;
+ }
+ }
+
+ public TInvocationException getServerError() {
+ return this.serverError;
+ }
+
+ public getImageDetails_result setServerError(TInvocationException serverError) {
+ this.serverError = serverError;
+ return this;
+ }
+
+ public void unsetServerError() {
+ this.serverError = null;
+ }
+
+ /** Returns true if field serverError is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerError() {
+ return this.serverError != null;
+ }
+
+ public void setServerErrorIsSet(boolean value) {
+ if (!value) {
+ this.serverError = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ImageDetailsRead)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ case SERVER_ERROR:
+ if (value == null) {
+ unsetServerError();
+ } else {
+ setServerError((TInvocationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ case SERVER_ERROR:
+ return getServerError();
+
+ }
+ throw new 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 AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ case SERVER_ERROR:
+ return isSetServerError();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImageDetails_result)
+ return this.equals((getImageDetails_result)that);
+ return false;
+ }
+
+ public boolean equals(getImageDetails_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_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ boolean this_present_serverError = true && this.isSetServerError();
+ boolean that_present_serverError = true && that.isSetServerError();
+ if (this_present_serverError || that_present_serverError) {
+ if (!(this_present_serverError && that_present_serverError))
+ return false;
+ if (!this.serverError.equals(that.serverError))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_authError = true && (isSetAuthError());
+ list.add(present_authError);
+ if (present_authError)
+ list.add(authError);
+
+ boolean present_notFound = true && (isSetNotFound());
+ list.add(present_notFound);
+ if (present_notFound)
+ list.add(notFound);
+
+ boolean present_serverError = true && (isSetServerError());
+ list.add(present_serverError);
+ if (present_serverError)
+ list.add(serverError);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getImageDetails_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(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ 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("getImageDetails_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("serverError:");
+ if (this.serverError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverError);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getImageDetails_resultStandardSchemeFactory implements SchemeFactory {
+ public getImageDetails_resultStandardScheme getScheme() {
+ return new getImageDetails_resultStandardScheme();
+ }
+ }
+
+ private static class getImageDetails_resultStandardScheme extends StandardScheme<getImageDetails_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new ImageDetailsRead();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SERVER_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.serverError = new TInvocationException();
+ struct.serverError.read(iprot);
+ struct.setServerErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ struct.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.notFound != null) {
+ oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
+ struct.notFound.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.serverError != null) {
+ oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
+ struct.serverError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageDetails_resultTupleSchemeFactory implements SchemeFactory {
+ public getImageDetails_resultTupleScheme getScheme() {
+ return new getImageDetails_resultTupleScheme();
+ }
+ }
+
+ private static class getImageDetails_resultTupleScheme extends TupleScheme<getImageDetails_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ if (struct.isSetServerError()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ if (struct.isSetServerError()) {
+ struct.serverError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.success = new ImageDetailsRead();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.serverError = new TInvocationException();
+ struct.serverError.read(iprot);
+ struct.setServerErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getUser_args implements org.apache.thrift.TBase<getUser_args, getUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_args");
+
+ private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getUser_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getUser_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String userId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_TOKEN((short)1, "userToken"),
+ USER_ID((short)2, "userId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // USER_ID
+ return USER_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new 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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUser_args.class, metaDataMap);
+ }
+
+ public getUser_args() {
+ }
+
+ public getUser_args(
+ String userToken,
+ String userId)
+ {
+ this();
+ this.userToken = userToken;
+ this.userId = userId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getUser_args(getUser_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetUserId()) {
+ this.userId = other.userId;
+ }
+ }
+
+ public getUser_args deepCopy() {
+ return new getUser_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.userId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public getUser_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 getUserId() {
+ return this.userId;
+ }
+
+ public getUser_args setUserId(String userId) {
+ this.userId = userId;
+ return this;
+ }
+
+ public void unsetUserId() {
+ this.userId = null;
+ }
+
+ /** Returns true if field userId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserId() {
+ return this.userId != null;
+ }
+
+ public void setUserIdIsSet(boolean value) {
+ if (!value) {
+ this.userId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case USER_ID:
+ if (value == null) {
+ unsetUserId();
+ } else {
+ setUserId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case USER_ID:
+ return getUserId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case USER_TOKEN:
+ return isSetUserToken();
+ case USER_ID:
+ return isSetUserId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getUser_args)
+ return this.equals((getUser_args)that);
+ return false;
+ }
+
+ public boolean equals(getUser_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_userId = true && this.isSetUserId();
+ boolean that_present_userId = true && that.isSetUserId();
+ if (this_present_userId || that_present_userId) {
+ if (!(this_present_userId && that_present_userId))
+ return false;
+ if (!this.userId.equals(that.userId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_userToken = true && (isSetUserToken());
+ list.add(present_userToken);
+ if (present_userToken)
+ list.add(userToken);
+
+ boolean present_userId = true && (isSetUserId());
+ list.add(present_userId);
+ if (present_userId)
+ list.add(userId);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getUser_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(isSetUserId()).compareTo(other.isSetUserId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getUser_args(");
+ boolean first = true;
+
+ sb.append("userToken:");
+ if (this.userToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userToken);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("userId:");
+ if (this.userId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getUser_argsStandardSchemeFactory implements SchemeFactory {
+ public getUser_argsStandardScheme getScheme() {
+ return new getUser_argsStandardScheme();
+ }
+ }
+
+ private static class getUser_argsStandardScheme extends StandardScheme<getUser_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // USER_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // USER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userId != null) {
+ oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+ oprot.writeString(struct.userId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getUser_argsTupleSchemeFactory implements SchemeFactory {
+ public getUser_argsTupleScheme getScheme() {
+ return new getUser_argsTupleScheme();
+ }
+ }
+
+ private static class getUser_argsTupleScheme extends TupleScheme<getUser_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getUser_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetUserId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetUserId()) {
+ oprot.writeString(struct.userId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getUser_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getUser_result implements org.apache.thrift.TBase<getUser_result, getUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getUser_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getUser_resultTupleSchemeFactory());
+ }
+
+ public UserInfo success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // required
+ public TInvocationException serverError; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ AUTH_ERROR((short)1, "authError"),
+ NOT_FOUND((short)2, "notFound"),
+ SERVER_ERROR((short)3, "serverError");
+
+ private static final 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: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ case 3: // SERVER_ERROR
+ return SERVER_ERROR;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
+ tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", 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(getUser_result.class, metaDataMap);
+ }
+
+ public getUser_result() {
+ }
+
+ public getUser_result(
+ UserInfo success,
+ TAuthorizationException authError,
+ TNotFoundException notFound,
+ TInvocationException serverError)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ this.notFound = notFound;
+ this.serverError = serverError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getUser_result(getUser_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new UserInfo(other.success);
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ if (other.isSetServerError()) {
+ this.serverError = new TInvocationException(other.serverError);
+ }
+ }
+
+ public getUser_result deepCopy() {
+ return new getUser_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ this.notFound = null;
+ this.serverError = null;
+ }
+
+ public UserInfo getSuccess() {
+ return this.success;
+ }
+
+ public getUser_result setSuccess(UserInfo success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public getUser_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public getUser_result setNotFound(TNotFoundException notFound) {
+ this.notFound = notFound;
+ return this;
+ }
+
+ public void unsetNotFound() {
+ this.notFound = null;
+ }
+
+ /** Returns true if field notFound is set (has been assigned a value) and false otherwise */
+ public boolean isSetNotFound() {
+ return this.notFound != null;
+ }
+
+ public void setNotFoundIsSet(boolean value) {
+ if (!value) {
+ this.notFound = null;
+ }
+ }
+
+ public TInvocationException getServerError() {
+ return this.serverError;
+ }
+
+ public getUser_result setServerError(TInvocationException serverError) {
+ this.serverError = serverError;
+ return this;
+ }
+
+ public void unsetServerError() {
+ this.serverError = null;
+ }
+
+ /** Returns true if field serverError is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerError() {
+ return this.serverError != null;
+ }
+
+ public void setServerErrorIsSet(boolean value) {
+ if (!value) {
+ this.serverError = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((UserInfo)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ case SERVER_ERROR:
+ if (value == null) {
+ unsetServerError();
+ } else {
+ setServerError((TInvocationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ case SERVER_ERROR:
+ return getServerError();
+
+ }
+ throw new 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 AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ case SERVER_ERROR:
+ return isSetServerError();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getUser_result)
+ return this.equals((getUser_result)that);
+ return false;
+ }
+
+ public boolean equals(getUser_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_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ boolean this_present_serverError = true && this.isSetServerError();
+ boolean that_present_serverError = true && that.isSetServerError();
+ if (this_present_serverError || that_present_serverError) {
+ if (!(this_present_serverError && that_present_serverError))
+ return false;
+ if (!this.serverError.equals(that.serverError))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_success = true && (isSetSuccess());
+ list.add(present_success);
+ if (present_success)
+ list.add(success);
+
+ boolean present_authError = true && (isSetAuthError());
+ list.add(present_authError);
+ if (present_authError)
+ list.add(authError);
+
+ boolean present_notFound = true && (isSetNotFound());
+ list.add(present_notFound);
+ if (present_notFound)
+ list.add(notFound);
+
+ boolean present_serverError = true && (isSetServerError());
+ list.add(present_serverError);
+ if (present_serverError)
+ list.add(serverError);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(getUser_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(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ 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("getUser_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("serverError:");
+ if (this.serverError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverError);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getUser_resultStandardSchemeFactory implements SchemeFactory {
+ public getUser_resultStandardScheme getScheme() {
+ return new getUser_resultStandardScheme();
+ }
+ }
+
+ private static class getUser_resultStandardScheme extends StandardScheme<getUser_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new UserInfo();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SERVER_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.serverError = new TInvocationException();
+ struct.serverError.read(iprot);
+ struct.setServerErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ struct.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.notFound != null) {
+ oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
+ struct.notFound.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.serverError != null) {
+ oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
+ struct.serverError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getUser_resultTupleSchemeFactory implements SchemeFactory {
+ public getUser_resultTupleScheme getScheme() {
+ return new getUser_resultTupleScheme();
+ }
+ }
+
+ private static class getUser_resultTupleScheme extends TupleScheme<getUser_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getUser_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ if (struct.isSetServerError()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ if (struct.isSetServerError()) {
+ struct.serverError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getUser_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.success = new UserInfo();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.serverError = new TInvocationException();
+ struct.serverError.read(iprot);
+ struct.setServerErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
public static class invalidateSession_args implements org.apache.thrift.TBase<invalidateSession_args, invalidateSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<invalidateSession_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_args");
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
index 1389008..4985da0 100644
--- a/src/main/thrift/bwlp.thrift
+++ b/src/main/thrift/bwlp.thrift
@@ -598,9 +598,17 @@ service MasterServer {
throws (1:TAuthorizationException failure, 2:TInvocationException error),
// Get list of publicly available images
- list<ImagePublishData> getPublicImages(1:Token sessionId, 2:i32 page)
+ list<ImageSummaryRead> getPublicImages(1:Token sessionId, 2:i32 page)
throws (1:TAuthorizationException failure, 2:TInvocationException error),
+ // Query detailed information about an image
+ ImageDetailsRead getImageDetails(1: Token sessionId, 2: UUID imageBaseId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInvocationException serverError),
+
+ // Get user by id
+ UserInfo getUser(1: Token userToken, 2: UUID userId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInvocationException serverError),
+
// Logout
void invalidateSession(1: Token sessionId)
throws (1:TInvalidTokenException ex),