diff options
Diffstat (limited to 'dozentenmodulserver/src/main/java/server/generated/Server.java')
| -rw-r--r-- | dozentenmodulserver/src/main/java/server/generated/Server.java | 2236 |
1 files changed, 2236 insertions, 0 deletions
diff --git a/dozentenmodulserver/src/main/java/server/generated/Server.java b/dozentenmodulserver/src/main/java/server/generated/Server.java index 0a7d99c5..65bd34e3 100644 --- a/dozentenmodulserver/src/main/java/server/generated/Server.java +++ b/dozentenmodulserver/src/main/java/server/generated/Server.java @@ -82,6 +82,10 @@ public class Server { public boolean writeLectureRights(String lecturename, String username, String lastName, String firstName, String mail, String university, String role) throws org.apache.thrift.TException; + public List<Person> getAllOtherSatelliteUsers(String userID) throws org.apache.thrift.TException; + + public boolean writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin) throws org.apache.thrift.TException; + } public interface AsyncIface { @@ -132,6 +136,10 @@ public class Server { public void writeLectureRights(String lecturename, String username, String lastName, String firstName, String mail, String university, String role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getAllOtherSatelliteUsers(String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -761,6 +769,57 @@ public class Server { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeLectureRights failed: unknown result"); } + public List<Person> getAllOtherSatelliteUsers(String userID) throws org.apache.thrift.TException + { + send_getAllOtherSatelliteUsers(userID); + return recv_getAllOtherSatelliteUsers(); + } + + public void send_getAllOtherSatelliteUsers(String userID) throws org.apache.thrift.TException + { + getAllOtherSatelliteUsers_args args = new getAllOtherSatelliteUsers_args(); + args.setUserID(userID); + sendBase("getAllOtherSatelliteUsers", args); + } + + public List<Person> recv_getAllOtherSatelliteUsers() throws org.apache.thrift.TException + { + getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_result(); + receiveBase(result, "getAllOtherSatelliteUsers"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOtherSatelliteUsers failed: unknown result"); + } + + public boolean writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin) throws org.apache.thrift.TException + { + send_writeAdditionalImageRights(imageName, userID, isRead, isWrite, isLinkAllowed, isAdmin); + return recv_writeAdditionalImageRights(); + } + + public void send_writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin) throws org.apache.thrift.TException + { + writeAdditionalImageRights_args args = new writeAdditionalImageRights_args(); + args.setImageName(imageName); + args.setUserID(userID); + args.setIsRead(isRead); + args.setIsWrite(isWrite); + args.setIsLinkAllowed(isLinkAllowed); + args.setIsAdmin(isAdmin); + sendBase("writeAdditionalImageRights", args); + } + + public boolean recv_writeAdditionalImageRights() throws org.apache.thrift.TException + { + writeAdditionalImageRights_result result = new writeAdditionalImageRights_result(); + receiveBase(result, "writeAdditionalImageRights"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeAdditionalImageRights failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { @@ -1749,6 +1808,85 @@ public class Server { } } + public void getAllOtherSatelliteUsers(String userID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getAllOtherSatelliteUsers_call method_call = new getAllOtherSatelliteUsers_call(userID, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getAllOtherSatelliteUsers_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userID; + public getAllOtherSatelliteUsers_call(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.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("getAllOtherSatelliteUsers", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllOtherSatelliteUsers_args args = new getAllOtherSatelliteUsers_args(); + args.setUserID(userID); + args.write(prot); + prot.writeMessageEnd(); + } + + public List<Person> getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getAllOtherSatelliteUsers(); + } + } + + public void writeAdditionalImageRights(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + writeAdditionalImageRights_call method_call = new writeAdditionalImageRights_call(imageName, userID, isRead, isWrite, isLinkAllowed, isAdmin, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class writeAdditionalImageRights_call extends org.apache.thrift.async.TAsyncMethodCall { + private String imageName; + private String userID; + private boolean isRead; + private boolean isWrite; + private boolean isLinkAllowed; + private boolean isAdmin; + public writeAdditionalImageRights_call(String imageName, String userID, boolean isRead, boolean isWrite, boolean isLinkAllowed, boolean isAdmin, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.imageName = imageName; + this.userID = userID; + this.isRead = isRead; + this.isWrite = isWrite; + this.isLinkAllowed = isLinkAllowed; + this.isAdmin = isAdmin; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeAdditionalImageRights", org.apache.thrift.protocol.TMessageType.CALL, 0)); + writeAdditionalImageRights_args args = new writeAdditionalImageRights_args(); + args.setImageName(imageName); + args.setUserID(userID); + args.setIsRead(isRead); + args.setIsWrite(isWrite); + args.setIsLinkAllowed(isLinkAllowed); + args.setIsAdmin(isAdmin); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_writeAdditionalImageRights(); + } + } + } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { @@ -1785,6 +1923,8 @@ public class Server { processMap.put("createUser", new createUser()); processMap.put("writeImageRights", new writeImageRights()); processMap.put("writeLectureRights", new writeLectureRights()); + processMap.put("getAllOtherSatelliteUsers", new getAllOtherSatelliteUsers()); + processMap.put("writeAdditionalImageRights", new writeAdditionalImageRights()); return processMap; } @@ -2262,6 +2402,47 @@ public class Server { } } + public static class getAllOtherSatelliteUsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllOtherSatelliteUsers_args> { + public getAllOtherSatelliteUsers() { + super("getAllOtherSatelliteUsers"); + } + + public getAllOtherSatelliteUsers_args getEmptyArgsInstance() { + return new getAllOtherSatelliteUsers_args(); + } + + protected boolean isOneway() { + return false; + } + + public getAllOtherSatelliteUsers_result getResult(I iface, getAllOtherSatelliteUsers_args args) throws org.apache.thrift.TException { + getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_result(); + result.success = iface.getAllOtherSatelliteUsers(args.userID); + return result; + } + } + + public static class writeAdditionalImageRights<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeAdditionalImageRights_args> { + public writeAdditionalImageRights() { + super("writeAdditionalImageRights"); + } + + public writeAdditionalImageRights_args getEmptyArgsInstance() { + return new writeAdditionalImageRights_args(); + } + + protected boolean isOneway() { + return false; + } + + public writeAdditionalImageRights_result getResult(I iface, writeAdditionalImageRights_args args) throws org.apache.thrift.TException { + writeAdditionalImageRights_result result = new writeAdditionalImageRights_result(); + result.success = iface.writeAdditionalImageRights(args.imageName, args.userID, args.isRead, args.isWrite, args.isLinkAllowed, args.isAdmin); + result.setSuccessIsSet(true); + return result; + } + } + } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { @@ -2298,6 +2479,8 @@ public class Server { processMap.put("createUser", new createUser()); processMap.put("writeImageRights", new writeImageRights()); processMap.put("writeLectureRights", new writeLectureRights()); + processMap.put("getAllOtherSatelliteUsers", new getAllOtherSatelliteUsers()); + processMap.put("writeAdditionalImageRights", new writeAdditionalImageRights()); return processMap; } @@ -3488,6 +3671,109 @@ public class Server { } } + public static class getAllOtherSatelliteUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllOtherSatelliteUsers_args, List<Person>> { + public getAllOtherSatelliteUsers() { + super("getAllOtherSatelliteUsers"); + } + + public getAllOtherSatelliteUsers_args getEmptyArgsInstance() { + return new getAllOtherSatelliteUsers_args(); + } + + public AsyncMethodCallback<List<Person>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<List<Person>>() { + public void onComplete(List<Person> o) { + getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getAllOtherSatelliteUsers_result result = new getAllOtherSatelliteUsers_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getAllOtherSatelliteUsers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Person>> resultHandler) throws TException { + iface.getAllOtherSatelliteUsers(args.userID,resultHandler); + } + } + + public static class writeAdditionalImageRights<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeAdditionalImageRights_args, Boolean> { + public writeAdditionalImageRights() { + super("writeAdditionalImageRights"); + } + + public writeAdditionalImageRights_args getEmptyArgsInstance() { + return new writeAdditionalImageRights_args(); + } + + public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<Boolean>() { + public void onComplete(Boolean o) { + writeAdditionalImageRights_result result = new writeAdditionalImageRights_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + writeAdditionalImageRights_result result = new writeAdditionalImageRights_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, writeAdditionalImageRights_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { + iface.writeAdditionalImageRights(args.imageName, args.userID, args.isRead, args.isWrite, args.isLinkAllowed, args.isAdmin,resultHandler); + } + } + } public static class getFtpUser_args implements org.apache.thrift.TBase<getFtpUser_args, getFtpUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getFtpUser_args> { @@ -27821,4 +28107,1954 @@ public class Server { } + public static class getAllOtherSatelliteUsers_args implements org.apache.thrift.TBase<getAllOtherSatelliteUsers_args, getAllOtherSatelliteUsers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOtherSatelliteUsers_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOtherSatelliteUsers_args"); + + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllOtherSatelliteUsers_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllOtherSatelliteUsers_argsTupleSchemeFactory()); + } + + public 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_ID((short)1, "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_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_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOtherSatelliteUsers_args.class, metaDataMap); + } + + public getAllOtherSatelliteUsers_args() { + } + + public getAllOtherSatelliteUsers_args( + String userID) + { + this(); + this.userID = userID; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getAllOtherSatelliteUsers_args(getAllOtherSatelliteUsers_args other) { + if (other.isSetUserID()) { + this.userID = other.userID; + } + } + + public getAllOtherSatelliteUsers_args deepCopy() { + return new getAllOtherSatelliteUsers_args(this); + } + + @Override + public void clear() { + this.userID = null; + } + + public String getUserID() { + return this.userID; + } + + public getAllOtherSatelliteUsers_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_ID: + if (value == null) { + unsetUserID(); + } else { + setUserID((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + 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_ID: + return isSetUserID(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllOtherSatelliteUsers_args) + return this.equals((getAllOtherSatelliteUsers_args)that); + return false; + } + + public boolean equals(getAllOtherSatelliteUsers_args that) { + if (that == null) + return false; + + boolean this_present_userID = true && this.isSetUserID(); + boolean that_present_userID = true && that.isSetUserID(); + if (this_present_userID || that_present_userID) { + if (!(this_present_userID && that_present_userID)) + return false; + if (!this.userID.equals(that.userID)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getAllOtherSatelliteUsers_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAllOtherSatelliteUsers_args("); + boolean first = true; + + sb.append("userID:"); + if (this.userID == null) { + sb.append("null"); + } else { + sb.append(this.userID); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getAllOtherSatelliteUsers_argsStandardSchemeFactory implements SchemeFactory { + public getAllOtherSatelliteUsers_argsStandardScheme getScheme() { + return new getAllOtherSatelliteUsers_argsStandardScheme(); + } + } + + private static class getAllOtherSatelliteUsers_argsStandardScheme extends StandardScheme<getAllOtherSatelliteUsers_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.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, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userID != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userID); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllOtherSatelliteUsers_argsTupleSchemeFactory implements SchemeFactory { + public getAllOtherSatelliteUsers_argsTupleScheme getScheme() { + return new getAllOtherSatelliteUsers_argsTupleScheme(); + } + } + + private static class getAllOtherSatelliteUsers_argsTupleScheme extends TupleScheme<getAllOtherSatelliteUsers_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserID()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUserID()) { + oprot.writeString(struct.userID); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } + } + } + + } + + public static class getAllOtherSatelliteUsers_result implements org.apache.thrift.TBase<getAllOtherSatelliteUsers_result, getAllOtherSatelliteUsers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOtherSatelliteUsers_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOtherSatelliteUsers_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllOtherSatelliteUsers_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllOtherSatelliteUsers_resultTupleSchemeFactory()); + } + + public List<Person> success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Person.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOtherSatelliteUsers_result.class, metaDataMap); + } + + public getAllOtherSatelliteUsers_result() { + } + + public getAllOtherSatelliteUsers_result( + List<Person> success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getAllOtherSatelliteUsers_result(getAllOtherSatelliteUsers_result other) { + if (other.isSetSuccess()) { + List<Person> __this__success = new ArrayList<Person>(other.success.size()); + for (Person other_element : other.success) { + __this__success.add(new Person(other_element)); + } + this.success = __this__success; + } + } + + public getAllOtherSatelliteUsers_result deepCopy() { + return new getAllOtherSatelliteUsers_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator<Person> getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Person elem) { + if (this.success == null) { + this.success = new ArrayList<Person>(); + } + this.success.add(elem); + } + + public List<Person> getSuccess() { + return this.success; + } + + public getAllOtherSatelliteUsers_result setSuccess(List<Person> success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List<Person>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllOtherSatelliteUsers_result) + return this.equals((getAllOtherSatelliteUsers_result)that); + return false; + } + + public boolean equals(getAllOtherSatelliteUsers_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getAllOtherSatelliteUsers_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAllOtherSatelliteUsers_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getAllOtherSatelliteUsers_resultStandardSchemeFactory implements SchemeFactory { + public getAllOtherSatelliteUsers_resultStandardScheme getScheme() { + return new getAllOtherSatelliteUsers_resultStandardScheme(); + } + } + + private static class getAllOtherSatelliteUsers_resultStandardScheme extends StandardScheme<getAllOtherSatelliteUsers_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list62 = iprot.readListBegin(); + struct.success = new ArrayList<Person>(_list62.size); + for (int _i63 = 0; _i63 < _list62.size; ++_i63) + { + Person _elem64; + _elem64 = new Person(); + _elem64.read(iprot); + struct.success.add(_elem64); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Person _iter65 : struct.success) + { + _iter65.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllOtherSatelliteUsers_resultTupleSchemeFactory implements SchemeFactory { + public getAllOtherSatelliteUsers_resultTupleScheme getScheme() { + return new getAllOtherSatelliteUsers_resultTupleScheme(); + } + } + + private static class getAllOtherSatelliteUsers_resultTupleScheme extends TupleScheme<getAllOtherSatelliteUsers_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Person _iter66 : struct.success) + { + _iter66.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllOtherSatelliteUsers_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Person>(_list67.size); + for (int _i68 = 0; _i68 < _list67.size; ++_i68) + { + Person _elem69; + _elem69 = new Person(); + _elem69.read(iprot); + struct.success.add(_elem69); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class writeAdditionalImageRights_args implements org.apache.thrift.TBase<writeAdditionalImageRights_args, writeAdditionalImageRights_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeAdditionalImageRights_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeAdditionalImageRights_args"); + + private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userID", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField IS_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("isRead", org.apache.thrift.protocol.TType.BOOL, (short)3); + private static final org.apache.thrift.protocol.TField IS_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("isWrite", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final org.apache.thrift.protocol.TField IS_LINK_ALLOWED_FIELD_DESC = new org.apache.thrift.protocol.TField("isLinkAllowed", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField IS_ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("isAdmin", org.apache.thrift.protocol.TType.BOOL, (short)6); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeAdditionalImageRights_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeAdditionalImageRights_argsTupleSchemeFactory()); + } + + public String imageName; // required + public String userID; // required + public boolean isRead; // required + public boolean isWrite; // required + public boolean isLinkAllowed; // required + public boolean isAdmin; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IMAGE_NAME((short)1, "imageName"), + USER_ID((short)2, "userID"), + IS_READ((short)3, "isRead"), + IS_WRITE((short)4, "isWrite"), + IS_LINK_ALLOWED((short)5, "isLinkAllowed"), + IS_ADMIN((short)6, "isAdmin"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IMAGE_NAME + return IMAGE_NAME; + case 2: // USER_ID + return USER_ID; + case 3: // IS_READ + return IS_READ; + case 4: // IS_WRITE + return IS_WRITE; + case 5: // IS_LINK_ALLOWED + return IS_LINK_ALLOWED; + case 6: // IS_ADMIN + return IS_ADMIN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISREAD_ISSET_ID = 0; + private static final int __ISWRITE_ISSET_ID = 1; + private static final int __ISLINKALLOWED_ISSET_ID = 2; + private static final int __ISADMIN_ISSET_ID = 3; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userID", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_READ, new org.apache.thrift.meta_data.FieldMetaData("isRead", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IS_WRITE, new org.apache.thrift.meta_data.FieldMetaData("isWrite", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IS_LINK_ALLOWED, new org.apache.thrift.meta_data.FieldMetaData("isLinkAllowed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IS_ADMIN, new org.apache.thrift.meta_data.FieldMetaData("isAdmin", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeAdditionalImageRights_args.class, metaDataMap); + } + + public writeAdditionalImageRights_args() { + } + + public writeAdditionalImageRights_args( + String imageName, + String userID, + boolean isRead, + boolean isWrite, + boolean isLinkAllowed, + boolean isAdmin) + { + this(); + this.imageName = imageName; + this.userID = userID; + this.isRead = isRead; + setIsReadIsSet(true); + this.isWrite = isWrite; + setIsWriteIsSet(true); + this.isLinkAllowed = isLinkAllowed; + setIsLinkAllowedIsSet(true); + this.isAdmin = isAdmin; + setIsAdminIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public writeAdditionalImageRights_args(writeAdditionalImageRights_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetImageName()) { + this.imageName = other.imageName; + } + if (other.isSetUserID()) { + this.userID = other.userID; + } + this.isRead = other.isRead; + this.isWrite = other.isWrite; + this.isLinkAllowed = other.isLinkAllowed; + this.isAdmin = other.isAdmin; + } + + public writeAdditionalImageRights_args deepCopy() { + return new writeAdditionalImageRights_args(this); + } + + @Override + public void clear() { + this.imageName = null; + this.userID = null; + setIsReadIsSet(false); + this.isRead = false; + setIsWriteIsSet(false); + this.isWrite = false; + setIsLinkAllowedIsSet(false); + this.isLinkAllowed = false; + setIsAdminIsSet(false); + this.isAdmin = false; + } + + public String getImageName() { + return this.imageName; + } + + public writeAdditionalImageRights_args setImageName(String imageName) { + this.imageName = imageName; + return this; + } + + public void unsetImageName() { + this.imageName = null; + } + + /** Returns true if field imageName is set (has been assigned a value) and false otherwise */ + public boolean isSetImageName() { + return this.imageName != null; + } + + public void setImageNameIsSet(boolean value) { + if (!value) { + this.imageName = null; + } + } + + public String getUserID() { + return this.userID; + } + + public writeAdditionalImageRights_args setUserID(String userID) { + this.userID = userID; + return this; + } + + public void unsetUserID() { + this.userID = null; + } + + /** Returns true if field userID is set (has been assigned a value) and false otherwise */ + public boolean isSetUserID() { + return this.userID != null; + } + + public void setUserIDIsSet(boolean value) { + if (!value) { + this.userID = null; + } + } + + public boolean isIsRead() { + return this.isRead; + } + + public writeAdditionalImageRights_args setIsRead(boolean isRead) { + this.isRead = isRead; + setIsReadIsSet(true); + return this; + } + + public void unsetIsRead() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISREAD_ISSET_ID); + } + + /** Returns true if field isRead is set (has been assigned a value) and false otherwise */ + public boolean isSetIsRead() { + return EncodingUtils.testBit(__isset_bitfield, __ISREAD_ISSET_ID); + } + + public void setIsReadIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISREAD_ISSET_ID, value); + } + + public boolean isIsWrite() { + return this.isWrite; + } + + public writeAdditionalImageRights_args setIsWrite(boolean isWrite) { + this.isWrite = isWrite; + setIsWriteIsSet(true); + return this; + } + + public void unsetIsWrite() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISWRITE_ISSET_ID); + } + + /** Returns true if field isWrite is set (has been assigned a value) and false otherwise */ + public boolean isSetIsWrite() { + return EncodingUtils.testBit(__isset_bitfield, __ISWRITE_ISSET_ID); + } + + public void setIsWriteIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISWRITE_ISSET_ID, value); + } + + public boolean isIsLinkAllowed() { + return this.isLinkAllowed; + } + + public writeAdditionalImageRights_args setIsLinkAllowed(boolean isLinkAllowed) { + this.isLinkAllowed = isLinkAllowed; + setIsLinkAllowedIsSet(true); + return this; + } + + public void unsetIsLinkAllowed() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISLINKALLOWED_ISSET_ID); + } + + /** Returns true if field isLinkAllowed is set (has been assigned a value) and false otherwise */ + public boolean isSetIsLinkAllowed() { + return EncodingUtils.testBit(__isset_bitfield, __ISLINKALLOWED_ISSET_ID); + } + + public void setIsLinkAllowedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISLINKALLOWED_ISSET_ID, value); + } + + public boolean isIsAdmin() { + return this.isAdmin; + } + + public writeAdditionalImageRights_args setIsAdmin(boolean isAdmin) { + this.isAdmin = isAdmin; + setIsAdminIsSet(true); + return this; + } + + public void unsetIsAdmin() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISADMIN_ISSET_ID); + } + + /** Returns true if field isAdmin is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAdmin() { + return EncodingUtils.testBit(__isset_bitfield, __ISADMIN_ISSET_ID); + } + + public void setIsAdminIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISADMIN_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IMAGE_NAME: + if (value == null) { + unsetImageName(); + } else { + setImageName((String)value); + } + break; + + case USER_ID: + if (value == null) { + unsetUserID(); + } else { + setUserID((String)value); + } + break; + + case IS_READ: + if (value == null) { + unsetIsRead(); + } else { + setIsRead((Boolean)value); + } + break; + + case IS_WRITE: + if (value == null) { + unsetIsWrite(); + } else { + setIsWrite((Boolean)value); + } + break; + + case IS_LINK_ALLOWED: + if (value == null) { + unsetIsLinkAllowed(); + } else { + setIsLinkAllowed((Boolean)value); + } + break; + + case IS_ADMIN: + if (value == null) { + unsetIsAdmin(); + } else { + setIsAdmin((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IMAGE_NAME: + return getImageName(); + + case USER_ID: + return getUserID(); + + case IS_READ: + return Boolean.valueOf(isIsRead()); + + case IS_WRITE: + return Boolean.valueOf(isIsWrite()); + + case IS_LINK_ALLOWED: + return Boolean.valueOf(isIsLinkAllowed()); + + case IS_ADMIN: + return Boolean.valueOf(isIsAdmin()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IMAGE_NAME: + return isSetImageName(); + case USER_ID: + return isSetUserID(); + case IS_READ: + return isSetIsRead(); + case IS_WRITE: + return isSetIsWrite(); + case IS_LINK_ALLOWED: + return isSetIsLinkAllowed(); + case IS_ADMIN: + return isSetIsAdmin(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeAdditionalImageRights_args) + return this.equals((writeAdditionalImageRights_args)that); + return false; + } + + public boolean equals(writeAdditionalImageRights_args that) { + if (that == null) + return false; + + boolean this_present_imageName = true && this.isSetImageName(); + boolean that_present_imageName = true && that.isSetImageName(); + if (this_present_imageName || that_present_imageName) { + if (!(this_present_imageName && that_present_imageName)) + return false; + if (!this.imageName.equals(that.imageName)) + return false; + } + + boolean this_present_userID = true && this.isSetUserID(); + boolean that_present_userID = true && that.isSetUserID(); + if (this_present_userID || that_present_userID) { + if (!(this_present_userID && that_present_userID)) + return false; + if (!this.userID.equals(that.userID)) + return false; + } + + boolean this_present_isRead = true; + boolean that_present_isRead = true; + if (this_present_isRead || that_present_isRead) { + if (!(this_present_isRead && that_present_isRead)) + return false; + if (this.isRead != that.isRead) + return false; + } + + boolean this_present_isWrite = true; + boolean that_present_isWrite = true; + if (this_present_isWrite || that_present_isWrite) { + if (!(this_present_isWrite && that_present_isWrite)) + return false; + if (this.isWrite != that.isWrite) + return false; + } + + boolean this_present_isLinkAllowed = true; + boolean that_present_isLinkAllowed = true; + if (this_present_isLinkAllowed || that_present_isLinkAllowed) { + if (!(this_present_isLinkAllowed && that_present_isLinkAllowed)) + return false; + if (this.isLinkAllowed != that.isLinkAllowed) + return false; + } + + boolean this_present_isAdmin = true; + boolean that_present_isAdmin = true; + if (this_present_isAdmin || that_present_isAdmin) { + if (!(this_present_isAdmin && that_present_isAdmin)) + return false; + if (this.isAdmin != that.isAdmin) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeAdditionalImageRights_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserID()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userID, other.userID); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsRead()).compareTo(other.isSetIsRead()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsRead()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRead, other.isRead); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsWrite()).compareTo(other.isSetIsWrite()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsWrite()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isWrite, other.isWrite); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsLinkAllowed()).compareTo(other.isSetIsLinkAllowed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsLinkAllowed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isLinkAllowed, other.isLinkAllowed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsAdmin()).compareTo(other.isSetIsAdmin()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAdmin()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAdmin, other.isAdmin); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("writeAdditionalImageRights_args("); + boolean first = true; + + sb.append("imageName:"); + if (this.imageName == null) { + sb.append("null"); + } else { + sb.append(this.imageName); + } + first = false; + if (!first) sb.append(", "); + sb.append("userID:"); + if (this.userID == null) { + sb.append("null"); + } else { + sb.append(this.userID); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRead:"); + sb.append(this.isRead); + first = false; + if (!first) sb.append(", "); + sb.append("isWrite:"); + sb.append(this.isWrite); + first = false; + if (!first) sb.append(", "); + sb.append("isLinkAllowed:"); + sb.append(this.isLinkAllowed); + first = false; + if (!first) sb.append(", "); + sb.append("isAdmin:"); + sb.append(this.isAdmin); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class writeAdditionalImageRights_argsStandardSchemeFactory implements SchemeFactory { + public writeAdditionalImageRights_argsStandardScheme getScheme() { + return new writeAdditionalImageRights_argsStandardScheme(); + } + } + + private static class writeAdditionalImageRights_argsStandardScheme extends StandardScheme<writeAdditionalImageRights_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeAdditionalImageRights_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IMAGE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // USER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IS_READ + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isRead = iprot.readBool(); + struct.setIsReadIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // IS_WRITE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isWrite = iprot.readBool(); + struct.setIsWriteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // IS_LINK_ALLOWED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isLinkAllowed = iprot.readBool(); + struct.setIsLinkAllowedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ADMIN + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAdmin = iprot.readBool(); + struct.setIsAdminIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeAdditionalImageRights_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.imageName != null) { + oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC); + oprot.writeString(struct.imageName); + oprot.writeFieldEnd(); + } + if (struct.userID != null) { + oprot.writeFieldBegin(USER_ID_FIELD_DESC); + oprot.writeString(struct.userID); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_READ_FIELD_DESC); + oprot.writeBool(struct.isRead); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_WRITE_FIELD_DESC); + oprot.writeBool(struct.isWrite); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_LINK_ALLOWED_FIELD_DESC); + oprot.writeBool(struct.isLinkAllowed); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ADMIN_FIELD_DESC); + oprot.writeBool(struct.isAdmin); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeAdditionalImageRights_argsTupleSchemeFactory implements SchemeFactory { + public writeAdditionalImageRights_argsTupleScheme getScheme() { + return new writeAdditionalImageRights_argsTupleScheme(); + } + } + + private static class writeAdditionalImageRights_argsTupleScheme extends TupleScheme<writeAdditionalImageRights_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeAdditionalImageRights_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetImageName()) { + optionals.set(0); + } + if (struct.isSetUserID()) { + optionals.set(1); + } + if (struct.isSetIsRead()) { + optionals.set(2); + } + if (struct.isSetIsWrite()) { + optionals.set(3); + } + if (struct.isSetIsLinkAllowed()) { + optionals.set(4); + } + if (struct.isSetIsAdmin()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetImageName()) { + oprot.writeString(struct.imageName); + } + if (struct.isSetUserID()) { + oprot.writeString(struct.userID); + } + if (struct.isSetIsRead()) { + oprot.writeBool(struct.isRead); + } + if (struct.isSetIsWrite()) { + oprot.writeBool(struct.isWrite); + } + if (struct.isSetIsLinkAllowed()) { + oprot.writeBool(struct.isLinkAllowed); + } + if (struct.isSetIsAdmin()) { + oprot.writeBool(struct.isAdmin); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeAdditionalImageRights_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } + if (incoming.get(1)) { + struct.userID = iprot.readString(); + struct.setUserIDIsSet(true); + } + if (incoming.get(2)) { + struct.isRead = iprot.readBool(); + struct.setIsReadIsSet(true); + } + if (incoming.get(3)) { + struct.isWrite = iprot.readBool(); + struct.setIsWriteIsSet(true); + } + if (incoming.get(4)) { + struct.isLinkAllowed = iprot.readBool(); + struct.setIsLinkAllowedIsSet(true); + } + if (incoming.get(5)) { + struct.isAdmin = iprot.readBool(); + struct.setIsAdminIsSet(true); + } + } + } + + } + + public static class writeAdditionalImageRights_result implements org.apache.thrift.TBase<writeAdditionalImageRights_result, writeAdditionalImageRights_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeAdditionalImageRights_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeAdditionalImageRights_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeAdditionalImageRights_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeAdditionalImageRights_resultTupleSchemeFactory()); + } + + public boolean success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeAdditionalImageRights_result.class, metaDataMap); + } + + public writeAdditionalImageRights_result() { + } + + public writeAdditionalImageRights_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public writeAdditionalImageRights_result(writeAdditionalImageRights_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public writeAdditionalImageRights_result deepCopy() { + return new writeAdditionalImageRights_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public writeAdditionalImageRights_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeAdditionalImageRights_result) + return this.equals((writeAdditionalImageRights_result)that); + return false; + } + + public boolean equals(writeAdditionalImageRights_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeAdditionalImageRights_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("writeAdditionalImageRights_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class writeAdditionalImageRights_resultStandardSchemeFactory implements SchemeFactory { + public writeAdditionalImageRights_resultStandardScheme getScheme() { + return new writeAdditionalImageRights_resultStandardScheme(); + } + } + + private static class writeAdditionalImageRights_resultStandardScheme extends StandardScheme<writeAdditionalImageRights_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeAdditionalImageRights_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeAdditionalImageRights_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeAdditionalImageRights_resultTupleSchemeFactory implements SchemeFactory { + public writeAdditionalImageRights_resultTupleScheme getScheme() { + return new writeAdditionalImageRights_resultTupleScheme(); + } + } + + private static class writeAdditionalImageRights_resultTupleScheme extends TupleScheme<writeAdditionalImageRights_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeAdditionalImageRights_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeAdditionalImageRights_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + } + } + + } + } |
