From e48a7c0c45cf002e8865dc316766dd9074790d90 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 23 Nov 2018 15:06:52 +0100 Subject: [thrift] Sat interface for getting predefined shares/filters --- .../org/openslx/bwlp/thrift/iface/LdapFilter.java | 220 +- .../org/openslx/bwlp/thrift/iface/NetShare.java | 114 +- .../openslx/bwlp/thrift/iface/PredefinedData.java | 611 +++ .../openslx/bwlp/thrift/iface/SatelliteServer.java | 4762 ++++++++++++-------- src/main/thrift/bwlp.thrift | 13 + 5 files changed, 3878 insertions(+), 1842 deletions(-) create mode 100644 src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java b/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java index f5e3a8c..ba80e7b 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java @@ -34,12 +34,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-06-13") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-11-23") public class LdapFilter implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LdapFilter"); private static final org.apache.thrift.protocol.TField ATTRIBUTE_FIELD_DESC = new org.apache.thrift.protocol.TField("attribute", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filterId", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -49,11 +51,15 @@ public class LdapFilter implements org.apache.thrift.TBase byName = new HashMap(); @@ -72,6 +78,10 @@ public class LdapFilter implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -119,6 +132,10 @@ public class LdapFilter implements org.apache.thrift.TBaseother. */ public LdapFilter(LdapFilter other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetAttribute()) { this.attribute = other.attribute; } if (other.isSetValue()) { this.value = other.value; } + this.filterId = other.filterId; + if (other.isSetTitle()) { + this.title = other.title; + } } public LdapFilter deepCopy() { @@ -155,6 +177,9 @@ public class LdapFilter implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NetShare"); @@ -44,6 +44,7 @@ public class NetShare implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -61,6 +62,7 @@ public class NetShare implements org.apache.thrift.TBase byName = new HashMap(); @@ -100,6 +103,8 @@ public class NetShare implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -156,6 +163,8 @@ public class NetShare implements org.apache.thrift.TBaseother. */ public NetShare(NetShare other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetAuth()) { this.auth = other.auth; } @@ -194,6 +204,7 @@ public class NetShare implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PredefinedData"); + + private static final org.apache.thrift.protocol.TField NET_SHARES_FIELD_DESC = new org.apache.thrift.protocol.TField("netShares", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField LDAP_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("ldapFilter", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new PredefinedDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new PredefinedDataTupleSchemeFactory()); + } + + public List netShares; // required + public List ldapFilter; // 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 { + NET_SHARES((short)1, "netShares"), + LDAP_FILTER((short)2, "ldapFilter"); + + private static final Map byName = new HashMap(); + + 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: // NET_SHARES + return NET_SHARES; + case 2: // LDAP_FILTER + return LDAP_FILTER; + 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.NET_SHARES, new org.apache.thrift.meta_data.FieldMetaData("netShares", 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, NetShare.class)))); + tmpMap.put(_Fields.LDAP_FILTER, new org.apache.thrift.meta_data.FieldMetaData("ldapFilter", 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, LdapFilter.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PredefinedData.class, metaDataMap); + } + + public PredefinedData() { + } + + public PredefinedData( + List netShares, + List ldapFilter) + { + this(); + this.netShares = netShares; + this.ldapFilter = ldapFilter; + } + + /** + * Performs a deep copy on other. + */ + public PredefinedData(PredefinedData other) { + if (other.isSetNetShares()) { + List __this__netShares = new ArrayList(other.netShares.size()); + for (NetShare other_element : other.netShares) { + __this__netShares.add(new NetShare(other_element)); + } + this.netShares = __this__netShares; + } + if (other.isSetLdapFilter()) { + List __this__ldapFilter = new ArrayList(other.ldapFilter.size()); + for (LdapFilter other_element : other.ldapFilter) { + __this__ldapFilter.add(new LdapFilter(other_element)); + } + this.ldapFilter = __this__ldapFilter; + } + } + + public PredefinedData deepCopy() { + return new PredefinedData(this); + } + + @Override + public void clear() { + this.netShares = null; + this.ldapFilter = null; + } + + public int getNetSharesSize() { + return (this.netShares == null) ? 0 : this.netShares.size(); + } + + public java.util.Iterator getNetSharesIterator() { + return (this.netShares == null) ? null : this.netShares.iterator(); + } + + public void addToNetShares(NetShare elem) { + if (this.netShares == null) { + this.netShares = new ArrayList(); + } + this.netShares.add(elem); + } + + public List getNetShares() { + return this.netShares; + } + + public PredefinedData setNetShares(List netShares) { + this.netShares = netShares; + return this; + } + + public void unsetNetShares() { + this.netShares = null; + } + + /** Returns true if field netShares is set (has been assigned a value) and false otherwise */ + public boolean isSetNetShares() { + return this.netShares != null; + } + + public void setNetSharesIsSet(boolean value) { + if (!value) { + this.netShares = null; + } + } + + public int getLdapFilterSize() { + return (this.ldapFilter == null) ? 0 : this.ldapFilter.size(); + } + + public java.util.Iterator getLdapFilterIterator() { + return (this.ldapFilter == null) ? null : this.ldapFilter.iterator(); + } + + public void addToLdapFilter(LdapFilter elem) { + if (this.ldapFilter == null) { + this.ldapFilter = new ArrayList(); + } + this.ldapFilter.add(elem); + } + + public List getLdapFilter() { + return this.ldapFilter; + } + + public PredefinedData setLdapFilter(List ldapFilter) { + this.ldapFilter = ldapFilter; + return this; + } + + public void unsetLdapFilter() { + this.ldapFilter = null; + } + + /** Returns true if field ldapFilter is set (has been assigned a value) and false otherwise */ + public boolean isSetLdapFilter() { + return this.ldapFilter != null; + } + + public void setLdapFilterIsSet(boolean value) { + if (!value) { + this.ldapFilter = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NET_SHARES: + if (value == null) { + unsetNetShares(); + } else { + setNetShares((List)value); + } + break; + + case LDAP_FILTER: + if (value == null) { + unsetLdapFilter(); + } else { + setLdapFilter((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NET_SHARES: + return getNetShares(); + + case LDAP_FILTER: + return getLdapFilter(); + + } + 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 NET_SHARES: + return isSetNetShares(); + case LDAP_FILTER: + return isSetLdapFilter(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PredefinedData) + return this.equals((PredefinedData)that); + return false; + } + + public boolean equals(PredefinedData that) { + if (that == null) + return false; + + boolean this_present_netShares = true && this.isSetNetShares(); + boolean that_present_netShares = true && that.isSetNetShares(); + if (this_present_netShares || that_present_netShares) { + if (!(this_present_netShares && that_present_netShares)) + return false; + if (!this.netShares.equals(that.netShares)) + return false; + } + + boolean this_present_ldapFilter = true && this.isSetLdapFilter(); + boolean that_present_ldapFilter = true && that.isSetLdapFilter(); + if (this_present_ldapFilter || that_present_ldapFilter) { + if (!(this_present_ldapFilter && that_present_ldapFilter)) + return false; + if (!this.ldapFilter.equals(that.ldapFilter)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_netShares = true && (isSetNetShares()); + list.add(present_netShares); + if (present_netShares) + list.add(netShares); + + boolean present_ldapFilter = true && (isSetLdapFilter()); + list.add(present_ldapFilter); + if (present_ldapFilter) + list.add(ldapFilter); + + return list.hashCode(); + } + + @Override + public int compareTo(PredefinedData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetNetShares()).compareTo(other.isSetNetShares()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNetShares()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.netShares, other.netShares); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLdapFilter()).compareTo(other.isSetLdapFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLdapFilter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ldapFilter, other.ldapFilter); + 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("PredefinedData("); + boolean first = true; + + sb.append("netShares:"); + if (this.netShares == null) { + sb.append("null"); + } else { + sb.append(this.netShares); + } + first = false; + if (!first) sb.append(", "); + sb.append("ldapFilter:"); + if (this.ldapFilter == null) { + sb.append("null"); + } else { + sb.append(this.ldapFilter); + } + 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 PredefinedDataStandardSchemeFactory implements SchemeFactory { + public PredefinedDataStandardScheme getScheme() { + return new PredefinedDataStandardScheme(); + } + } + + private static class PredefinedDataStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, PredefinedData 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: // NET_SHARES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list90 = iprot.readListBegin(); + struct.netShares = new ArrayList(_list90.size); + NetShare _elem91; + for (int _i92 = 0; _i92 < _list90.size; ++_i92) + { + _elem91 = new NetShare(); + _elem91.read(iprot); + struct.netShares.add(_elem91); + } + iprot.readListEnd(); + } + struct.setNetSharesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LDAP_FILTER + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(); + struct.ldapFilter = new ArrayList(_list93.size); + LdapFilter _elem94; + for (int _i95 = 0; _i95 < _list93.size; ++_i95) + { + _elem94 = new LdapFilter(); + _elem94.read(iprot); + struct.ldapFilter.add(_elem94); + } + iprot.readListEnd(); + } + struct.setLdapFilterIsSet(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, PredefinedData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.netShares != null) { + oprot.writeFieldBegin(NET_SHARES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.netShares.size())); + for (NetShare _iter96 : struct.netShares) + { + _iter96.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.ldapFilter != null) { + oprot.writeFieldBegin(LDAP_FILTER_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.ldapFilter.size())); + for (LdapFilter _iter97 : struct.ldapFilter) + { + _iter97.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class PredefinedDataTupleSchemeFactory implements SchemeFactory { + public PredefinedDataTupleScheme getScheme() { + return new PredefinedDataTupleScheme(); + } + } + + private static class PredefinedDataTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, PredefinedData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetNetShares()) { + optionals.set(0); + } + if (struct.isSetLdapFilter()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetNetShares()) { + { + oprot.writeI32(struct.netShares.size()); + for (NetShare _iter98 : struct.netShares) + { + _iter98.write(oprot); + } + } + } + if (struct.isSetLdapFilter()) { + { + oprot.writeI32(struct.ldapFilter.size()); + for (LdapFilter _iter99 : struct.ldapFilter) + { + _iter99.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, PredefinedData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list100 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.netShares = new ArrayList(_list100.size); + NetShare _elem101; + for (int _i102 = 0; _i102 < _list100.size; ++_i102) + { + _elem101 = new NetShare(); + _elem101.read(iprot); + struct.netShares.add(_elem101); + } + } + struct.setNetSharesIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.ldapFilter = new ArrayList(_list103.size); + LdapFilter _elem104; + for (int _i105 = 0; _i105 < _list103.size; ++_i105) + { + _elem104 = new LdapFilter(); + _elem104.read(iprot); + struct.ldapFilter.add(_elem104); + } + } + struct.setLdapFilterIsSet(true); + } + } + } + +} + diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java index 53bfd52..517614e 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-05-11") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-11-23") public class SatelliteServer { public interface Iface { @@ -127,6 +127,8 @@ public class SatelliteServer { public void setLectureOwner(String userToken, String lectureId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; + public PredefinedData getPredefinedData(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; + } public interface AsyncIface { @@ -219,6 +221,8 @@ public class SatelliteServer { public void setLectureOwner(String userToken, String lectureId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getPredefinedData(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -1521,6 +1525,35 @@ public class SatelliteServer { return; } + public PredefinedData getPredefinedData(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException + { + send_getPredefinedData(userToken); + return recv_getPredefinedData(); + } + + public void send_getPredefinedData(String userToken) throws org.apache.thrift.TException + { + getPredefinedData_args args = new getPredefinedData_args(); + args.setUserToken(userToken); + sendBase("getPredefinedData", args); + } + + public PredefinedData recv_getPredefinedData() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException + { + getPredefinedData_result result = new getPredefinedData_result(); + receiveBase(result, "getPredefinedData"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.serverError != null) { + throw result.serverError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPredefinedData 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 { @@ -3058,6 +3091,38 @@ public class SatelliteServer { } } + public void getPredefinedData(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getPredefinedData_call method_call = new getPredefinedData_call(userToken, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getPredefinedData_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + public getPredefinedData_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPredefinedData", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getPredefinedData_args args = new getPredefinedData_args(); + args.setUserToken(userToken); + args.write(prot); + prot.writeMessageEnd(); + } + + public PredefinedData 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!"); + } + 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_getPredefinedData(); + } + } + } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { @@ -3115,6 +3180,7 @@ public class SatelliteServer { processMap.put("writeLecturePermissions", new writeLecturePermissions()); processMap.put("getLecturePermissions", new getLecturePermissions()); processMap.put("setLectureOwner", new setLectureOwner()); + processMap.put("getPredefinedData", new getPredefinedData()); return processMap; } @@ -4261,6 +4327,32 @@ public class SatelliteServer { } } + public static class getPredefinedData extends org.apache.thrift.ProcessFunction { + public getPredefinedData() { + super("getPredefinedData"); + } + + public getPredefinedData_args getEmptyArgsInstance() { + return new getPredefinedData_args(); + } + + protected boolean isOneway() { + return false; + } + + public getPredefinedData_result getResult(I iface, getPredefinedData_args args) throws org.apache.thrift.TException { + getPredefinedData_result result = new getPredefinedData_result(); + try { + result.success = iface.getPredefinedData(args.userToken); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TInvocationException serverError) { + result.serverError = serverError; + } + return result; + } + } + } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { @@ -4318,6 +4410,7 @@ public class SatelliteServer { processMap.put("writeLecturePermissions", new writeLecturePermissions()); processMap.put("getLecturePermissions", new getLecturePermissions()); processMap.put("setLectureOwner", new setLectureOwner()); + processMap.put("getPredefinedData", new getPredefinedData()); return processMap; } @@ -7059,383 +7152,86 @@ public class SatelliteServer { } } - } - - public static class getVersion_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_args"); - - private static final org.apache.thrift.protocol.TField CLIENT_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("clientVersion", org.apache.thrift.protocol.TType.I64, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getVersion_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getVersion_argsTupleSchemeFactory()); - } - - public long clientVersion; // 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 { - CLIENT_VERSION((short)1, "clientVersion"); - - private static final Map byName = new HashMap(); - - 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: // CLIENT_VERSION - return CLIENT_VERSION; - 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 __CLIENTVERSION_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.CLIENT_VERSION, new org.apache.thrift.meta_data.FieldMetaData("clientVersion", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_args.class, metaDataMap); - } - - public getVersion_args() { - } - - public getVersion_args( - long clientVersion) - { - this(); - this.clientVersion = clientVersion; - setClientVersionIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public getVersion_args(getVersion_args other) { - __isset_bitfield = other.__isset_bitfield; - this.clientVersion = other.clientVersion; - } - - public getVersion_args deepCopy() { - return new getVersion_args(this); - } - - @Override - public void clear() { - setClientVersionIsSet(false); - this.clientVersion = 0; - } - - public long getClientVersion() { - return this.clientVersion; - } - - public getVersion_args setClientVersion(long clientVersion) { - this.clientVersion = clientVersion; - setClientVersionIsSet(true); - return this; - } - - public void unsetClientVersion() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID); - } - - /** Returns true if field clientVersion is set (has been assigned a value) and false otherwise */ - public boolean isSetClientVersion() { - return EncodingUtils.testBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID); - } - - public void setClientVersionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case CLIENT_VERSION: - if (value == null) { - unsetClientVersion(); - } else { - setClientVersion((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case CLIENT_VERSION: - return getClientVersion(); - - } - 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 CLIENT_VERSION: - return isSetClientVersion(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getVersion_args) - return this.equals((getVersion_args)that); - return false; - } - - public boolean equals(getVersion_args that) { - if (that == null) - return false; - - boolean this_present_clientVersion = true; - boolean that_present_clientVersion = true; - if (this_present_clientVersion || that_present_clientVersion) { - if (!(this_present_clientVersion && that_present_clientVersion)) - return false; - if (this.clientVersion != that.clientVersion) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List list = new ArrayList(); - - boolean present_clientVersion = true; - list.add(present_clientVersion); - if (present_clientVersion) - list.add(clientVersion); - - return list.hashCode(); - } - - @Override - public int compareTo(getVersion_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetClientVersion()).compareTo(other.isSetClientVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetClientVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientVersion, other.clientVersion); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getVersion_args("); - boolean first = true; - - sb.append("clientVersion:"); - sb.append(this.clientVersion); - 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); + public static class getPredefinedData extends org.apache.thrift.AsyncProcessFunction { + public getPredefinedData() { + super("getPredefinedData"); } - } - private static class getVersion_argsStandardSchemeFactory implements SchemeFactory { - public getVersion_argsStandardScheme getScheme() { - return new getVersion_argsStandardScheme(); + public getPredefinedData_args getEmptyArgsInstance() { + return new getPredefinedData_args(); } - } - - private static class getVersion_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(PredefinedData o) { + getPredefinedData_result result = new getPredefinedData_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(); } - switch (schemeField.id) { - case 1: // CLIENT_VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.clientVersion = iprot.readI64(); - struct.setClientVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getPredefinedData_result result = new getPredefinedData_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(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(); } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(CLIENT_VERSION_FIELD_DESC); - oprot.writeI64(struct.clientVersion); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getVersion_argsTupleSchemeFactory implements SchemeFactory { - public getVersion_argsTupleScheme getScheme() { - return new getVersion_argsTupleScheme(); + }; } - } - - private static class getVersion_argsTupleScheme extends TupleScheme { - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetClientVersion()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetClientVersion()) { - oprot.writeI64(struct.clientVersion); - } + protected boolean isOneway() { + return false; } - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.clientVersion = iprot.readI64(); - struct.setClientVersionIsSet(true); - } + public void start(I iface, getPredefinedData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getPredefinedData(args.userToken,resultHandler); } } } - public static class getVersion_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_result"); + public static class getVersion_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_args"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField CLIENT_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("clientVersion", org.apache.thrift.protocol.TType.I64, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getVersion_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getVersion_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVersion_argsTupleSchemeFactory()); } - public long success; // required + public long clientVersion; // 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"); + CLIENT_VERSION((short)1, "clientVersion"); private static final Map byName = new HashMap(); @@ -7450,8 +7246,367 @@ public class SatelliteServer { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; + case 1: // CLIENT_VERSION + return CLIENT_VERSION; + 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 __CLIENTVERSION_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.CLIENT_VERSION, new org.apache.thrift.meta_data.FieldMetaData("clientVersion", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_args.class, metaDataMap); + } + + public getVersion_args() { + } + + public getVersion_args( + long clientVersion) + { + this(); + this.clientVersion = clientVersion; + setClientVersionIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getVersion_args(getVersion_args other) { + __isset_bitfield = other.__isset_bitfield; + this.clientVersion = other.clientVersion; + } + + public getVersion_args deepCopy() { + return new getVersion_args(this); + } + + @Override + public void clear() { + setClientVersionIsSet(false); + this.clientVersion = 0; + } + + public long getClientVersion() { + return this.clientVersion; + } + + public getVersion_args setClientVersion(long clientVersion) { + this.clientVersion = clientVersion; + setClientVersionIsSet(true); + return this; + } + + public void unsetClientVersion() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID); + } + + /** Returns true if field clientVersion is set (has been assigned a value) and false otherwise */ + public boolean isSetClientVersion() { + return EncodingUtils.testBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID); + } + + public void setClientVersionIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case CLIENT_VERSION: + if (value == null) { + unsetClientVersion(); + } else { + setClientVersion((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case CLIENT_VERSION: + return getClientVersion(); + + } + 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 CLIENT_VERSION: + return isSetClientVersion(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getVersion_args) + return this.equals((getVersion_args)that); + return false; + } + + public boolean equals(getVersion_args that) { + if (that == null) + return false; + + boolean this_present_clientVersion = true; + boolean that_present_clientVersion = true; + if (this_present_clientVersion || that_present_clientVersion) { + if (!(this_present_clientVersion && that_present_clientVersion)) + return false; + if (this.clientVersion != that.clientVersion) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_clientVersion = true; + list.add(present_clientVersion); + if (present_clientVersion) + list.add(clientVersion); + + return list.hashCode(); + } + + @Override + public int compareTo(getVersion_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetClientVersion()).compareTo(other.isSetClientVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetClientVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientVersion, other.clientVersion); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getVersion_args("); + boolean first = true; + + sb.append("clientVersion:"); + sb.append(this.clientVersion); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getVersion_argsStandardSchemeFactory implements SchemeFactory { + public getVersion_argsStandardScheme getScheme() { + return new getVersion_argsStandardScheme(); + } + } + + private static class getVersion_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // CLIENT_VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.clientVersion = iprot.readI64(); + struct.setClientVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(CLIENT_VERSION_FIELD_DESC); + oprot.writeI64(struct.clientVersion); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVersion_argsTupleSchemeFactory implements SchemeFactory { + public getVersion_argsTupleScheme getScheme() { + return new getVersion_argsTupleScheme(); + } + } + + private static class getVersion_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetClientVersion()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetClientVersion()) { + oprot.writeI64(struct.clientVersion); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.clientVersion = iprot.readI64(); + struct.setClientVersionIsSet(true); + } + } + } + + } + + public static class getVersion_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVersion_resultTupleSchemeFactory()); + } + + public long success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + 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; } @@ -9679,13 +9834,13 @@ public class SatelliteServer { case 4: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list186 = iprot.readListBegin(); - struct.blockHashes = new ArrayList(_list186.size); - ByteBuffer _elem187; - for (int _i188 = 0; _i188 < _list186.size; ++_i188) + org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); + struct.blockHashes = new ArrayList(_list218.size); + ByteBuffer _elem219; + for (int _i220 = 0; _i220 < _list218.size; ++_i220) { - _elem187 = iprot.readBinary(); - struct.blockHashes.add(_elem187); + _elem219 = iprot.readBinary(); + struct.blockHashes.add(_elem219); } iprot.readListEnd(); } @@ -9734,9 +9889,9 @@ public class SatelliteServer { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); - for (ByteBuffer _iter189 : struct.blockHashes) + for (ByteBuffer _iter221 : struct.blockHashes) { - oprot.writeBinary(_iter189); + oprot.writeBinary(_iter221); } oprot.writeListEnd(); } @@ -9793,9 +9948,9 @@ public class SatelliteServer { if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); - for (ByteBuffer _iter190 : struct.blockHashes) + for (ByteBuffer _iter222 : struct.blockHashes) { - oprot.writeBinary(_iter190); + oprot.writeBinary(_iter222); } } } @@ -9822,13 +9977,13 @@ public class SatelliteServer { } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list191 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.blockHashes = new ArrayList(_list191.size); - ByteBuffer _elem192; - for (int _i193 = 0; _i193 < _list191.size; ++_i193) + org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList(_list223.size); + ByteBuffer _elem224; + for (int _i225 = 0; _i225 < _list223.size; ++_i225) { - _elem192 = iprot.readBinary(); - struct.blockHashes.add(_elem192); + _elem224 = iprot.readBinary(); + struct.blockHashes.add(_elem224); } } struct.setBlockHashesIsSet(true); @@ -11121,13 +11276,13 @@ public class SatelliteServer { case 2: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list194 = iprot.readListBegin(); - struct.blockHashes = new ArrayList(_list194.size); - ByteBuffer _elem195; - for (int _i196 = 0; _i196 < _list194.size; ++_i196) + org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); + struct.blockHashes = new ArrayList(_list226.size); + ByteBuffer _elem227; + for (int _i228 = 0; _i228 < _list226.size; ++_i228) { - _elem195 = iprot.readBinary(); - struct.blockHashes.add(_elem195); + _elem227 = iprot.readBinary(); + struct.blockHashes.add(_elem227); } iprot.readListEnd(); } @@ -11168,9 +11323,9 @@ public class SatelliteServer { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); - for (ByteBuffer _iter197 : struct.blockHashes) + for (ByteBuffer _iter229 : struct.blockHashes) { - oprot.writeBinary(_iter197); + oprot.writeBinary(_iter229); } oprot.writeListEnd(); } @@ -11215,9 +11370,9 @@ public class SatelliteServer { if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); - for (ByteBuffer _iter198 : struct.blockHashes) + for (ByteBuffer _iter230 : struct.blockHashes) { - oprot.writeBinary(_iter198); + oprot.writeBinary(_iter230); } } } @@ -11236,13 +11391,13 @@ public class SatelliteServer { } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.blockHashes = new ArrayList(_list199.size); - ByteBuffer _elem200; - for (int _i201 = 0; _i201 < _list199.size; ++_i201) + org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList(_list231.size); + ByteBuffer _elem232; + for (int _i233 = 0; _i233 < _list231.size; ++_i233) { - _elem200 = iprot.readBinary(); - struct.blockHashes.add(_elem200); + _elem232 = iprot.readBinary(); + struct.blockHashes.add(_elem232); } } struct.setBlockHashesIsSet(true); @@ -19757,14 +19912,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list202 = iprot.readListBegin(); - struct.success = new ArrayList(_list202.size); - UserInfo _elem203; - for (int _i204 = 0; _i204 < _list202.size; ++_i204) + org.apache.thrift.protocol.TList _list234 = iprot.readListBegin(); + struct.success = new ArrayList(_list234.size); + UserInfo _elem235; + for (int _i236 = 0; _i236 < _list234.size; ++_i236) { - _elem203 = new UserInfo(); - _elem203.read(iprot); - struct.success.add(_elem203); + _elem235 = new UserInfo(); + _elem235.read(iprot); + struct.success.add(_elem235); } iprot.readListEnd(); } @@ -19810,9 +19965,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (UserInfo _iter205 : struct.success) + for (UserInfo _iter237 : struct.success) { - _iter205.write(oprot); + _iter237.write(oprot); } oprot.writeListEnd(); } @@ -19859,9 +20014,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (UserInfo _iter206 : struct.success) + for (UserInfo _iter238 : struct.success) { - _iter206.write(oprot); + _iter238.write(oprot); } } } @@ -19879,14 +20034,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list207 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list207.size); - UserInfo _elem208; - for (int _i209 = 0; _i209 < _list207.size; ++_i209) + org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list239.size); + UserInfo _elem240; + for (int _i241 = 0; _i241 < _list239.size; ++_i241) { - _elem208 = new UserInfo(); - _elem208.read(iprot); - struct.success.add(_elem208); + _elem240 = new UserInfo(); + _elem240.read(iprot); + struct.success.add(_elem240); } } struct.setSuccessIsSet(true); @@ -22352,14 +22507,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list210 = iprot.readListBegin(); - struct.success = new ArrayList(_list210.size); - OperatingSystem _elem211; - for (int _i212 = 0; _i212 < _list210.size; ++_i212) + org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); + struct.success = new ArrayList(_list242.size); + OperatingSystem _elem243; + for (int _i244 = 0; _i244 < _list242.size; ++_i244) { - _elem211 = new OperatingSystem(); - _elem211.read(iprot); - struct.success.add(_elem211); + _elem243 = new OperatingSystem(); + _elem243.read(iprot); + struct.success.add(_elem243); } iprot.readListEnd(); } @@ -22387,9 +22542,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (OperatingSystem _iter213 : struct.success) + for (OperatingSystem _iter245 : struct.success) { - _iter213.write(oprot); + _iter245.write(oprot); } oprot.writeListEnd(); } @@ -22420,9 +22575,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (OperatingSystem _iter214 : struct.success) + for (OperatingSystem _iter246 : struct.success) { - _iter214.write(oprot); + _iter246.write(oprot); } } } @@ -22434,14 +22589,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list215 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list215.size); - OperatingSystem _elem216; - for (int _i217 = 0; _i217 < _list215.size; ++_i217) + org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list247.size); + OperatingSystem _elem248; + for (int _i249 = 0; _i249 < _list247.size; ++_i249) { - _elem216 = new OperatingSystem(); - _elem216.read(iprot); - struct.success.add(_elem216); + _elem248 = new OperatingSystem(); + _elem248.read(iprot); + struct.success.add(_elem248); } } struct.setSuccessIsSet(true); @@ -23015,14 +23170,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); - struct.success = new ArrayList(_list218.size); - Virtualizer _elem219; - for (int _i220 = 0; _i220 < _list218.size; ++_i220) + org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); + struct.success = new ArrayList(_list250.size); + Virtualizer _elem251; + for (int _i252 = 0; _i252 < _list250.size; ++_i252) { - _elem219 = new Virtualizer(); - _elem219.read(iprot); - struct.success.add(_elem219); + _elem251 = new Virtualizer(); + _elem251.read(iprot); + struct.success.add(_elem251); } iprot.readListEnd(); } @@ -23050,9 +23205,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Virtualizer _iter221 : struct.success) + for (Virtualizer _iter253 : struct.success) { - _iter221.write(oprot); + _iter253.write(oprot); } oprot.writeListEnd(); } @@ -23083,9 +23238,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Virtualizer _iter222 : struct.success) + for (Virtualizer _iter254 : struct.success) { - _iter222.write(oprot); + _iter254.write(oprot); } } } @@ -23097,14 +23252,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list223.size); - Virtualizer _elem224; - for (int _i225 = 0; _i225 < _list223.size; ++_i225) + org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list255.size); + Virtualizer _elem256; + for (int _i257 = 0; _i257 < _list255.size; ++_i257) { - _elem224 = new Virtualizer(); - _elem224.read(iprot); - struct.success.add(_elem224); + _elem256 = new Virtualizer(); + _elem256.read(iprot); + struct.success.add(_elem256); } } struct.setSuccessIsSet(true); @@ -23678,14 +23833,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); - struct.success = new ArrayList(_list226.size); - Organization _elem227; - for (int _i228 = 0; _i228 < _list226.size; ++_i228) + org.apache.thrift.protocol.TList _list258 = iprot.readListBegin(); + struct.success = new ArrayList(_list258.size); + Organization _elem259; + for (int _i260 = 0; _i260 < _list258.size; ++_i260) { - _elem227 = new Organization(); - _elem227.read(iprot); - struct.success.add(_elem227); + _elem259 = new Organization(); + _elem259.read(iprot); + struct.success.add(_elem259); } iprot.readListEnd(); } @@ -23713,9 +23868,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Organization _iter229 : struct.success) + for (Organization _iter261 : struct.success) { - _iter229.write(oprot); + _iter261.write(oprot); } oprot.writeListEnd(); } @@ -23746,9 +23901,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Organization _iter230 : struct.success) + for (Organization _iter262 : struct.success) { - _iter230.write(oprot); + _iter262.write(oprot); } } } @@ -23760,14 +23915,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list231.size); - Organization _elem232; - for (int _i233 = 0; _i233 < _list231.size; ++_i233) + org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list263.size); + Organization _elem264; + for (int _i265 = 0; _i265 < _list263.size; ++_i265) { - _elem232 = new Organization(); - _elem232.read(iprot); - struct.success.add(_elem232); + _elem264 = new Organization(); + _elem264.read(iprot); + struct.success.add(_elem264); } } struct.setSuccessIsSet(true); @@ -24341,14 +24496,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list234 = iprot.readListBegin(); - struct.success = new ArrayList(_list234.size); - Location _elem235; - for (int _i236 = 0; _i236 < _list234.size; ++_i236) + org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(); + struct.success = new ArrayList(_list266.size); + Location _elem267; + for (int _i268 = 0; _i268 < _list266.size; ++_i268) { - _elem235 = new Location(); - _elem235.read(iprot); - struct.success.add(_elem235); + _elem267 = new Location(); + _elem267.read(iprot); + struct.success.add(_elem267); } iprot.readListEnd(); } @@ -24376,9 +24531,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Location _iter237 : struct.success) + for (Location _iter269 : struct.success) { - _iter237.write(oprot); + _iter269.write(oprot); } oprot.writeListEnd(); } @@ -24409,9 +24564,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Location _iter238 : struct.success) + for (Location _iter270 : struct.success) { - _iter238.write(oprot); + _iter270.write(oprot); } } } @@ -24423,14 +24578,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list239.size); - Location _elem240; - for (int _i241 = 0; _i241 < _list239.size; ++_i241) + org.apache.thrift.protocol.TList _list271 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list271.size); + Location _elem272; + for (int _i273 = 0; _i273 < _list271.size; ++_i273) { - _elem240 = new Location(); - _elem240.read(iprot); - struct.success.add(_elem240); + _elem272 = new Location(); + _elem272.read(iprot); + struct.success.add(_elem272); } } struct.setSuccessIsSet(true); @@ -25539,13 +25694,13 @@ public class SatelliteServer { case 2: // TAG_SEARCH if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); - struct.tagSearch = new ArrayList(_list242.size); - String _elem243; - for (int _i244 = 0; _i244 < _list242.size; ++_i244) + org.apache.thrift.protocol.TList _list274 = iprot.readListBegin(); + struct.tagSearch = new ArrayList(_list274.size); + String _elem275; + for (int _i276 = 0; _i276 < _list274.size; ++_i276) { - _elem243 = iprot.readString(); - struct.tagSearch.add(_elem243); + _elem275 = iprot.readString(); + struct.tagSearch.add(_elem275); } iprot.readListEnd(); } @@ -25586,9 +25741,9 @@ public class SatelliteServer { oprot.writeFieldBegin(TAG_SEARCH_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tagSearch.size())); - for (String _iter245 : struct.tagSearch) + for (String _iter277 : struct.tagSearch) { - oprot.writeString(_iter245); + oprot.writeString(_iter277); } oprot.writeListEnd(); } @@ -25631,9 +25786,9 @@ public class SatelliteServer { if (struct.isSetTagSearch()) { { oprot.writeI32(struct.tagSearch.size()); - for (String _iter246 : struct.tagSearch) + for (String _iter278 : struct.tagSearch) { - oprot.writeString(_iter246); + oprot.writeString(_iter278); } } } @@ -25652,13 +25807,13 @@ public class SatelliteServer { } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tagSearch = new ArrayList(_list247.size); - String _elem248; - for (int _i249 = 0; _i249 < _list247.size; ++_i249) + org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tagSearch = new ArrayList(_list279.size); + String _elem280; + for (int _i281 = 0; _i281 < _list279.size; ++_i281) { - _elem248 = iprot.readString(); - struct.tagSearch.add(_elem248); + _elem280 = iprot.readString(); + struct.tagSearch.add(_elem280); } } struct.setTagSearchIsSet(true); @@ -26152,14 +26307,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); - struct.success = new ArrayList(_list250.size); - ImageSummaryRead _elem251; - for (int _i252 = 0; _i252 < _list250.size; ++_i252) + org.apache.thrift.protocol.TList _list282 = iprot.readListBegin(); + struct.success = new ArrayList(_list282.size); + ImageSummaryRead _elem283; + for (int _i284 = 0; _i284 < _list282.size; ++_i284) { - _elem251 = new ImageSummaryRead(); - _elem251.read(iprot); - struct.success.add(_elem251); + _elem283 = new ImageSummaryRead(); + _elem283.read(iprot); + struct.success.add(_elem283); } iprot.readListEnd(); } @@ -26205,9 +26360,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ImageSummaryRead _iter253 : struct.success) + for (ImageSummaryRead _iter285 : struct.success) { - _iter253.write(oprot); + _iter285.write(oprot); } oprot.writeListEnd(); } @@ -26254,9 +26409,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (ImageSummaryRead _iter254 : struct.success) + for (ImageSummaryRead _iter286 : struct.success) { - _iter254.write(oprot); + _iter286.write(oprot); } } } @@ -26274,14 +26429,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list255.size); - ImageSummaryRead _elem256; - for (int _i257 = 0; _i257 < _list255.size; ++_i257) + org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list287.size); + ImageSummaryRead _elem288; + for (int _i289 = 0; _i289 < _list287.size; ++_i289) { - _elem256 = new ImageSummaryRead(); - _elem256.read(iprot); - struct.success.add(_elem256); + _elem288 = new ImageSummaryRead(); + _elem288.read(iprot); + struct.success.add(_elem288); } } struct.setSuccessIsSet(true); @@ -33388,16 +33543,16 @@ public class SatelliteServer { case 3: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map258 = iprot.readMapBegin(); - struct.permissions = new HashMap(2*_map258.size); - String _key259; - ImagePermissions _val260; - for (int _i261 = 0; _i261 < _map258.size; ++_i261) + org.apache.thrift.protocol.TMap _map290 = iprot.readMapBegin(); + struct.permissions = new HashMap(2*_map290.size); + String _key291; + ImagePermissions _val292; + for (int _i293 = 0; _i293 < _map290.size; ++_i293) { - _key259 = iprot.readString(); - _val260 = new ImagePermissions(); - _val260.read(iprot); - struct.permissions.put(_key259, _val260); + _key291 = iprot.readString(); + _val292 = new ImagePermissions(); + _val292.read(iprot); + struct.permissions.put(_key291, _val292); } iprot.readMapEnd(); } @@ -33435,10 +33590,10 @@ public class SatelliteServer { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); - for (Map.Entry _iter262 : struct.permissions.entrySet()) + for (Map.Entry _iter294 : struct.permissions.entrySet()) { - oprot.writeString(_iter262.getKey()); - _iter262.getValue().write(oprot); + oprot.writeString(_iter294.getKey()); + _iter294.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -33481,10 +33636,10 @@ public class SatelliteServer { if (struct.isSetPermissions()) { { oprot.writeI32(struct.permissions.size()); - for (Map.Entry _iter263 : struct.permissions.entrySet()) + for (Map.Entry _iter295 : struct.permissions.entrySet()) { - oprot.writeString(_iter263.getKey()); - _iter263.getValue().write(oprot); + oprot.writeString(_iter295.getKey()); + _iter295.getValue().write(oprot); } } } @@ -33504,16 +33659,16 @@ public class SatelliteServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map264 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.permissions = new HashMap(2*_map264.size); - String _key265; - ImagePermissions _val266; - for (int _i267 = 0; _i267 < _map264.size; ++_i267) + org.apache.thrift.protocol.TMap _map296 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap(2*_map296.size); + String _key297; + ImagePermissions _val298; + for (int _i299 = 0; _i299 < _map296.size; ++_i299) { - _key265 = iprot.readString(); - _val266 = new ImagePermissions(); - _val266.read(iprot); - struct.permissions.put(_key265, _val266); + _key297 = iprot.readString(); + _val298 = new ImagePermissions(); + _val298.read(iprot); + struct.permissions.put(_key297, _val298); } } struct.setPermissionsIsSet(true); @@ -35133,16 +35288,16 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map268 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map268.size); - String _key269; - ImagePermissions _val270; - for (int _i271 = 0; _i271 < _map268.size; ++_i271) + org.apache.thrift.protocol.TMap _map300 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map300.size); + String _key301; + ImagePermissions _val302; + for (int _i303 = 0; _i303 < _map300.size; ++_i303) { - _key269 = iprot.readString(); - _val270 = new ImagePermissions(); - _val270.read(iprot); - struct.success.put(_key269, _val270); + _key301 = iprot.readString(); + _val302 = new ImagePermissions(); + _val302.read(iprot); + struct.success.put(_key301, _val302); } iprot.readMapEnd(); } @@ -35197,10 +35352,10 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry _iter272 : struct.success.entrySet()) + for (Map.Entry _iter304 : struct.success.entrySet()) { - oprot.writeString(_iter272.getKey()); - _iter272.getValue().write(oprot); + oprot.writeString(_iter304.getKey()); + _iter304.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -35255,10 +35410,10 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter273 : struct.success.entrySet()) + for (Map.Entry _iter305 : struct.success.entrySet()) { - oprot.writeString(_iter273.getKey()); - _iter273.getValue().write(oprot); + oprot.writeString(_iter305.getKey()); + _iter305.getValue().write(oprot); } } } @@ -35279,16 +35434,16 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map274 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap(2*_map274.size); - String _key275; - ImagePermissions _val276; - for (int _i277 = 0; _i277 < _map274.size; ++_i277) + org.apache.thrift.protocol.TMap _map306 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map306.size); + String _key307; + ImagePermissions _val308; + for (int _i309 = 0; _i309 < _map306.size; ++_i309) { - _key275 = iprot.readString(); - _val276 = new ImagePermissions(); - _val276.read(iprot); - struct.success.put(_key275, _val276); + _key307 = iprot.readString(); + _val308 = new ImagePermissions(); + _val308.read(iprot); + struct.success.put(_key307, _val308); } } struct.setSuccessIsSet(true); @@ -45030,59 +45185,1149 @@ public class SatelliteServer { } // isset id assignments - private static final int __PAGE_ISSET_ID = 0; - private byte __isset_bitfield = 0; + private static final int __PAGE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.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.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); + } + + public getLectureList_args() { + } + + public getLectureList_args( + String userToken, + int page) + { + this(); + this.userToken = userToken; + this.page = page; + setPageIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getLectureList_args(getLectureList_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + this.page = other.page; + } + + public getLectureList_args deepCopy() { + return new getLectureList_args(this); + } + + @Override + public void clear() { + this.userToken = null; + setPageIsSet(false); + this.page = 0; + } + + public String getUserToken() { + return this.userToken; + } + + public getLectureList_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 int getPage() { + return this.page; + } + + public getLectureList_args setPage(int page) { + this.page = page; + setPageIsSet(true); + return this; + } + + public void unsetPage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + /** Returns true if field page is set (has been assigned a value) and false otherwise */ + public boolean isSetPage() { + return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + public void setPageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case PAGE: + if (value == null) { + unsetPage(); + } else { + setPage((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case PAGE: + return getPage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case PAGE: + return isSetPage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureList_args) + return this.equals((getLectureList_args)that); + return false; + } + + public boolean equals(getLectureList_args that) { + if (that == null) + return false; + + boolean this_present_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_page = true; + boolean that_present_page = true; + if (this_present_page || that_present_page) { + if (!(this_present_page && that_present_page)) + return false; + if (this.page != that.page) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_userToken = true && (isSetUserToken()); + list.add(present_userToken); + if (present_userToken) + list.add(userToken); + + boolean present_page = true; + list.add(present_page); + if (present_page) + list.add(page); + + return list.hashCode(); + } + + @Override + public int compareTo(getLectureList_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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(isSetPage()).compareTo(other.isSetPage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureList_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("page:"); + sb.append(this.page); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureList_argsStandardSchemeFactory implements SchemeFactory { + public getLectureList_argsStandardScheme getScheme() { + return new getLectureList_argsStandardScheme(); + } + } + + private static class getLectureList_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // 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: // PAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_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(); + } + oprot.writeFieldBegin(PAGE_FIELD_DESC); + oprot.writeI32(struct.page); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory { + public getLectureList_argsTupleScheme getScheme() { + return new getLectureList_argsTupleScheme(); + } + } + + private static class getLectureList_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetPage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetPage()) { + oprot.writeI32(struct.page); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } + } + } + + } + + public static class getLectureList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final 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 SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory()); + } + + public List success; // required + public TAuthorizationException authError; // 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"), + SERVER_ERROR((short)2, "serverError"); + + private static final Map byName = new HashMap(); + + 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: // 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureSummary.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.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(getLectureList_result.class, metaDataMap); + } + + public getLectureList_result() { + } + + public getLectureList_result( + List success, + TAuthorizationException authError, + TInvocationException serverError) + { + this(); + this.success = success; + this.authError = authError; + this.serverError = serverError; + } + + /** + * Performs a deep copy on other. + */ + public getLectureList_result(getLectureList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (LectureSummary other_element : other.success) { + __this__success.add(new LectureSummary(other_element)); + } + this.success = __this__success; + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetServerError()) { + this.serverError = new TInvocationException(other.serverError); + } + } + + public getLectureList_result deepCopy() { + return new getLectureList_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + this.serverError = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(LectureSummary elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getLectureList_result setSuccess(List 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 getLectureList_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 TInvocationException getServerError() { + return this.serverError; + } + + public getLectureList_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((List)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)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 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 SERVER_ERROR: + return isSetServerError(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureList_result) + return this.equals((getLectureList_result)that); + return false; + } + + public boolean equals(getLectureList_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + 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_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 list = new ArrayList(); + + 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_serverError = true && (isSetServerError()); + list.add(present_serverError); + if (present_serverError) + list.add(serverError); + + return list.hashCode(); + } + + @Override + public int compareTo(getLectureList_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + 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(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("getLectureList_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("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 + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureList_resultStandardSchemeFactory implements SchemeFactory { + public getLectureList_resultStandardScheme getScheme() { + return new getLectureList_resultStandardScheme(); + } + } + + private static class getLectureList_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list310 = iprot.readListBegin(); + struct.success = new ArrayList(_list310.size); + LectureSummary _elem311; + for (int _i312 = 0; _i312 < _list310.size; ++_i312) + { + _elem311 = new LectureSummary(); + _elem311.read(iprot); + struct.success.add(_elem311); + } + iprot.readListEnd(); + } + 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: // 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, getLectureList_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (LectureSummary _iter313 : struct.success) + { + _iter313.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.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 getLectureList_resultTupleSchemeFactory implements SchemeFactory { + public getLectureList_resultTupleScheme getScheme() { + return new getLectureList_resultTupleScheme(); + } + } + + private static class getLectureList_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetServerError()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (LectureSummary _iter314 : struct.success) + { + _iter314.write(oprot); + } + } + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetServerError()) { + struct.serverError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list315 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list315.size); + LectureSummary _elem316; + for (int _i317 = 0; _i317 < _list315.size; ++_i317) + { + _elem316 = new LectureSummary(); + _elem316.read(iprot); + struct.success.add(_elem316); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + if (incoming.get(2)) { + struct.serverError = new TInvocationException(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } + } + } + + } + + public static class getLectureDetails_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_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 LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureDetails_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureDetails_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String lectureId; // 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"), + LECTURE_ID((short)2, "lectureId"); + + private static final Map byName = new HashMap(); + + 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: // LECTURE_ID + return LECTURE_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.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_args.class, metaDataMap); } - public getLectureList_args() { + public getLectureDetails_args() { } - public getLectureList_args( + public getLectureDetails_args( String userToken, - int page) + String lectureId) { this(); this.userToken = userToken; - this.page = page; - setPageIsSet(true); + this.lectureId = lectureId; } /** * Performs a deep copy on other. */ - public getLectureList_args(getLectureList_args other) { - __isset_bitfield = other.__isset_bitfield; + public getLectureDetails_args(getLectureDetails_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } - this.page = other.page; + if (other.isSetLectureId()) { + this.lectureId = other.lectureId; + } } - public getLectureList_args deepCopy() { - return new getLectureList_args(this); + public getLectureDetails_args deepCopy() { + return new getLectureDetails_args(this); } @Override public void clear() { this.userToken = null; - setPageIsSet(false); - this.page = 0; + this.lectureId = null; } public String getUserToken() { return this.userToken; } - public getLectureList_args setUserToken(String userToken) { + public getLectureDetails_args setUserToken(String userToken) { this.userToken = userToken; return this; } @@ -45102,27 +46347,28 @@ public class SatelliteServer { } } - public int getPage() { - return this.page; + public String getLectureId() { + return this.lectureId; } - public getLectureList_args setPage(int page) { - this.page = page; - setPageIsSet(true); + public getLectureDetails_args setLectureId(String lectureId) { + this.lectureId = lectureId; return this; } - public void unsetPage() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); + public void unsetLectureId() { + this.lectureId = null; } - /** Returns true if field page is set (has been assigned a value) and false otherwise */ - public boolean isSetPage() { - return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); + /** Returns true if field lectureId is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureId() { + return this.lectureId != null; } - public void setPageIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); + public void setLectureIdIsSet(boolean value) { + if (!value) { + this.lectureId = null; + } } public void setFieldValue(_Fields field, Object value) { @@ -45135,11 +46381,11 @@ public class SatelliteServer { } break; - case PAGE: + case LECTURE_ID: if (value == null) { - unsetPage(); + unsetLectureId(); } else { - setPage((Integer)value); + setLectureId((String)value); } break; @@ -45151,8 +46397,8 @@ public class SatelliteServer { case USER_TOKEN: return getUserToken(); - case PAGE: - return getPage(); + case LECTURE_ID: + return getLectureId(); } throw new IllegalStateException(); @@ -45167,8 +46413,8 @@ public class SatelliteServer { switch (field) { case USER_TOKEN: return isSetUserToken(); - case PAGE: - return isSetPage(); + case LECTURE_ID: + return isSetLectureId(); } throw new IllegalStateException(); } @@ -45177,12 +46423,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureList_args) - return this.equals((getLectureList_args)that); + if (that instanceof getLectureDetails_args) + return this.equals((getLectureDetails_args)that); return false; } - public boolean equals(getLectureList_args that) { + public boolean equals(getLectureDetails_args that) { if (that == null) return false; @@ -45195,12 +46441,12 @@ public class SatelliteServer { return false; } - boolean this_present_page = true; - boolean that_present_page = true; - if (this_present_page || that_present_page) { - if (!(this_present_page && that_present_page)) + boolean this_present_lectureId = true && this.isSetLectureId(); + boolean that_present_lectureId = true && that.isSetLectureId(); + if (this_present_lectureId || that_present_lectureId) { + if (!(this_present_lectureId && that_present_lectureId)) return false; - if (this.page != that.page) + if (!this.lectureId.equals(that.lectureId)) return false; } @@ -45216,16 +46462,16 @@ public class SatelliteServer { if (present_userToken) list.add(userToken); - boolean present_page = true; - list.add(present_page); - if (present_page) - list.add(page); + boolean present_lectureId = true && (isSetLectureId()); + list.add(present_lectureId); + if (present_lectureId) + list.add(lectureId); return list.hashCode(); } @Override - public int compareTo(getLectureList_args other) { + public int compareTo(getLectureDetails_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -45242,12 +46488,12 @@ public class SatelliteServer { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage()); + lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId()); if (lastComparison != 0) { return lastComparison; } - if (isSetPage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); + if (isSetLectureId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId); if (lastComparison != 0) { return lastComparison; } @@ -45269,7 +46515,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureList_args("); + StringBuilder sb = new StringBuilder("getLectureDetails_args("); boolean first = true; sb.append("userToken:"); @@ -45280,8 +46526,12 @@ public class SatelliteServer { } first = false; if (!first) sb.append(", "); - sb.append("page:"); - sb.append(this.page); + sb.append("lectureId:"); + if (this.lectureId == null) { + sb.append("null"); + } else { + sb.append(this.lectureId); + } first = false; sb.append(")"); return sb.toString(); @@ -45302,23 +46552,21 @@ public class SatelliteServer { 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 getLectureList_argsStandardSchemeFactory implements SchemeFactory { - public getLectureList_argsStandardScheme getScheme() { - return new getLectureList_argsStandardScheme(); + private static class getLectureDetails_argsStandardSchemeFactory implements SchemeFactory { + public getLectureDetails_argsStandardScheme getScheme() { + return new getLectureDetails_argsStandardScheme(); } } - private static class getLectureList_argsStandardScheme extends StandardScheme { + private static class getLectureDetails_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -45336,10 +46584,10 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // PAGE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.page = iprot.readI32(); - struct.setPageIsSet(true); + case 2: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -45355,7 +46603,7 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -45364,44 +46612,46 @@ public class SatelliteServer { oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(PAGE_FIELD_DESC); - oprot.writeI32(struct.page); - oprot.writeFieldEnd(); + if (struct.lectureId != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureId); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory { - public getLectureList_argsTupleScheme getScheme() { - return new getLectureList_argsTupleScheme(); + private static class getLectureDetails_argsTupleSchemeFactory implements SchemeFactory { + public getLectureDetails_argsTupleScheme getScheme() { + return new getLectureDetails_argsTupleScheme(); } } - private static class getLectureList_argsTupleScheme extends TupleScheme { + private static class getLectureDetails_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } - if (struct.isSetPage()) { + if (struct.isSetLectureId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } - if (struct.isSetPage()) { - oprot.writeI32(struct.page); + if (struct.isSetLectureId()) { + oprot.writeString(struct.lectureId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -45409,36 +46659,39 @@ public class SatelliteServer { struct.setUserTokenIsSet(true); } if (incoming.get(1)) { - struct.page = iprot.readI32(); - struct.setPageIsSet(true); + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); } } } } - public static class getLectureList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_result"); + public static class getLectureDetails_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField 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 SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); + 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLectureDetails_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureDetails_resultTupleSchemeFactory()); } - public List success; // required + public LectureRead 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"), - SERVER_ERROR((short)2, "serverError"); + NOT_FOUND((short)2, "notFound"), + SERVER_ERROR((short)3, "serverError"); private static final Map byName = new HashMap(); @@ -45457,7 +46710,9 @@ public class SatelliteServer { return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; - case 2: // SERVER_ERROR + case 2: // NOT_FOUND + return NOT_FOUND; + case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; @@ -45503,80 +46758,68 @@ public class SatelliteServer { 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, LectureSummary.class)))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureRead.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(getLectureList_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_result.class, metaDataMap); } - public getLectureList_result() { + public getLectureDetails_result() { } - public getLectureList_result( - List success, + public getLectureDetails_result( + LectureRead 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 other. */ - public getLectureList_result(getLectureList_result other) { + public getLectureDetails_result(getLectureDetails_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (LectureSummary other_element : other.success) { - __this__success.add(new LectureSummary(other_element)); - } - this.success = __this__success; + this.success = new LectureRead(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 getLectureList_result deepCopy() { - return new getLectureList_result(this); + public getLectureDetails_result deepCopy() { + return new getLectureDetails_result(this); } @Override public void clear() { this.success = null; this.authError = null; + this.notFound = null; this.serverError = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(LectureSummary elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { + public LectureRead getSuccess() { return this.success; } - public getLectureList_result setSuccess(List success) { + public getLectureDetails_result setSuccess(LectureRead success) { this.success = success; return this; } @@ -45600,7 +46843,7 @@ public class SatelliteServer { return this.authError; } - public getLectureList_result setAuthError(TAuthorizationException authError) { + public getLectureDetails_result setAuthError(TAuthorizationException authError) { this.authError = authError; return this; } @@ -45620,11 +46863,35 @@ public class SatelliteServer { } } + public TNotFoundException getNotFound() { + return this.notFound; + } + + public getLectureDetails_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 getLectureList_result setServerError(TInvocationException serverError) { + public getLectureDetails_result setServerError(TInvocationException serverError) { this.serverError = serverError; return this; } @@ -45650,7 +46917,7 @@ public class SatelliteServer { if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((LectureRead)value); } break; @@ -45662,6 +46929,14 @@ public class SatelliteServer { } break; + case NOT_FOUND: + if (value == null) { + unsetNotFound(); + } else { + setNotFound((TNotFoundException)value); + } + break; + case SERVER_ERROR: if (value == null) { unsetServerError(); @@ -45681,6 +46956,9 @@ public class SatelliteServer { case AUTH_ERROR: return getAuthError(); + case NOT_FOUND: + return getNotFound(); + case SERVER_ERROR: return getServerError(); @@ -45699,6 +46977,8 @@ public class SatelliteServer { return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } @@ -45709,12 +46989,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureList_result) - return this.equals((getLectureList_result)that); + if (that instanceof getLectureDetails_result) + return this.equals((getLectureDetails_result)that); return false; } - public boolean equals(getLectureList_result that) { + public boolean equals(getLectureDetails_result that) { if (that == null) return false; @@ -45736,6 +47016,15 @@ public class SatelliteServer { 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) { @@ -45762,6 +47051,11 @@ public class SatelliteServer { 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) @@ -45771,7 +47065,7 @@ public class SatelliteServer { } @Override - public int compareTo(getLectureList_result other) { + public int compareTo(getLectureDetails_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -45798,6 +47092,16 @@ public class SatelliteServer { 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; @@ -45825,7 +47129,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureList_result("); + StringBuilder sb = new StringBuilder("getLectureDetails_result("); boolean first = true; sb.append("success:"); @@ -45844,6 +47148,14 @@ public class SatelliteServer { } 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"); @@ -45858,6 +47170,9 @@ public class SatelliteServer { 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 { @@ -45876,15 +47191,15 @@ public class SatelliteServer { } } - private static class getLectureList_resultStandardSchemeFactory implements SchemeFactory { - public getLectureList_resultStandardScheme getScheme() { - return new getLectureList_resultStandardScheme(); + private static class getLectureDetails_resultStandardSchemeFactory implements SchemeFactory { + public getLectureDetails_resultStandardScheme getScheme() { + return new getLectureDetails_resultStandardScheme(); } } - private static class getLectureList_resultStandardScheme extends StandardScheme { + private static class getLectureDetails_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -45895,19 +47210,9 @@ public class SatelliteServer { } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list278 = iprot.readListBegin(); - struct.success = new ArrayList(_list278.size); - LectureSummary _elem279; - for (int _i280 = 0; _i280 < _list278.size; ++_i280) - { - _elem279 = new LectureSummary(); - _elem279.read(iprot); - struct.success.add(_elem279); - } - iprot.readListEnd(); - } + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new LectureRead(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -45922,7 +47227,16 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // SERVER_ERROR + 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); @@ -45942,20 +47256,13 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_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 (LectureSummary _iter281 : struct.success) - { - _iter281.write(oprot); - } - oprot.writeListEnd(); - } + struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { @@ -45963,6 +47270,11 @@ public class SatelliteServer { 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); @@ -45974,16 +47286,16 @@ public class SatelliteServer { } - private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory { - public getLectureList_resultTupleScheme getScheme() { - return new getLectureList_resultTupleScheme(); + private static class getLectureDetails_resultTupleSchemeFactory implements SchemeFactory { + public getLectureDetails_resultTupleScheme getScheme() { + return new getLectureDetails_resultTupleScheme(); } } - private static class getLectureList_resultTupleScheme extends TupleScheme { + private static class getLectureDetails_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -45992,43 +47304,34 @@ public class SatelliteServer { if (struct.isSetAuthError()) { optionals.set(1); } - if (struct.isSetServerError()) { + if (struct.isSetNotFound()) { optionals.set(2); } - oprot.writeBitSet(optionals, 3); + if (struct.isSetServerError()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (LectureSummary _iter282 : struct.success) - { - _iter282.write(oprot); - } - } + 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, getLectureList_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list283 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list283.size); - LectureSummary _elem284; - for (int _i285 = 0; _i285 < _list283.size; ++_i285) - { - _elem284 = new LectureSummary(); - _elem284.read(iprot); - struct.success.add(_elem284); - } - } + struct.success = new LectureRead(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { @@ -46037,6 +47340,11 @@ public class SatelliteServer { 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); @@ -46046,16 +47354,16 @@ public class SatelliteServer { } - public static class getLectureDetails_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_args"); + public static class deleteLecture_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_args"); private static final org.apache.thrift.protocol.TField 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 LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureDetails_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureDetails_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteLecture_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteLecture_argsTupleSchemeFactory()); } public String userToken; // required @@ -46131,13 +47439,13 @@ public class SatelliteServer { tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_args.class, metaDataMap); } - public getLectureDetails_args() { + public deleteLecture_args() { } - public getLectureDetails_args( + public deleteLecture_args( String userToken, String lectureId) { @@ -46149,7 +47457,7 @@ public class SatelliteServer { /** * Performs a deep copy on other. */ - public getLectureDetails_args(getLectureDetails_args other) { + public deleteLecture_args(deleteLecture_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } @@ -46158,8 +47466,8 @@ public class SatelliteServer { } } - public getLectureDetails_args deepCopy() { - return new getLectureDetails_args(this); + public deleteLecture_args deepCopy() { + return new deleteLecture_args(this); } @Override @@ -46172,7 +47480,7 @@ public class SatelliteServer { return this.userToken; } - public getLectureDetails_args setUserToken(String userToken) { + public deleteLecture_args setUserToken(String userToken) { this.userToken = userToken; return this; } @@ -46196,7 +47504,7 @@ public class SatelliteServer { return this.lectureId; } - public getLectureDetails_args setLectureId(String lectureId) { + public deleteLecture_args setLectureId(String lectureId) { this.lectureId = lectureId; return this; } @@ -46268,12 +47576,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureDetails_args) - return this.equals((getLectureDetails_args)that); + if (that instanceof deleteLecture_args) + return this.equals((deleteLecture_args)that); return false; } - public boolean equals(getLectureDetails_args that) { + public boolean equals(deleteLecture_args that) { if (that == null) return false; @@ -46316,7 +47624,7 @@ public class SatelliteServer { } @Override - public int compareTo(getLectureDetails_args other) { + public int compareTo(deleteLecture_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -46360,7 +47668,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureDetails_args("); + StringBuilder sb = new StringBuilder("deleteLecture_args("); boolean first = true; sb.append("userToken:"); @@ -46403,15 +47711,15 @@ public class SatelliteServer { } } - private static class getLectureDetails_argsStandardSchemeFactory implements SchemeFactory { - public getLectureDetails_argsStandardScheme getScheme() { - return new getLectureDetails_argsStandardScheme(); + private static class deleteLecture_argsStandardSchemeFactory implements SchemeFactory { + public deleteLecture_argsStandardScheme getScheme() { + return new deleteLecture_argsStandardScheme(); } } - private static class getLectureDetails_argsStandardScheme extends StandardScheme { + private static class deleteLecture_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -46448,7 +47756,7 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -46468,16 +47776,16 @@ public class SatelliteServer { } - private static class getLectureDetails_argsTupleSchemeFactory implements SchemeFactory { - public getLectureDetails_argsTupleScheme getScheme() { - return new getLectureDetails_argsTupleScheme(); + private static class deleteLecture_argsTupleSchemeFactory implements SchemeFactory { + public deleteLecture_argsTupleScheme getScheme() { + return new deleteLecture_argsTupleScheme(); } } - private static class getLectureDetails_argsTupleScheme extends TupleScheme { + private static class deleteLecture_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserToken()) { @@ -46496,7 +47804,7 @@ public class SatelliteServer { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -46512,28 +47820,25 @@ public class SatelliteServer { } - public static class getLectureDetails_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_result"); + public static class deleteLecture_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLectureDetails_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLectureDetails_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new deleteLecture_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteLecture_resultTupleSchemeFactory()); } - public LectureRead 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"); @@ -46551,8 +47856,6 @@ public class SatelliteServer { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND @@ -46602,8 +47905,6 @@ public class SatelliteServer { 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, LectureRead.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, @@ -46611,20 +47912,18 @@ public class SatelliteServer { 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(getLectureDetails_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_result.class, metaDataMap); } - public getLectureDetails_result() { + public deleteLecture_result() { } - public getLectureDetails_result( - LectureRead success, + public deleteLecture_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); - this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; @@ -46633,10 +47932,7 @@ public class SatelliteServer { /** * Performs a deep copy on other. */ - public getLectureDetails_result(getLectureDetails_result other) { - if (other.isSetSuccess()) { - this.success = new LectureRead(other.success); - } + public deleteLecture_result(deleteLecture_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } @@ -46648,47 +47944,22 @@ public class SatelliteServer { } } - public getLectureDetails_result deepCopy() { - return new getLectureDetails_result(this); + public deleteLecture_result deepCopy() { + return new deleteLecture_result(this); } @Override public void clear() { - this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } - public LectureRead getSuccess() { - return this.success; - } - - public getLectureDetails_result setSuccess(LectureRead 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 getLectureDetails_result setAuthError(TAuthorizationException authError) { + public deleteLecture_result setAuthError(TAuthorizationException authError) { this.authError = authError; return this; } @@ -46712,7 +47983,7 @@ public class SatelliteServer { return this.notFound; } - public getLectureDetails_result setNotFound(TNotFoundException notFound) { + public deleteLecture_result setNotFound(TNotFoundException notFound) { this.notFound = notFound; return this; } @@ -46736,7 +48007,7 @@ public class SatelliteServer { return this.serverError; } - public getLectureDetails_result setServerError(TInvocationException serverError) { + public deleteLecture_result setServerError(TInvocationException serverError) { this.serverError = serverError; return this; } @@ -46758,14 +48029,6 @@ public class SatelliteServer { public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((LectureRead)value); - } - break; - case AUTH_ERROR: if (value == null) { unsetAuthError(); @@ -46795,9 +48058,6 @@ public class SatelliteServer { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - case AUTH_ERROR: return getAuthError(); @@ -46818,8 +48078,6 @@ public class SatelliteServer { } switch (field) { - case SUCCESS: - return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: @@ -46834,24 +48092,15 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLectureDetails_result) - return this.equals((getLectureDetails_result)that); + if (that instanceof deleteLecture_result) + return this.equals((deleteLecture_result)that); return false; } - public boolean equals(getLectureDetails_result that) { + public boolean equals(deleteLecture_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) { @@ -46886,11 +48135,6 @@ public class SatelliteServer { public int hashCode() { List list = new ArrayList(); - 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) @@ -46910,23 +48154,13 @@ public class SatelliteServer { } @Override - public int compareTo(getLectureDetails_result other) { + public int compareTo(deleteLecture_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); if (lastComparison != 0) { return lastComparison; @@ -46974,17 +48208,9 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLectureDetails_result("); + StringBuilder sb = new StringBuilder("deleteLecture_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"); @@ -47015,9 +48241,6 @@ public class SatelliteServer { 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 { @@ -47036,15 +48259,15 @@ public class SatelliteServer { } } - private static class getLectureDetails_resultStandardSchemeFactory implements SchemeFactory { - public getLectureDetails_resultStandardScheme getScheme() { - return new getLectureDetails_resultStandardScheme(); + private static class deleteLecture_resultStandardSchemeFactory implements SchemeFactory { + public deleteLecture_resultStandardScheme getScheme() { + return new deleteLecture_resultStandardScheme(); } } - private static class getLectureDetails_resultStandardScheme extends StandardScheme { + private static class deleteLecture_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -47054,15 +48277,6 @@ public class SatelliteServer { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new LectureRead(); - 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(); @@ -47101,15 +48315,10 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.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); @@ -47131,34 +48340,28 @@ public class SatelliteServer { } - private static class getLectureDetails_resultTupleSchemeFactory implements SchemeFactory { - public getLectureDetails_resultTupleScheme getScheme() { - return new getLectureDetails_resultTupleScheme(); + private static class deleteLecture_resultTupleSchemeFactory implements SchemeFactory { + public deleteLecture_resultTupleScheme getScheme() { + return new deleteLecture_resultTupleScheme(); } } - private static class getLectureDetails_resultTupleScheme extends TupleScheme { + private static class deleteLecture_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } if (struct.isSetAuthError()) { - optionals.set(1); + optionals.set(0); } if (struct.isSetNotFound()) { - optionals.set(2); + optionals.set(1); } if (struct.isSetServerError()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetSuccess()) { - struct.success.write(oprot); + optionals.set(2); } + oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } @@ -47171,25 +48374,20 @@ public class SatelliteServer { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.success = new LectureRead(); - 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)) { + if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); @@ -47199,25 +48397,28 @@ public class SatelliteServer { } - public static class deleteLecture_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_args"); + public static class writeLecturePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_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 LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteLecture_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteLecture_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new writeLecturePermissions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeLecturePermissions_argsTupleSchemeFactory()); } public String userToken; // required public String lectureId; // required + public Map permissions; // 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"), - LECTURE_ID((short)2, "lectureId"); + LECTURE_ID((short)2, "lectureId"), + PERMISSIONS((short)3, "permissions"); private static final Map byName = new HashMap(); @@ -47236,6 +48437,8 @@ public class SatelliteServer { return USER_TOKEN; case 2: // LECTURE_ID return LECTURE_ID; + case 3: // PERMISSIONS + return PERMISSIONS; default: return null; } @@ -47283,49 +48486,71 @@ public class SatelliteServer { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_args.class, metaDataMap); } - public deleteLecture_args() { + public writeLecturePermissions_args() { } - public deleteLecture_args( + public writeLecturePermissions_args( String userToken, - String lectureId) + String lectureId, + Map permissions) { this(); this.userToken = userToken; this.lectureId = lectureId; + this.permissions = permissions; } /** * Performs a deep copy on other. */ - public deleteLecture_args(deleteLecture_args other) { + public writeLecturePermissions_args(writeLecturePermissions_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetLectureId()) { this.lectureId = other.lectureId; } + if (other.isSetPermissions()) { + Map __this__permissions = new HashMap(other.permissions.size()); + for (Map.Entry other_element : other.permissions.entrySet()) { + + String other_element_key = other_element.getKey(); + LecturePermissions other_element_value = other_element.getValue(); + + String __this__permissions_copy_key = other_element_key; + + LecturePermissions __this__permissions_copy_value = new LecturePermissions(other_element_value); + + __this__permissions.put(__this__permissions_copy_key, __this__permissions_copy_value); + } + this.permissions = __this__permissions; + } } - public deleteLecture_args deepCopy() { - return new deleteLecture_args(this); + public writeLecturePermissions_args deepCopy() { + return new writeLecturePermissions_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; + this.permissions = null; } public String getUserToken() { return this.userToken; } - public deleteLecture_args setUserToken(String userToken) { + public writeLecturePermissions_args setUserToken(String userToken) { this.userToken = userToken; return this; } @@ -47349,7 +48574,7 @@ public class SatelliteServer { return this.lectureId; } - public deleteLecture_args setLectureId(String lectureId) { + public writeLecturePermissions_args setLectureId(String lectureId) { this.lectureId = lectureId; return this; } @@ -47369,6 +48594,41 @@ public class SatelliteServer { } } + public int getPermissionsSize() { + return (this.permissions == null) ? 0 : this.permissions.size(); + } + + public void putToPermissions(String key, LecturePermissions val) { + if (this.permissions == null) { + this.permissions = new HashMap(); + } + this.permissions.put(key, val); + } + + public Map getPermissions() { + return this.permissions; + } + + public writeLecturePermissions_args setPermissions(Map permissions) { + this.permissions = permissions; + return this; + } + + public void unsetPermissions() { + this.permissions = null; + } + + /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ + public boolean isSetPermissions() { + return this.permissions != null; + } + + public void setPermissionsIsSet(boolean value) { + if (!value) { + this.permissions = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_TOKEN: @@ -47387,6 +48647,14 @@ public class SatelliteServer { } break; + case PERMISSIONS: + if (value == null) { + unsetPermissions(); + } else { + setPermissions((Map)value); + } + break; + } } @@ -47398,6 +48666,9 @@ public class SatelliteServer { case LECTURE_ID: return getLectureId(); + case PERMISSIONS: + return getPermissions(); + } throw new IllegalStateException(); } @@ -47413,6 +48684,8 @@ public class SatelliteServer { return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); + case PERMISSIONS: + return isSetPermissions(); } throw new IllegalStateException(); } @@ -47421,12 +48694,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteLecture_args) - return this.equals((deleteLecture_args)that); + if (that instanceof writeLecturePermissions_args) + return this.equals((writeLecturePermissions_args)that); return false; } - public boolean equals(deleteLecture_args that) { + public boolean equals(writeLecturePermissions_args that) { if (that == null) return false; @@ -47448,6 +48721,15 @@ public class SatelliteServer { return false; } + boolean this_present_permissions = true && this.isSetPermissions(); + boolean that_present_permissions = true && that.isSetPermissions(); + if (this_present_permissions || that_present_permissions) { + if (!(this_present_permissions && that_present_permissions)) + return false; + if (!this.permissions.equals(that.permissions)) + return false; + } + return true; } @@ -47465,11 +48747,16 @@ public class SatelliteServer { if (present_lectureId) list.add(lectureId); + boolean present_permissions = true && (isSetPermissions()); + list.add(present_permissions); + if (present_permissions) + list.add(permissions); + return list.hashCode(); } @Override - public int compareTo(deleteLecture_args other) { + public int compareTo(writeLecturePermissions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -47496,6 +48783,16 @@ public class SatelliteServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPermissions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -47513,7 +48810,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteLecture_args("); + StringBuilder sb = new StringBuilder("writeLecturePermissions_args("); boolean first = true; sb.append("userToken:"); @@ -47531,6 +48828,14 @@ public class SatelliteServer { sb.append(this.lectureId); } first = false; + if (!first) sb.append(", "); + sb.append("permissions:"); + if (this.permissions == null) { + sb.append("null"); + } else { + sb.append(this.permissions); + } + first = false; sb.append(")"); return sb.toString(); } @@ -47556,15 +48861,15 @@ public class SatelliteServer { } } - private static class deleteLecture_argsStandardSchemeFactory implements SchemeFactory { - public deleteLecture_argsStandardScheme getScheme() { - return new deleteLecture_argsStandardScheme(); + private static class writeLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { + public writeLecturePermissions_argsStandardScheme getScheme() { + return new writeLecturePermissions_argsStandardScheme(); } } - private static class deleteLecture_argsStandardScheme extends StandardScheme { + private static class writeLecturePermissions_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -47590,6 +48895,27 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 3: // PERMISSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map318 = iprot.readMapBegin(); + struct.permissions = new HashMap(2*_map318.size); + String _key319; + LecturePermissions _val320; + for (int _i321 = 0; _i321 < _map318.size; ++_i321) + { + _key319 = iprot.readString(); + _val320 = new LecturePermissions(); + _val320.read(iprot); + struct.permissions.put(_key319, _val320); + } + iprot.readMapEnd(); + } + struct.setPermissionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -47601,7 +48927,7 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -47615,22 +48941,35 @@ public class SatelliteServer { oprot.writeString(struct.lectureId); oprot.writeFieldEnd(); } + if (struct.permissions != null) { + oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); + for (Map.Entry _iter322 : struct.permissions.entrySet()) + { + oprot.writeString(_iter322.getKey()); + _iter322.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class deleteLecture_argsTupleSchemeFactory implements SchemeFactory { - public deleteLecture_argsTupleScheme getScheme() { - return new deleteLecture_argsTupleScheme(); + private static class writeLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { + public writeLecturePermissions_argsTupleScheme getScheme() { + return new writeLecturePermissions_argsTupleScheme(); } } - private static class deleteLecture_argsTupleScheme extends TupleScheme { + private static class writeLecturePermissions_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserToken()) { @@ -47639,19 +48978,32 @@ public class SatelliteServer { if (struct.isSetLectureId()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetPermissions()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetLectureId()) { oprot.writeString(struct.lectureId); } + if (struct.isSetPermissions()) { + { + oprot.writeI32(struct.permissions.size()); + for (Map.Entry _iter323 : struct.permissions.entrySet()) + { + oprot.writeString(_iter323.getKey()); + _iter323.getValue().write(oprot); + } + } + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); @@ -47660,13 +49012,29 @@ public class SatelliteServer { struct.lectureId = iprot.readString(); struct.setLectureIdIsSet(true); } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map324 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap(2*_map324.size); + String _key325; + LecturePermissions _val326; + for (int _i327 = 0; _i327 < _map324.size; ++_i327) + { + _key325 = iprot.readString(); + _val326 = new LecturePermissions(); + _val326.read(iprot); + struct.permissions.put(_key325, _val326); + } + } + struct.setPermissionsIsSet(true); + } } } } - public static class deleteLecture_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_result"); + public static class writeLecturePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_result"); 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); @@ -47674,8 +49042,8 @@ public class SatelliteServer { private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new deleteLecture_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteLecture_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new writeLecturePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeLecturePermissions_resultTupleSchemeFactory()); } public TAuthorizationException authError; // required @@ -47757,13 +49125,13 @@ public class SatelliteServer { 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(deleteLecture_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_result.class, metaDataMap); } - public deleteLecture_result() { + public writeLecturePermissions_result() { } - public deleteLecture_result( + public writeLecturePermissions_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) @@ -47777,7 +49145,7 @@ public class SatelliteServer { /** * Performs a deep copy on other. */ - public deleteLecture_result(deleteLecture_result other) { + public writeLecturePermissions_result(writeLecturePermissions_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } @@ -47789,8 +49157,8 @@ public class SatelliteServer { } } - public deleteLecture_result deepCopy() { - return new deleteLecture_result(this); + public writeLecturePermissions_result deepCopy() { + return new writeLecturePermissions_result(this); } @Override @@ -47804,7 +49172,7 @@ public class SatelliteServer { return this.authError; } - public deleteLecture_result setAuthError(TAuthorizationException authError) { + public writeLecturePermissions_result setAuthError(TAuthorizationException authError) { this.authError = authError; return this; } @@ -47828,7 +49196,7 @@ public class SatelliteServer { return this.notFound; } - public deleteLecture_result setNotFound(TNotFoundException notFound) { + public writeLecturePermissions_result setNotFound(TNotFoundException notFound) { this.notFound = notFound; return this; } @@ -47852,7 +49220,7 @@ public class SatelliteServer { return this.serverError; } - public deleteLecture_result setServerError(TInvocationException serverError) { + public writeLecturePermissions_result setServerError(TInvocationException serverError) { this.serverError = serverError; return this; } @@ -47937,12 +49305,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof deleteLecture_result) - return this.equals((deleteLecture_result)that); + if (that instanceof writeLecturePermissions_result) + return this.equals((writeLecturePermissions_result)that); return false; } - public boolean equals(deleteLecture_result that) { + public boolean equals(writeLecturePermissions_result that) { if (that == null) return false; @@ -47999,7 +49367,7 @@ public class SatelliteServer { } @Override - public int compareTo(deleteLecture_result other) { + public int compareTo(writeLecturePermissions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -48053,7 +49421,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("deleteLecture_result("); + StringBuilder sb = new StringBuilder("writeLecturePermissions_result("); boolean first = true; sb.append("authError:"); @@ -48104,15 +49472,15 @@ public class SatelliteServer { } } - private static class deleteLecture_resultStandardSchemeFactory implements SchemeFactory { - public deleteLecture_resultStandardScheme getScheme() { - return new deleteLecture_resultStandardScheme(); + private static class writeLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { + public writeLecturePermissions_resultStandardScheme getScheme() { + return new writeLecturePermissions_resultStandardScheme(); } } - private static class deleteLecture_resultStandardScheme extends StandardScheme { + private static class writeLecturePermissions_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -48160,7 +49528,7 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -48185,16 +49553,16 @@ public class SatelliteServer { } - private static class deleteLecture_resultTupleSchemeFactory implements SchemeFactory { - public deleteLecture_resultTupleScheme getScheme() { - return new deleteLecture_resultTupleScheme(); + private static class writeLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { + public writeLecturePermissions_resultTupleScheme getScheme() { + return new writeLecturePermissions_resultTupleScheme(); } } - private static class deleteLecture_resultTupleScheme extends TupleScheme { + private static class writeLecturePermissions_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetAuthError()) { @@ -48219,7 +49587,7 @@ public class SatelliteServer { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { @@ -48242,28 +49610,25 @@ public class SatelliteServer { } - public static class writeLecturePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_args"); + public static class getLecturePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_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 LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new writeLecturePermissions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new writeLecturePermissions_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLecturePermissions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLecturePermissions_argsTupleSchemeFactory()); } public String userToken; // required public String lectureId; // required - public Map permissions; // 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"), - LECTURE_ID((short)2, "lectureId"), - PERMISSIONS((short)3, "permissions"); + LECTURE_ID((short)2, "lectureId"); private static final Map byName = new HashMap(); @@ -48282,8 +49647,6 @@ public class SatelliteServer { return USER_TOKEN; case 2: // LECTURE_ID return LECTURE_ID; - case 3: // PERMISSIONS - return PERMISSIONS; default: return null; } @@ -48331,71 +49694,49 @@ public class SatelliteServer { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); - tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_args.class, metaDataMap); } - public writeLecturePermissions_args() { + public getLecturePermissions_args() { } - public writeLecturePermissions_args( + public getLecturePermissions_args( String userToken, - String lectureId, - Map permissions) + String lectureId) { this(); this.userToken = userToken; this.lectureId = lectureId; - this.permissions = permissions; } /** * Performs a deep copy on other. */ - public writeLecturePermissions_args(writeLecturePermissions_args other) { + public getLecturePermissions_args(getLecturePermissions_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetLectureId()) { this.lectureId = other.lectureId; } - if (other.isSetPermissions()) { - Map __this__permissions = new HashMap(other.permissions.size()); - for (Map.Entry other_element : other.permissions.entrySet()) { - - String other_element_key = other_element.getKey(); - LecturePermissions other_element_value = other_element.getValue(); - - String __this__permissions_copy_key = other_element_key; - - LecturePermissions __this__permissions_copy_value = new LecturePermissions(other_element_value); - - __this__permissions.put(__this__permissions_copy_key, __this__permissions_copy_value); - } - this.permissions = __this__permissions; - } } - public writeLecturePermissions_args deepCopy() { - return new writeLecturePermissions_args(this); + public getLecturePermissions_args deepCopy() { + return new getLecturePermissions_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; - this.permissions = null; } public String getUserToken() { return this.userToken; } - public writeLecturePermissions_args setUserToken(String userToken) { + public getLecturePermissions_args setUserToken(String userToken) { this.userToken = userToken; return this; } @@ -48419,7 +49760,7 @@ public class SatelliteServer { return this.lectureId; } - public writeLecturePermissions_args setLectureId(String lectureId) { + public getLecturePermissions_args setLectureId(String lectureId) { this.lectureId = lectureId; return this; } @@ -48439,41 +49780,6 @@ public class SatelliteServer { } } - public int getPermissionsSize() { - return (this.permissions == null) ? 0 : this.permissions.size(); - } - - public void putToPermissions(String key, LecturePermissions val) { - if (this.permissions == null) { - this.permissions = new HashMap(); - } - this.permissions.put(key, val); - } - - public Map getPermissions() { - return this.permissions; - } - - public writeLecturePermissions_args setPermissions(Map permissions) { - this.permissions = permissions; - return this; - } - - public void unsetPermissions() { - this.permissions = null; - } - - /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ - public boolean isSetPermissions() { - return this.permissions != null; - } - - public void setPermissionsIsSet(boolean value) { - if (!value) { - this.permissions = null; - } - } - public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_TOKEN: @@ -48492,14 +49798,6 @@ public class SatelliteServer { } break; - case PERMISSIONS: - if (value == null) { - unsetPermissions(); - } else { - setPermissions((Map)value); - } - break; - } } @@ -48511,9 +49809,6 @@ public class SatelliteServer { case LECTURE_ID: return getLectureId(); - case PERMISSIONS: - return getPermissions(); - } throw new IllegalStateException(); } @@ -48529,8 +49824,6 @@ public class SatelliteServer { return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); - case PERMISSIONS: - return isSetPermissions(); } throw new IllegalStateException(); } @@ -48539,12 +49832,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof writeLecturePermissions_args) - return this.equals((writeLecturePermissions_args)that); + if (that instanceof getLecturePermissions_args) + return this.equals((getLecturePermissions_args)that); return false; } - public boolean equals(writeLecturePermissions_args that) { + public boolean equals(getLecturePermissions_args that) { if (that == null) return false; @@ -48566,15 +49859,6 @@ public class SatelliteServer { return false; } - boolean this_present_permissions = true && this.isSetPermissions(); - boolean that_present_permissions = true && that.isSetPermissions(); - if (this_present_permissions || that_present_permissions) { - if (!(this_present_permissions && that_present_permissions)) - return false; - if (!this.permissions.equals(that.permissions)) - return false; - } - return true; } @@ -48592,16 +49876,11 @@ public class SatelliteServer { if (present_lectureId) list.add(lectureId); - boolean present_permissions = true && (isSetPermissions()); - list.add(present_permissions); - if (present_permissions) - list.add(permissions); - return list.hashCode(); } @Override - public int compareTo(writeLecturePermissions_args other) { + public int compareTo(getLecturePermissions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -48628,16 +49907,6 @@ public class SatelliteServer { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPermissions()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -48655,7 +49924,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("writeLecturePermissions_args("); + StringBuilder sb = new StringBuilder("getLecturePermissions_args("); boolean first = true; sb.append("userToken:"); @@ -48673,14 +49942,6 @@ public class SatelliteServer { sb.append(this.lectureId); } first = false; - if (!first) sb.append(", "); - sb.append("permissions:"); - if (this.permissions == null) { - sb.append("null"); - } else { - sb.append(this.permissions); - } - first = false; sb.append(")"); return sb.toString(); } @@ -48706,15 +49967,15 @@ public class SatelliteServer { } } - private static class writeLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { - public writeLecturePermissions_argsStandardScheme getScheme() { - return new writeLecturePermissions_argsStandardScheme(); + private static class getLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { + public getLecturePermissions_argsStandardScheme getScheme() { + return new getLecturePermissions_argsStandardScheme(); } } - private static class writeLecturePermissions_argsStandardScheme extends StandardScheme { + private static class getLecturePermissions_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -48740,27 +50001,6 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // PERMISSIONS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map286 = iprot.readMapBegin(); - struct.permissions = new HashMap(2*_map286.size); - String _key287; - LecturePermissions _val288; - for (int _i289 = 0; _i289 < _map286.size; ++_i289) - { - _key287 = iprot.readString(); - _val288 = new LecturePermissions(); - _val288.read(iprot); - struct.permissions.put(_key287, _val288); - } - iprot.readMapEnd(); - } - struct.setPermissionsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -48772,7 +50012,7 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -48786,35 +50026,22 @@ public class SatelliteServer { oprot.writeString(struct.lectureId); oprot.writeFieldEnd(); } - if (struct.permissions != null) { - oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); - for (Map.Entry _iter290 : struct.permissions.entrySet()) - { - oprot.writeString(_iter290.getKey()); - _iter290.getValue().write(oprot); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class writeLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { - public writeLecturePermissions_argsTupleScheme getScheme() { - return new writeLecturePermissions_argsTupleScheme(); + private static class getLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { + public getLecturePermissions_argsTupleScheme getScheme() { + return new getLecturePermissions_argsTupleScheme(); } } - private static class writeLecturePermissions_argsTupleScheme extends TupleScheme { + private static class getLecturePermissions_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserToken()) { @@ -48823,32 +50050,19 @@ public class SatelliteServer { if (struct.isSetLectureId()) { optionals.set(1); } - if (struct.isSetPermissions()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); + oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetLectureId()) { oprot.writeString(struct.lectureId); } - if (struct.isSetPermissions()) { - { - oprot.writeI32(struct.permissions.size()); - for (Map.Entry _iter291 : struct.permissions.entrySet()) - { - oprot.writeString(_iter291.getKey()); - _iter291.getValue().write(oprot); - } - } - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); @@ -48857,46 +50071,33 @@ public class SatelliteServer { struct.lectureId = iprot.readString(); struct.setLectureIdIsSet(true); } - if (incoming.get(2)) { - { - org.apache.thrift.protocol.TMap _map292 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.permissions = new HashMap(2*_map292.size); - String _key293; - LecturePermissions _val294; - for (int _i295 = 0; _i295 < _map292.size; ++_i295) - { - _key293 = iprot.readString(); - _val294 = new LecturePermissions(); - _val294.read(iprot); - struct.permissions.put(_key293, _val294); - } - } - struct.setPermissionsIsSet(true); - } } } } - public static class writeLecturePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_result"); + public static class getLecturePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_result"); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new writeLecturePermissions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new writeLecturePermissions_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getLecturePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLecturePermissions_resultTupleSchemeFactory()); } + public Map 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"); @@ -48914,6 +50115,8 @@ public class SatelliteServer { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND @@ -48963,6 +50166,10 @@ public class SatelliteServer { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.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, @@ -48970,18 +50177,20 @@ public class SatelliteServer { 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(writeLecturePermissions_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_result.class, metaDataMap); } - public writeLecturePermissions_result() { + public getLecturePermissions_result() { } - public writeLecturePermissions_result( + public getLecturePermissions_result( + Map success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); + this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; @@ -48990,7 +50199,22 @@ public class SatelliteServer { /** * Performs a deep copy on other. */ - public writeLecturePermissions_result(writeLecturePermissions_result other) { + public getLecturePermissions_result(getLecturePermissions_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(other.success.size()); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + LecturePermissions other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + LecturePermissions __this__success_copy_value = new LecturePermissions(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } @@ -49002,22 +50226,58 @@ public class SatelliteServer { } } - public writeLecturePermissions_result deepCopy() { - return new writeLecturePermissions_result(this); + public getLecturePermissions_result deepCopy() { + return new getLecturePermissions_result(this); } @Override public void clear() { + this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, LecturePermissions val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public getLecturePermissions_result setSuccess(Map 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 writeLecturePermissions_result setAuthError(TAuthorizationException authError) { + public getLecturePermissions_result setAuthError(TAuthorizationException authError) { this.authError = authError; return this; } @@ -49041,7 +50301,7 @@ public class SatelliteServer { return this.notFound; } - public writeLecturePermissions_result setNotFound(TNotFoundException notFound) { + public getLecturePermissions_result setNotFound(TNotFoundException notFound) { this.notFound = notFound; return this; } @@ -49065,7 +50325,7 @@ public class SatelliteServer { return this.serverError; } - public writeLecturePermissions_result setServerError(TInvocationException serverError) { + public getLecturePermissions_result setServerError(TInvocationException serverError) { this.serverError = serverError; return this; } @@ -49087,6 +50347,14 @@ public class SatelliteServer { public void setFieldValue(_Fields field, Object value) { switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + case AUTH_ERROR: if (value == null) { unsetAuthError(); @@ -49116,6 +50384,9 @@ public class SatelliteServer { public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + case AUTH_ERROR: return getAuthError(); @@ -49136,6 +50407,8 @@ public class SatelliteServer { } switch (field) { + case SUCCESS: + return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: @@ -49150,15 +50423,24 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof writeLecturePermissions_result) - return this.equals((writeLecturePermissions_result)that); + if (that instanceof getLecturePermissions_result) + return this.equals((getLecturePermissions_result)that); return false; } - public boolean equals(writeLecturePermissions_result that) { + public boolean equals(getLecturePermissions_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) { @@ -49193,6 +50475,11 @@ public class SatelliteServer { public int hashCode() { List list = new ArrayList(); + 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) @@ -49212,13 +50499,23 @@ public class SatelliteServer { } @Override - public int compareTo(writeLecturePermissions_result other) { + public int compareTo(getLecturePermissions_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; @@ -49266,9 +50563,17 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("writeLecturePermissions_result("); + StringBuilder sb = new StringBuilder("getLecturePermissions_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"); @@ -49317,15 +50622,15 @@ public class SatelliteServer { } } - private static class writeLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { - public writeLecturePermissions_resultStandardScheme getScheme() { - return new writeLecturePermissions_resultStandardScheme(); + private static class getLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { + public getLecturePermissions_resultStandardScheme getScheme() { + return new getLecturePermissions_resultStandardScheme(); } } - private static class writeLecturePermissions_resultStandardScheme extends StandardScheme { + private static class getLecturePermissions_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -49335,6 +50640,27 @@ public class SatelliteServer { break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map328 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map328.size); + String _key329; + LecturePermissions _val330; + for (int _i331 = 0; _i331 < _map328.size; ++_i331) + { + _key329 = iprot.readString(); + _val330 = new LecturePermissions(); + _val330.read(iprot); + struct.success.put(_key329, _val330); + } + iprot.readMapEnd(); + } + 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(); @@ -49373,10 +50699,23 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Map.Entry _iter332 : struct.success.entrySet()) + { + oprot.writeString(_iter332.getKey()); + _iter332.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); @@ -49398,28 +50737,41 @@ public class SatelliteServer { } - private static class writeLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { - public writeLecturePermissions_resultTupleScheme getScheme() { - return new writeLecturePermissions_resultTupleScheme(); + private static class getLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { + public getLecturePermissions_resultTupleScheme getScheme() { + return new getLecturePermissions_resultTupleScheme(); } } - private static class writeLecturePermissions_resultTupleScheme extends TupleScheme { + private static class getLecturePermissions_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetAuthError()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetNotFound()) { + if (struct.isSetAuthError()) { optionals.set(1); } - if (struct.isSetServerError()) { + if (struct.isSetNotFound()) { optionals.set(2); } - oprot.writeBitSet(optionals, 3); + if (struct.isSetServerError()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter333 : struct.success.entrySet()) + { + oprot.writeString(_iter333.getKey()); + _iter333.getValue().write(oprot); + } + } + } if (struct.isSetAuthError()) { struct.authError.write(oprot); } @@ -49432,20 +50784,36 @@ public class SatelliteServer { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map334 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map334.size); + String _key335; + LecturePermissions _val336; + for (int _i337 = 0; _i337 < _map334.size; ++_i337) + { + _key335 = iprot.readString(); + _val336 = new LecturePermissions(); + _val336.read(iprot); + struct.success.put(_key335, _val336); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } - if (incoming.get(1)) { + if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); @@ -49455,25 +50823,28 @@ public class SatelliteServer { } - public static class getLecturePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_args"); + public static class setLectureOwner_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLectureOwner_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 LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLecturePermissions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLecturePermissions_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new setLectureOwner_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new setLectureOwner_argsTupleSchemeFactory()); } public String userToken; // required public String lectureId; // required + public String newOwnerId; // 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"), - LECTURE_ID((short)2, "lectureId"); + LECTURE_ID((short)2, "lectureId"), + NEW_OWNER_ID((short)3, "newOwnerId"); private static final Map byName = new HashMap(); @@ -49492,6 +50863,8 @@ public class SatelliteServer { return USER_TOKEN; case 2: // LECTURE_ID return LECTURE_ID; + case 3: // NEW_OWNER_ID + return NEW_OWNER_ID; default: return null; } @@ -49539,49 +50912,57 @@ public class SatelliteServer { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", 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(getLecturePermissions_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_args.class, metaDataMap); } - public getLecturePermissions_args() { + public setLectureOwner_args() { } - public getLecturePermissions_args( + public setLectureOwner_args( String userToken, - String lectureId) + String lectureId, + String newOwnerId) { this(); this.userToken = userToken; this.lectureId = lectureId; + this.newOwnerId = newOwnerId; } /** * Performs a deep copy on other. */ - public getLecturePermissions_args(getLecturePermissions_args other) { + public setLectureOwner_args(setLectureOwner_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetLectureId()) { this.lectureId = other.lectureId; } + if (other.isSetNewOwnerId()) { + this.newOwnerId = other.newOwnerId; + } } - public getLecturePermissions_args deepCopy() { - return new getLecturePermissions_args(this); + public setLectureOwner_args deepCopy() { + return new setLectureOwner_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; + this.newOwnerId = null; } public String getUserToken() { return this.userToken; } - public getLecturePermissions_args setUserToken(String userToken) { + public setLectureOwner_args setUserToken(String userToken) { this.userToken = userToken; return this; } @@ -49605,7 +50986,7 @@ public class SatelliteServer { return this.lectureId; } - public getLecturePermissions_args setLectureId(String lectureId) { + public setLectureOwner_args setLectureId(String lectureId) { this.lectureId = lectureId; return this; } @@ -49625,6 +51006,30 @@ public class SatelliteServer { } } + public String getNewOwnerId() { + return this.newOwnerId; + } + + public setLectureOwner_args setNewOwnerId(String newOwnerId) { + this.newOwnerId = newOwnerId; + return this; + } + + public void unsetNewOwnerId() { + this.newOwnerId = null; + } + + /** Returns true if field newOwnerId is set (has been assigned a value) and false otherwise */ + public boolean isSetNewOwnerId() { + return this.newOwnerId != null; + } + + public void setNewOwnerIdIsSet(boolean value) { + if (!value) { + this.newOwnerId = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_TOKEN: @@ -49643,6 +51048,14 @@ public class SatelliteServer { } break; + case NEW_OWNER_ID: + if (value == null) { + unsetNewOwnerId(); + } else { + setNewOwnerId((String)value); + } + break; + } } @@ -49654,6 +51067,9 @@ public class SatelliteServer { case LECTURE_ID: return getLectureId(); + case NEW_OWNER_ID: + return getNewOwnerId(); + } throw new IllegalStateException(); } @@ -49669,6 +51085,8 @@ public class SatelliteServer { return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); + case NEW_OWNER_ID: + return isSetNewOwnerId(); } throw new IllegalStateException(); } @@ -49677,12 +51095,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLecturePermissions_args) - return this.equals((getLecturePermissions_args)that); + if (that instanceof setLectureOwner_args) + return this.equals((setLectureOwner_args)that); return false; } - public boolean equals(getLecturePermissions_args that) { + public boolean equals(setLectureOwner_args that) { if (that == null) return false; @@ -49704,6 +51122,15 @@ public class SatelliteServer { return false; } + boolean this_present_newOwnerId = true && this.isSetNewOwnerId(); + boolean that_present_newOwnerId = true && that.isSetNewOwnerId(); + if (this_present_newOwnerId || that_present_newOwnerId) { + if (!(this_present_newOwnerId && that_present_newOwnerId)) + return false; + if (!this.newOwnerId.equals(that.newOwnerId)) + return false; + } + return true; } @@ -49721,11 +51148,16 @@ public class SatelliteServer { if (present_lectureId) list.add(lectureId); + boolean present_newOwnerId = true && (isSetNewOwnerId()); + list.add(present_newOwnerId); + if (present_newOwnerId) + list.add(newOwnerId); + return list.hashCode(); } @Override - public int compareTo(getLecturePermissions_args other) { + public int compareTo(setLectureOwner_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -49752,6 +51184,16 @@ public class SatelliteServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetNewOwnerId()).compareTo(other.isSetNewOwnerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNewOwnerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOwnerId, other.newOwnerId); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -49769,7 +51211,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLecturePermissions_args("); + StringBuilder sb = new StringBuilder("setLectureOwner_args("); boolean first = true; sb.append("userToken:"); @@ -49787,6 +51229,14 @@ public class SatelliteServer { sb.append(this.lectureId); } first = false; + if (!first) sb.append(", "); + sb.append("newOwnerId:"); + if (this.newOwnerId == null) { + sb.append("null"); + } else { + sb.append(this.newOwnerId); + } + first = false; sb.append(")"); return sb.toString(); } @@ -49812,15 +51262,15 @@ public class SatelliteServer { } } - private static class getLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { - public getLecturePermissions_argsStandardScheme getScheme() { - return new getLecturePermissions_argsStandardScheme(); + private static class setLectureOwner_argsStandardSchemeFactory implements SchemeFactory { + public setLectureOwner_argsStandardScheme getScheme() { + return new setLectureOwner_argsStandardScheme(); } } - private static class getLecturePermissions_argsStandardScheme extends StandardScheme { + private static class setLectureOwner_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -49846,6 +51296,14 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 3: // NEW_OWNER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.newOwnerId = iprot.readString(); + struct.setNewOwnerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -49857,7 +51315,7 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -49871,22 +51329,27 @@ public class SatelliteServer { oprot.writeString(struct.lectureId); oprot.writeFieldEnd(); } + if (struct.newOwnerId != null) { + oprot.writeFieldBegin(NEW_OWNER_ID_FIELD_DESC); + oprot.writeString(struct.newOwnerId); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class getLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { - public getLecturePermissions_argsTupleScheme getScheme() { - return new getLecturePermissions_argsTupleScheme(); + private static class setLectureOwner_argsTupleSchemeFactory implements SchemeFactory { + public setLectureOwner_argsTupleScheme getScheme() { + return new setLectureOwner_argsTupleScheme(); } } - private static class getLecturePermissions_argsTupleScheme extends TupleScheme { + private static class setLectureOwner_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserToken()) { @@ -49895,19 +51358,25 @@ public class SatelliteServer { if (struct.isSetLectureId()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetNewOwnerId()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetLectureId()) { oprot.writeString(struct.lectureId); } + if (struct.isSetNewOwnerId()) { + oprot.writeString(struct.newOwnerId); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); @@ -49916,33 +51385,34 @@ public class SatelliteServer { struct.lectureId = iprot.readString(); struct.setLectureIdIsSet(true); } + if (incoming.get(2)) { + struct.newOwnerId = iprot.readString(); + struct.setNewOwnerIdIsSet(true); + } } } } - public static class getLecturePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_result"); + public static class setLectureOwner_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLectureOwner_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new getLecturePermissions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLecturePermissions_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new setLectureOwner_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new setLectureOwner_resultTupleSchemeFactory()); } - public Map 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"); @@ -49960,8 +51430,6 @@ public class SatelliteServer { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND @@ -50011,10 +51479,6 @@ public class SatelliteServer { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.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, @@ -50022,20 +51486,18 @@ public class SatelliteServer { 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(getLecturePermissions_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_result.class, metaDataMap); } - public getLecturePermissions_result() { + public setLectureOwner_result() { } - public getLecturePermissions_result( - Map success, + public setLectureOwner_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); - this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; @@ -50044,22 +51506,7 @@ public class SatelliteServer { /** * Performs a deep copy on other. */ - public getLecturePermissions_result(getLecturePermissions_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(other.success.size()); - for (Map.Entry other_element : other.success.entrySet()) { - - String other_element_key = other_element.getKey(); - LecturePermissions other_element_value = other_element.getValue(); - - String __this__success_copy_key = other_element_key; - - LecturePermissions __this__success_copy_value = new LecturePermissions(other_element_value); - - __this__success.put(__this__success_copy_key, __this__success_copy_value); - } - this.success = __this__success; - } + public setLectureOwner_result(setLectureOwner_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } @@ -50071,58 +51518,22 @@ public class SatelliteServer { } } - public getLecturePermissions_result deepCopy() { - return new getLecturePermissions_result(this); + public setLectureOwner_result deepCopy() { + return new setLectureOwner_result(this); } @Override public void clear() { - this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public void putToSuccess(String key, LecturePermissions val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); - } - - public Map getSuccess() { - return this.success; - } - - public getLecturePermissions_result setSuccess(Map 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 getLecturePermissions_result setAuthError(TAuthorizationException authError) { + public setLectureOwner_result setAuthError(TAuthorizationException authError) { this.authError = authError; return this; } @@ -50146,7 +51557,7 @@ public class SatelliteServer { return this.notFound; } - public getLecturePermissions_result setNotFound(TNotFoundException notFound) { + public setLectureOwner_result setNotFound(TNotFoundException notFound) { this.notFound = notFound; return this; } @@ -50170,7 +51581,7 @@ public class SatelliteServer { return this.serverError; } - public getLecturePermissions_result setServerError(TInvocationException serverError) { + public setLectureOwner_result setServerError(TInvocationException serverError) { this.serverError = serverError; return this; } @@ -50192,14 +51603,6 @@ public class SatelliteServer { public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Map)value); - } - break; - case AUTH_ERROR: if (value == null) { unsetAuthError(); @@ -50229,9 +51632,6 @@ public class SatelliteServer { public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - case AUTH_ERROR: return getAuthError(); @@ -50252,8 +51652,6 @@ public class SatelliteServer { } switch (field) { - case SUCCESS: - return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: @@ -50268,24 +51666,15 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof getLecturePermissions_result) - return this.equals((getLecturePermissions_result)that); + if (that instanceof setLectureOwner_result) + return this.equals((setLectureOwner_result)that); return false; } - public boolean equals(getLecturePermissions_result that) { + public boolean equals(setLectureOwner_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) { @@ -50320,11 +51709,6 @@ public class SatelliteServer { public int hashCode() { List list = new ArrayList(); - 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) @@ -50344,23 +51728,13 @@ public class SatelliteServer { } @Override - public int compareTo(getLecturePermissions_result other) { + public int compareTo(setLectureOwner_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; @@ -50408,17 +51782,9 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("getLecturePermissions_result("); + StringBuilder sb = new StringBuilder("setLectureOwner_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"); @@ -50467,15 +51833,15 @@ public class SatelliteServer { } } - private static class getLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { - public getLecturePermissions_resultStandardScheme getScheme() { - return new getLecturePermissions_resultStandardScheme(); + private static class setLectureOwner_resultStandardSchemeFactory implements SchemeFactory { + public setLectureOwner_resultStandardScheme getScheme() { + return new setLectureOwner_resultStandardScheme(); } } - private static class getLecturePermissions_resultStandardScheme extends StandardScheme { + private static class setLectureOwner_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -50485,27 +51851,6 @@ public class SatelliteServer { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { - { - org.apache.thrift.protocol.TMap _map296 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map296.size); - String _key297; - LecturePermissions _val298; - for (int _i299 = 0; _i299 < _map296.size; ++_i299) - { - _key297 = iprot.readString(); - _val298 = new LecturePermissions(); - _val298.read(iprot); - struct.success.put(_key297, _val298); - } - iprot.readMapEnd(); - } - 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(); @@ -50544,23 +51889,10 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry _iter300 : struct.success.entrySet()) - { - oprot.writeString(_iter300.getKey()); - _iter300.getValue().write(oprot); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); @@ -50582,41 +51914,28 @@ public class SatelliteServer { } - private static class getLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { - public getLecturePermissions_resultTupleScheme getScheme() { - return new getLecturePermissions_resultTupleScheme(); + private static class setLectureOwner_resultTupleSchemeFactory implements SchemeFactory { + public setLectureOwner_resultTupleScheme getScheme() { + return new setLectureOwner_resultTupleScheme(); } } - private static class getLecturePermissions_resultTupleScheme extends TupleScheme { + private static class setLectureOwner_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_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); + optionals.set(0); } if (struct.isSetNotFound()) { - optionals.set(2); + optionals.set(1); } if (struct.isSetServerError()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (Map.Entry _iter301 : struct.success.entrySet()) - { - oprot.writeString(_iter301.getKey()); - _iter301.getValue().write(oprot); - } - } + optionals.set(2); } + oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } @@ -50629,36 +51948,20 @@ public class SatelliteServer { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - { - org.apache.thrift.protocol.TMap _map302 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap(2*_map302.size); - String _key303; - LecturePermissions _val304; - for (int _i305 = 0; _i305 < _map302.size; ++_i305) - { - _key303 = iprot.readString(); - _val304 = new LecturePermissions(); - _val304.read(iprot); - struct.success.put(_key303, _val304); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); @@ -50668,28 +51971,22 @@ public class SatelliteServer { } - public static class setLectureOwner_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLectureOwner_args"); + public static class getPredefinedData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPredefinedData_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 LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new setLectureOwner_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setLectureOwner_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getPredefinedData_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getPredefinedData_argsTupleSchemeFactory()); } public String userToken; // required - public String lectureId; // required - public String newOwnerId; // 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"), - LECTURE_ID((short)2, "lectureId"), - NEW_OWNER_ID((short)3, "newOwnerId"); + USER_TOKEN((short)1, "userToken"); private static final Map byName = new HashMap(); @@ -50706,10 +52003,6 @@ public class SatelliteServer { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; - case 2: // LECTURE_ID - return LECTURE_ID; - case 3: // NEW_OWNER_ID - return NEW_OWNER_ID; default: return null; } @@ -50755,59 +52048,43 @@ public class SatelliteServer { 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.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); - tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", 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(setLectureOwner_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_args.class, metaDataMap); } - public setLectureOwner_args() { + public getPredefinedData_args() { } - public setLectureOwner_args( - String userToken, - String lectureId, - String newOwnerId) + public getPredefinedData_args( + String userToken) { this(); this.userToken = userToken; - this.lectureId = lectureId; - this.newOwnerId = newOwnerId; } /** * Performs a deep copy on other. */ - public setLectureOwner_args(setLectureOwner_args other) { + public getPredefinedData_args(getPredefinedData_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } - if (other.isSetLectureId()) { - this.lectureId = other.lectureId; - } - if (other.isSetNewOwnerId()) { - this.newOwnerId = other.newOwnerId; - } } - public setLectureOwner_args deepCopy() { - return new setLectureOwner_args(this); + public getPredefinedData_args deepCopy() { + return new getPredefinedData_args(this); } @Override public void clear() { this.userToken = null; - this.lectureId = null; - this.newOwnerId = null; } public String getUserToken() { return this.userToken; } - public setLectureOwner_args setUserToken(String userToken) { + public getPredefinedData_args setUserToken(String userToken) { this.userToken = userToken; return this; } @@ -50827,54 +52104,6 @@ public class SatelliteServer { } } - public String getLectureId() { - return this.lectureId; - } - - public setLectureOwner_args setLectureId(String lectureId) { - this.lectureId = lectureId; - return this; - } - - public void unsetLectureId() { - this.lectureId = null; - } - - /** Returns true if field lectureId is set (has been assigned a value) and false otherwise */ - public boolean isSetLectureId() { - return this.lectureId != null; - } - - public void setLectureIdIsSet(boolean value) { - if (!value) { - this.lectureId = null; - } - } - - public String getNewOwnerId() { - return this.newOwnerId; - } - - public setLectureOwner_args setNewOwnerId(String newOwnerId) { - this.newOwnerId = newOwnerId; - return this; - } - - public void unsetNewOwnerId() { - this.newOwnerId = null; - } - - /** Returns true if field newOwnerId is set (has been assigned a value) and false otherwise */ - public boolean isSetNewOwnerId() { - return this.newOwnerId != null; - } - - public void setNewOwnerIdIsSet(boolean value) { - if (!value) { - this.newOwnerId = null; - } - } - public void setFieldValue(_Fields field, Object value) { switch (field) { case USER_TOKEN: @@ -50885,22 +52114,6 @@ public class SatelliteServer { } break; - case LECTURE_ID: - if (value == null) { - unsetLectureId(); - } else { - setLectureId((String)value); - } - break; - - case NEW_OWNER_ID: - if (value == null) { - unsetNewOwnerId(); - } else { - setNewOwnerId((String)value); - } - break; - } } @@ -50909,12 +52122,6 @@ public class SatelliteServer { case USER_TOKEN: return getUserToken(); - case LECTURE_ID: - return getLectureId(); - - case NEW_OWNER_ID: - return getNewOwnerId(); - } throw new IllegalStateException(); } @@ -50928,10 +52135,6 @@ public class SatelliteServer { switch (field) { case USER_TOKEN: return isSetUserToken(); - case LECTURE_ID: - return isSetLectureId(); - case NEW_OWNER_ID: - return isSetNewOwnerId(); } throw new IllegalStateException(); } @@ -50940,12 +52143,12 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof setLectureOwner_args) - return this.equals((setLectureOwner_args)that); + if (that instanceof getPredefinedData_args) + return this.equals((getPredefinedData_args)that); return false; } - public boolean equals(setLectureOwner_args that) { + public boolean equals(getPredefinedData_args that) { if (that == null) return false; @@ -50958,24 +52161,6 @@ public class SatelliteServer { return false; } - boolean this_present_lectureId = true && this.isSetLectureId(); - boolean that_present_lectureId = true && that.isSetLectureId(); - if (this_present_lectureId || that_present_lectureId) { - if (!(this_present_lectureId && that_present_lectureId)) - return false; - if (!this.lectureId.equals(that.lectureId)) - return false; - } - - boolean this_present_newOwnerId = true && this.isSetNewOwnerId(); - boolean that_present_newOwnerId = true && that.isSetNewOwnerId(); - if (this_present_newOwnerId || that_present_newOwnerId) { - if (!(this_present_newOwnerId && that_present_newOwnerId)) - return false; - if (!this.newOwnerId.equals(that.newOwnerId)) - return false; - } - return true; } @@ -50988,21 +52173,11 @@ public class SatelliteServer { if (present_userToken) list.add(userToken); - boolean present_lectureId = true && (isSetLectureId()); - list.add(present_lectureId); - if (present_lectureId) - list.add(lectureId); - - boolean present_newOwnerId = true && (isSetNewOwnerId()); - list.add(present_newOwnerId); - if (present_newOwnerId) - list.add(newOwnerId); - return list.hashCode(); } @Override - public int compareTo(setLectureOwner_args other) { + public int compareTo(getPredefinedData_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -51019,26 +52194,6 @@ public class SatelliteServer { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLectureId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNewOwnerId()).compareTo(other.isSetNewOwnerId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNewOwnerId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOwnerId, other.newOwnerId); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -51056,7 +52211,7 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("setLectureOwner_args("); + StringBuilder sb = new StringBuilder("getPredefinedData_args("); boolean first = true; sb.append("userToken:"); @@ -51066,22 +52221,6 @@ public class SatelliteServer { sb.append(this.userToken); } first = false; - if (!first) sb.append(", "); - sb.append("lectureId:"); - if (this.lectureId == null) { - sb.append("null"); - } else { - sb.append(this.lectureId); - } - first = false; - if (!first) sb.append(", "); - sb.append("newOwnerId:"); - if (this.newOwnerId == null) { - sb.append("null"); - } else { - sb.append(this.newOwnerId); - } - first = false; sb.append(")"); return sb.toString(); } @@ -51107,15 +52246,15 @@ public class SatelliteServer { } } - private static class setLectureOwner_argsStandardSchemeFactory implements SchemeFactory { - public setLectureOwner_argsStandardScheme getScheme() { - return new setLectureOwner_argsStandardScheme(); + private static class getPredefinedData_argsStandardSchemeFactory implements SchemeFactory { + public getPredefinedData_argsStandardScheme getScheme() { + return new getPredefinedData_argsStandardScheme(); } } - private static class setLectureOwner_argsStandardScheme extends StandardScheme { + private static class getPredefinedData_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -51133,22 +52272,6 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // LECTURE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.lectureId = iprot.readString(); - struct.setLectureIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NEW_OWNER_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.newOwnerId = iprot.readString(); - struct.setNewOwnerIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -51160,7 +52283,7 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getPredefinedData_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -51169,98 +52292,68 @@ public class SatelliteServer { oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } - if (struct.lectureId != null) { - oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); - oprot.writeString(struct.lectureId); - oprot.writeFieldEnd(); - } - if (struct.newOwnerId != null) { - oprot.writeFieldBegin(NEW_OWNER_ID_FIELD_DESC); - oprot.writeString(struct.newOwnerId); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class setLectureOwner_argsTupleSchemeFactory implements SchemeFactory { - public setLectureOwner_argsTupleScheme getScheme() { - return new setLectureOwner_argsTupleScheme(); + private static class getPredefinedData_argsTupleSchemeFactory implements SchemeFactory { + public getPredefinedData_argsTupleScheme getScheme() { + return new getPredefinedData_argsTupleScheme(); } } - private static class setLectureOwner_argsTupleScheme extends TupleScheme { + private static class getPredefinedData_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } - if (struct.isSetLectureId()) { - optionals.set(1); - } - if (struct.isSetNewOwnerId()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); + oprot.writeBitSet(optionals, 1); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } - if (struct.isSetLectureId()) { - oprot.writeString(struct.lectureId); - } - if (struct.isSetNewOwnerId()) { - oprot.writeString(struct.newOwnerId); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } - if (incoming.get(1)) { - struct.lectureId = iprot.readString(); - struct.setLectureIdIsSet(true); - } - if (incoming.get(2)) { - struct.newOwnerId = iprot.readString(); - struct.setNewOwnerIdIsSet(true); - } } } } - public static class setLectureOwner_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLectureOwner_result"); + public static class getPredefinedData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPredefinedData_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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new setLectureOwner_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setLectureOwner_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getPredefinedData_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getPredefinedData_resultTupleSchemeFactory()); } + public PredefinedData 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"); + SERVER_ERROR((short)2, "serverError"); private static final Map byName = new HashMap(); @@ -51275,11 +52368,11 @@ public class SatelliteServer { */ 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 + case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; @@ -51324,101 +52417,101 @@ public class SatelliteServer { 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, PredefinedData.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(setLectureOwner_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_result.class, metaDataMap); } - public setLectureOwner_result() { + public getPredefinedData_result() { } - public setLectureOwner_result( + public getPredefinedData_result( + PredefinedData 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 other. */ - public setLectureOwner_result(setLectureOwner_result other) { + public getPredefinedData_result(getPredefinedData_result other) { + if (other.isSetSuccess()) { + this.success = new PredefinedData(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 setLectureOwner_result deepCopy() { - return new setLectureOwner_result(this); + public getPredefinedData_result deepCopy() { + return new getPredefinedData_result(this); } @Override public void clear() { + this.success = null; this.authError = null; - this.notFound = null; this.serverError = null; } - public TAuthorizationException getAuthError() { - return this.authError; + public PredefinedData getSuccess() { + return this.success; } - public setLectureOwner_result setAuthError(TAuthorizationException authError) { - this.authError = authError; + public getPredefinedData_result setSuccess(PredefinedData success) { + this.success = success; return this; } - public void unsetAuthError() { - this.authError = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field authError is set (has been assigned a value) and false otherwise */ - public boolean isSetAuthError() { - return this.authError != 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 setAuthErrorIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.authError = null; + this.success = null; } } - public TNotFoundException getNotFound() { - return this.notFound; + public TAuthorizationException getAuthError() { + return this.authError; } - public setLectureOwner_result setNotFound(TNotFoundException notFound) { - this.notFound = notFound; + public getPredefinedData_result setAuthError(TAuthorizationException authError) { + this.authError = authError; return this; } - public void unsetNotFound() { - this.notFound = null; + public void unsetAuthError() { + this.authError = null; } - /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ - public boolean isSetNotFound() { - return this.notFound != 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 setNotFoundIsSet(boolean value) { + public void setAuthErrorIsSet(boolean value) { if (!value) { - this.notFound = null; + this.authError = null; } } @@ -51426,7 +52519,7 @@ public class SatelliteServer { return this.serverError; } - public setLectureOwner_result setServerError(TInvocationException serverError) { + public getPredefinedData_result setServerError(TInvocationException serverError) { this.serverError = serverError; return this; } @@ -51448,19 +52541,19 @@ public class SatelliteServer { public void setFieldValue(_Fields field, Object value) { switch (field) { - case AUTH_ERROR: + case SUCCESS: if (value == null) { - unsetAuthError(); + unsetSuccess(); } else { - setAuthError((TAuthorizationException)value); + setSuccess((PredefinedData)value); } break; - case NOT_FOUND: + case AUTH_ERROR: if (value == null) { - unsetNotFound(); + unsetAuthError(); } else { - setNotFound((TNotFoundException)value); + setAuthError((TAuthorizationException)value); } break; @@ -51477,12 +52570,12 @@ public class SatelliteServer { 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(); @@ -51497,10 +52590,10 @@ public class SatelliteServer { } switch (field) { + case SUCCESS: + return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); - case NOT_FOUND: - return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } @@ -51511,15 +52604,24 @@ public class SatelliteServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof setLectureOwner_result) - return this.equals((setLectureOwner_result)that); + if (that instanceof getPredefinedData_result) + return this.equals((getPredefinedData_result)that); return false; } - public boolean equals(setLectureOwner_result that) { + public boolean equals(getPredefinedData_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) { @@ -51529,15 +52631,6 @@ public class SatelliteServer { 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) { @@ -51554,16 +52647,16 @@ public class SatelliteServer { public int hashCode() { List list = new ArrayList(); + 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) @@ -51573,29 +52666,29 @@ public class SatelliteServer { } @Override - public int compareTo(setLectureOwner_result other) { + public int compareTo(getPredefinedData_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetAuthError()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound()); + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); if (lastComparison != 0) { return lastComparison; } - if (isSetNotFound()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); if (lastComparison != 0) { return lastComparison; } @@ -51627,22 +52720,22 @@ public class SatelliteServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("setLectureOwner_result("); + StringBuilder sb = new StringBuilder("getPredefinedData_result("); boolean first = true; - sb.append("authError:"); - if (this.authError == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.authError); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("notFound:"); - if (this.notFound == null) { + sb.append("authError:"); + if (this.authError == null) { sb.append("null"); } else { - sb.append(this.notFound); + sb.append(this.authError); } first = false; if (!first) sb.append(", "); @@ -51660,6 +52753,9 @@ public class SatelliteServer { 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 { @@ -51678,15 +52774,15 @@ public class SatelliteServer { } } - private static class setLectureOwner_resultStandardSchemeFactory implements SchemeFactory { - public setLectureOwner_resultStandardScheme getScheme() { - return new setLectureOwner_resultStandardScheme(); + private static class getPredefinedData_resultStandardSchemeFactory implements SchemeFactory { + public getPredefinedData_resultStandardScheme getScheme() { + return new getPredefinedData_resultStandardScheme(); } } - private static class setLectureOwner_resultStandardScheme extends StandardScheme { + private static class getPredefinedData_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -51696,25 +52792,25 @@ public class SatelliteServer { break; } switch (schemeField.id) { - case 1: // AUTH_ERROR + case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.authError = new TAuthorizationException(); - struct.authError.read(iprot); - struct.setAuthErrorIsSet(true); + struct.success = new PredefinedData(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // NOT_FOUND + case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.notFound = new TNotFoundException(); - struct.notFound.read(iprot); - struct.setNotFoundIsSet(true); + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // SERVER_ERROR + case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); @@ -51734,20 +52830,20 @@ public class SatelliteServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getPredefinedData_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); @@ -51759,53 +52855,53 @@ public class SatelliteServer { } - private static class setLectureOwner_resultTupleSchemeFactory implements SchemeFactory { - public setLectureOwner_resultTupleScheme getScheme() { - return new setLectureOwner_resultTupleScheme(); + private static class getPredefinedData_resultTupleSchemeFactory implements SchemeFactory { + public getPredefinedData_resultTupleScheme getScheme() { + return new getPredefinedData_resultTupleScheme(); } } - private static class setLectureOwner_resultTupleScheme extends TupleScheme { + private static class getPredefinedData_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetAuthError()) { + if (struct.isSetSuccess()) { optionals.set(0); } - if (struct.isSetNotFound()) { + if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); + 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, setLectureOwner_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { + struct.success = new PredefinedData(); + 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(1)) { - struct.notFound = new TNotFoundException(); - struct.notFound.read(iprot); - struct.setNotFoundIsSet(true); - } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index 02fb1f5..0d82503 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -249,11 +249,19 @@ struct NetShare { 6: optional string mountpoint, 2: optional string username, 3: optional string password, + 7: optional i32 shareId, } struct LdapFilter { 1: string attribute, 2: string value, + 3: optional i32 filterId, + 4: optional string title, +} + +struct PredefinedData { + 1: list netShares, + 2: list ldapFilter, } // Write lecture to sat. if optional fields are not set or null, their value stays unchanged @@ -614,6 +622,11 @@ service SatelliteServer { // Set new owner of lecture void setLectureOwner(1: Token userToken, 2: UUID lectureId 3: UUID newOwnerId) throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInvocationException serverError), + + // Get predefined stuff + PredefinedData getPredefinedData(1: Token userToken) + throws (1:TAuthorizationException authError, 2:TInvocationException serverError), + } // Central master server -- cgit v1.2.3-55-g7522