summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-06-09 18:57:14 +0200
committerSimon Rettberg2015-06-09 18:57:14 +0200
commitc121d65bb33a42c324b746f6dc5300aee68487dd (patch)
treefd72496dcf56338af387ff0345636e2d77b6ff86
parentChanges for Dozmod v1.1 (diff)
downloadmaster-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.tar.gz
master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.tar.xz
master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.zip
Unified thrift definitions for master and satellite
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/AuthenticationError.java60
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java48
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java642
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java1004
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java45
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java2149
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java668
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java1362
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java2067
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java1150
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java480
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java480
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java1768
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java1763
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java1267
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java16214
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java738
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Organization.java737
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java537
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java27610
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java388
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java588
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java48
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TAuthenticationException.java504
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java504
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TImageDataException.java504
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java280
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java280
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java388
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java580
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/UploadStatus.java399
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java788
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java488
-rw-r--r--src/main/java/org/openslx/thrifthelper/ThriftManager.java30
-rw-r--r--src/main/thrift/bwlp.thrift365
35 files changed, 66812 insertions, 111 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/AuthenticationError.java b/src/main/java/org/openslx/bwlp/thrift/iface/AuthenticationError.java
new file mode 100644
index 0000000..9792787
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/AuthenticationError.java
@@ -0,0 +1,60 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum AuthenticationError implements org.apache.thrift.TEnum {
+ GENERIC_ERROR(0),
+ INVALID_CREDENTIALS(1),
+ ACCOUNT_SUSPENDED(2),
+ INVALID_ORGANIZATION(3),
+ INVALID_KEY(4),
+ CHALLENGE_FAILED(5),
+ BANNED_NETWORK(6);
+
+ private final int value;
+
+ private AuthenticationError(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static AuthenticationError findByValue(int value) {
+ switch (value) {
+ case 0:
+ return GENERIC_ERROR;
+ case 1:
+ return INVALID_CREDENTIALS;
+ case 2:
+ return ACCOUNT_SUSPENDED;
+ case 3:
+ return INVALID_ORGANIZATION;
+ case 4:
+ return INVALID_KEY;
+ case 5:
+ return CHALLENGE_FAILED;
+ case 6:
+ return BANNED_NETWORK;
+ default:
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java b/src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java
new file mode 100644
index 0000000..022a697
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java
@@ -0,0 +1,48 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum AuthorizationError implements org.apache.thrift.TEnum {
+ GENERIC_ERROR(0),
+ NOT_AUTHENTICATED(1),
+ NO_PERMISSION(2);
+
+ private final int value;
+
+ private AuthorizationError(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static AuthorizationError findByValue(int value) {
+ switch (value) {
+ case 0:
+ return GENERIC_ERROR;
+ case 1:
+ return NOT_AUTHENTICATED;
+ case 2:
+ return NO_PERMISSION;
+ default:
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java
new file mode 100644
index 0000000..21d8270
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java
@@ -0,0 +1,642 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionData, ClientSessionData._Fields>, java.io.Serializable, Cloneable, Comparable<ClientSessionData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClientSessionData");
+
+ private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authToken", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField SATELLITES_FIELD_DESC = new org.apache.thrift.protocol.TField("satellites", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ClientSessionDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ClientSessionDataTupleSchemeFactory());
+ }
+
+ public String sessionId; // required
+ public String authToken; // required
+ public List<Satellite> satellites; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SESSION_ID((short)1, "sessionId"),
+ AUTH_TOKEN((short)2, "authToken"),
+ SATELLITES((short)3, "satellites");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SESSION_ID
+ return SESSION_ID;
+ case 2: // AUTH_TOKEN
+ return AUTH_TOKEN;
+ case 3: // SATELLITES
+ return SATELLITES;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.SATELLITES, new org.apache.thrift.meta_data.FieldMetaData("satellites", 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, Satellite.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClientSessionData.class, metaDataMap);
+ }
+
+ public ClientSessionData() {
+ }
+
+ public ClientSessionData(
+ String sessionId,
+ String authToken,
+ List<Satellite> satellites)
+ {
+ this();
+ this.sessionId = sessionId;
+ this.authToken = authToken;
+ this.satellites = satellites;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ClientSessionData(ClientSessionData other) {
+ if (other.isSetSessionId()) {
+ this.sessionId = other.sessionId;
+ }
+ if (other.isSetAuthToken()) {
+ this.authToken = other.authToken;
+ }
+ if (other.isSetSatellites()) {
+ List<Satellite> __this__satellites = new ArrayList<Satellite>(other.satellites.size());
+ for (Satellite other_element : other.satellites) {
+ __this__satellites.add(new Satellite(other_element));
+ }
+ this.satellites = __this__satellites;
+ }
+ }
+
+ public ClientSessionData deepCopy() {
+ return new ClientSessionData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.sessionId = null;
+ this.authToken = null;
+ this.satellites = null;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public ClientSessionData setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ public void unsetSessionId() {
+ this.sessionId = null;
+ }
+
+ /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetSessionId() {
+ return this.sessionId != null;
+ }
+
+ public void setSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.sessionId = null;
+ }
+ }
+
+ public String getAuthToken() {
+ return this.authToken;
+ }
+
+ public ClientSessionData setAuthToken(String authToken) {
+ this.authToken = authToken;
+ return this;
+ }
+
+ public void unsetAuthToken() {
+ this.authToken = null;
+ }
+
+ /** Returns true if field authToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthToken() {
+ return this.authToken != null;
+ }
+
+ public void setAuthTokenIsSet(boolean value) {
+ if (!value) {
+ this.authToken = null;
+ }
+ }
+
+ public int getSatellitesSize() {
+ return (this.satellites == null) ? 0 : this.satellites.size();
+ }
+
+ public java.util.Iterator<Satellite> getSatellitesIterator() {
+ return (this.satellites == null) ? null : this.satellites.iterator();
+ }
+
+ public void addToSatellites(Satellite elem) {
+ if (this.satellites == null) {
+ this.satellites = new ArrayList<Satellite>();
+ }
+ this.satellites.add(elem);
+ }
+
+ public List<Satellite> getSatellites() {
+ return this.satellites;
+ }
+
+ public ClientSessionData setSatellites(List<Satellite> satellites) {
+ this.satellites = satellites;
+ return this;
+ }
+
+ public void unsetSatellites() {
+ this.satellites = null;
+ }
+
+ /** Returns true if field satellites is set (has been assigned a value) and false otherwise */
+ public boolean isSetSatellites() {
+ return this.satellites != null;
+ }
+
+ public void setSatellitesIsSet(boolean value) {
+ if (!value) {
+ this.satellites = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SESSION_ID:
+ if (value == null) {
+ unsetSessionId();
+ } else {
+ setSessionId((String)value);
+ }
+ break;
+
+ case AUTH_TOKEN:
+ if (value == null) {
+ unsetAuthToken();
+ } else {
+ setAuthToken((String)value);
+ }
+ break;
+
+ case SATELLITES:
+ if (value == null) {
+ unsetSatellites();
+ } else {
+ setSatellites((List<Satellite>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SESSION_ID:
+ return getSessionId();
+
+ case AUTH_TOKEN:
+ return getAuthToken();
+
+ case SATELLITES:
+ return getSatellites();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SESSION_ID:
+ return isSetSessionId();
+ case AUTH_TOKEN:
+ return isSetAuthToken();
+ case SATELLITES:
+ return isSetSatellites();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ClientSessionData)
+ return this.equals((ClientSessionData)that);
+ return false;
+ }
+
+ public boolean equals(ClientSessionData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_sessionId = true && this.isSetSessionId();
+ boolean that_present_sessionId = true && that.isSetSessionId();
+ if (this_present_sessionId || that_present_sessionId) {
+ if (!(this_present_sessionId && that_present_sessionId))
+ return false;
+ if (!this.sessionId.equals(that.sessionId))
+ return false;
+ }
+
+ boolean this_present_authToken = true && this.isSetAuthToken();
+ boolean that_present_authToken = true && that.isSetAuthToken();
+ if (this_present_authToken || that_present_authToken) {
+ if (!(this_present_authToken && that_present_authToken))
+ return false;
+ if (!this.authToken.equals(that.authToken))
+ return false;
+ }
+
+ boolean this_present_satellites = true && this.isSetSatellites();
+ boolean that_present_satellites = true && that.isSetSatellites();
+ if (this_present_satellites || that_present_satellites) {
+ if (!(this_present_satellites && that_present_satellites))
+ return false;
+ if (!this.satellites.equals(that.satellites))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ClientSessionData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSatellites()).compareTo(other.isSetSatellites());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSatellites()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.satellites, other.satellites);
+ 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("ClientSessionData(");
+ boolean first = true;
+
+ sb.append("sessionId:");
+ if (this.sessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authToken:");
+ if (this.authToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authToken);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("satellites:");
+ if (this.satellites == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.satellites);
+ }
+ 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 ClientSessionDataStandardSchemeFactory implements SchemeFactory {
+ public ClientSessionDataStandardScheme getScheme() {
+ return new ClientSessionDataStandardScheme();
+ }
+ }
+
+ private static class ClientSessionDataStandardScheme extends StandardScheme<ClientSessionData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ClientSessionData struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // AUTH_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.authToken = iprot.readString();
+ struct.setAuthTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SATELLITES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
+ struct.satellites = new ArrayList<Satellite>(_list16.size);
+ for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+ {
+ Satellite _elem18;
+ _elem18 = new Satellite();
+ _elem18.read(iprot);
+ struct.satellites.add(_elem18);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSatellitesIsSet(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, ClientSessionData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sessionId != null) {
+ oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.sessionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authToken != null) {
+ oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.authToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.satellites != null) {
+ oprot.writeFieldBegin(SATELLITES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.satellites.size()));
+ for (Satellite _iter19 : struct.satellites)
+ {
+ _iter19.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ClientSessionDataTupleSchemeFactory implements SchemeFactory {
+ public ClientSessionDataTupleScheme getScheme() {
+ return new ClientSessionDataTupleScheme();
+ }
+ }
+
+ private static class ClientSessionDataTupleScheme extends TupleScheme<ClientSessionData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ClientSessionData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthToken()) {
+ optionals.set(1);
+ }
+ if (struct.isSetSatellites()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSessionId()) {
+ oprot.writeString(struct.sessionId);
+ }
+ if (struct.isSetAuthToken()) {
+ oprot.writeString(struct.authToken);
+ }
+ if (struct.isSetSatellites()) {
+ {
+ oprot.writeI32(struct.satellites.size());
+ for (Satellite _iter20 : struct.satellites)
+ {
+ _iter20.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ClientSessionData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authToken = iprot.readString();
+ struct.setAuthTokenIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.satellites = new ArrayList<Satellite>(_list21.size);
+ for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+ {
+ Satellite _elem23;
+ _elem23 = new Satellite();
+ _elem23.read(iprot);
+ struct.satellites.add(_elem23);
+ }
+ }
+ struct.setSatellitesIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java
new file mode 100644
index 0000000..0a6c3c4
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java
@@ -0,0 +1,1004 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, ImageBaseWrite._Fields>, java.io.Serializable, Cloneable, Comparable<ImageBaseWrite> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageBaseWrite");
+
+ private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("osId", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)4);
+ private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+ private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ImageBaseWriteStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ImageBaseWriteTupleSchemeFactory());
+ }
+
+ public String imageName; // required
+ public String description; // required
+ public int osId; // required
+ public boolean isTemplate; // required
+ public ImagePermissions defaultPermissions; // required
+ /**
+ *
+ * @see ShareMode
+ */
+ public ShareMode shareMode; // required
+ public String ownerId; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IMAGE_NAME((short)1, "imageName"),
+ DESCRIPTION((short)2, "description"),
+ OS_ID((short)3, "osId"),
+ IS_TEMPLATE((short)4, "isTemplate"),
+ DEFAULT_PERMISSIONS((short)5, "defaultPermissions"),
+ /**
+ *
+ * @see ShareMode
+ */
+ SHARE_MODE((short)6, "shareMode"),
+ OWNER_ID((short)7, "ownerId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IMAGE_NAME
+ return IMAGE_NAME;
+ case 2: // DESCRIPTION
+ return DESCRIPTION;
+ case 3: // OS_ID
+ return OS_ID;
+ case 4: // IS_TEMPLATE
+ return IS_TEMPLATE;
+ case 5: // DEFAULT_PERMISSIONS
+ return DEFAULT_PERMISSIONS;
+ case 6: // SHARE_MODE
+ return SHARE_MODE;
+ case 7: // OWNER_ID
+ return OWNER_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
+ private static final int __OSID_ISSET_ID = 0;
+ private static final int __ISTEMPLATE_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.OWNER_ID};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)));
+ tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ShareMode.class)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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(ImageBaseWrite.class, metaDataMap);
+ }
+
+ public ImageBaseWrite() {
+ }
+
+ public ImageBaseWrite(
+ String imageName,
+ String description,
+ int osId,
+ boolean isTemplate,
+ ImagePermissions defaultPermissions,
+ ShareMode shareMode)
+ {
+ this();
+ this.imageName = imageName;
+ this.description = description;
+ this.osId = osId;
+ setOsIdIsSet(true);
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ this.defaultPermissions = defaultPermissions;
+ this.shareMode = shareMode;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ImageBaseWrite(ImageBaseWrite other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetImageName()) {
+ this.imageName = other.imageName;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ this.osId = other.osId;
+ this.isTemplate = other.isTemplate;
+ if (other.isSetDefaultPermissions()) {
+ this.defaultPermissions = new ImagePermissions(other.defaultPermissions);
+ }
+ if (other.isSetShareMode()) {
+ this.shareMode = other.shareMode;
+ }
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ }
+
+ public ImageBaseWrite deepCopy() {
+ return new ImageBaseWrite(this);
+ }
+
+ @Override
+ public void clear() {
+ this.imageName = null;
+ this.description = null;
+ setOsIdIsSet(false);
+ this.osId = 0;
+ setIsTemplateIsSet(false);
+ this.isTemplate = false;
+ this.defaultPermissions = null;
+ this.shareMode = null;
+ this.ownerId = null;
+ }
+
+ public String getImageName() {
+ return this.imageName;
+ }
+
+ public ImageBaseWrite setImageName(String imageName) {
+ this.imageName = imageName;
+ return this;
+ }
+
+ public void unsetImageName() {
+ this.imageName = null;
+ }
+
+ /** Returns true if field imageName is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageName() {
+ return this.imageName != null;
+ }
+
+ public void setImageNameIsSet(boolean value) {
+ if (!value) {
+ this.imageName = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public ImageBaseWrite setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public int getOsId() {
+ return this.osId;
+ }
+
+ public ImageBaseWrite setOsId(int osId) {
+ this.osId = osId;
+ setOsIdIsSet(true);
+ return this;
+ }
+
+ public void unsetOsId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ /** Returns true if field osId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOsId() {
+ return EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ public void setOsIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ }
+
+ public boolean isIsTemplate() {
+ return this.isTemplate;
+ }
+
+ public ImageBaseWrite setIsTemplate(boolean isTemplate) {
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ return this;
+ }
+
+ public void unsetIsTemplate() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsTemplate() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ public void setIsTemplateIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
+ }
+
+ public ImagePermissions getDefaultPermissions() {
+ return this.defaultPermissions;
+ }
+
+ public ImageBaseWrite setDefaultPermissions(ImagePermissions defaultPermissions) {
+ this.defaultPermissions = defaultPermissions;
+ return this;
+ }
+
+ public void unsetDefaultPermissions() {
+ this.defaultPermissions = null;
+ }
+
+ /** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultPermissions() {
+ return this.defaultPermissions != null;
+ }
+
+ public void setDefaultPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.defaultPermissions = null;
+ }
+ }
+
+ /**
+ *
+ * @see ShareMode
+ */
+ public ShareMode getShareMode() {
+ return this.shareMode;
+ }
+
+ /**
+ *
+ * @see ShareMode
+ */
+ public ImageBaseWrite setShareMode(ShareMode shareMode) {
+ this.shareMode = shareMode;
+ return this;
+ }
+
+ public void unsetShareMode() {
+ this.shareMode = null;
+ }
+
+ /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */
+ public boolean isSetShareMode() {
+ return this.shareMode != null;
+ }
+
+ public void setShareModeIsSet(boolean value) {
+ if (!value) {
+ this.shareMode = null;
+ }
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public ImageBaseWrite setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IMAGE_NAME:
+ if (value == null) {
+ unsetImageName();
+ } else {
+ setImageName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case OS_ID:
+ if (value == null) {
+ unsetOsId();
+ } else {
+ setOsId((Integer)value);
+ }
+ break;
+
+ case IS_TEMPLATE:
+ if (value == null) {
+ unsetIsTemplate();
+ } else {
+ setIsTemplate((Boolean)value);
+ }
+ break;
+
+ case DEFAULT_PERMISSIONS:
+ if (value == null) {
+ unsetDefaultPermissions();
+ } else {
+ setDefaultPermissions((ImagePermissions)value);
+ }
+ break;
+
+ case SHARE_MODE:
+ if (value == null) {
+ unsetShareMode();
+ } else {
+ setShareMode((ShareMode)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IMAGE_NAME:
+ return getImageName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case OS_ID:
+ return Integer.valueOf(getOsId());
+
+ case IS_TEMPLATE:
+ return Boolean.valueOf(isIsTemplate());
+
+ case DEFAULT_PERMISSIONS:
+ return getDefaultPermissions();
+
+ case SHARE_MODE:
+ return getShareMode();
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IMAGE_NAME:
+ return isSetImageName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case OS_ID:
+ return isSetOsId();
+ case IS_TEMPLATE:
+ return isSetIsTemplate();
+ case DEFAULT_PERMISSIONS:
+ return isSetDefaultPermissions();
+ case SHARE_MODE:
+ return isSetShareMode();
+ case OWNER_ID:
+ return isSetOwnerId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ImageBaseWrite)
+ return this.equals((ImageBaseWrite)that);
+ return false;
+ }
+
+ public boolean equals(ImageBaseWrite that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_imageName = true && this.isSetImageName();
+ boolean that_present_imageName = true && that.isSetImageName();
+ if (this_present_imageName || that_present_imageName) {
+ if (!(this_present_imageName && that_present_imageName))
+ return false;
+ if (!this.imageName.equals(that.imageName))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_osId = true;
+ boolean that_present_osId = true;
+ if (this_present_osId || that_present_osId) {
+ if (!(this_present_osId && that_present_osId))
+ return false;
+ if (this.osId != that.osId)
+ return false;
+ }
+
+ boolean this_present_isTemplate = true;
+ boolean that_present_isTemplate = true;
+ if (this_present_isTemplate || that_present_isTemplate) {
+ if (!(this_present_isTemplate && that_present_isTemplate))
+ return false;
+ if (this.isTemplate != that.isTemplate)
+ return false;
+ }
+
+ boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions();
+ boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions();
+ if (this_present_defaultPermissions || that_present_defaultPermissions) {
+ if (!(this_present_defaultPermissions && that_present_defaultPermissions))
+ return false;
+ if (!this.defaultPermissions.equals(that.defaultPermissions))
+ return false;
+ }
+
+ boolean this_present_shareMode = true && this.isSetShareMode();
+ boolean that_present_shareMode = true && that.isSetShareMode();
+ if (this_present_shareMode || that_present_shareMode) {
+ if (!(this_present_shareMode && that_present_shareMode))
+ return false;
+ if (!this.shareMode.equals(that.shareMode))
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ImageBaseWrite other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOsId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osId, other.osId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsTemplate()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetShareMode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ 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("ImageBaseWrite(");
+ boolean first = true;
+
+ sb.append("imageName:");
+ if (this.imageName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("osId:");
+ sb.append(this.osId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isTemplate:");
+ sb.append(this.isTemplate);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("defaultPermissions:");
+ if (this.defaultPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.defaultPermissions);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("shareMode:");
+ if (this.shareMode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.shareMode);
+ }
+ first = false;
+ if (isSetOwnerId()) {
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (defaultPermissions != null) {
+ defaultPermissions.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // 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 ImageBaseWriteStandardSchemeFactory implements SchemeFactory {
+ public ImageBaseWriteStandardScheme getScheme() {
+ return new ImageBaseWriteStandardScheme();
+ }
+ }
+
+ private static class ImageBaseWriteStandardScheme extends StandardScheme<ImageBaseWrite> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ImageBaseWrite struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IMAGE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // OS_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // IS_TEMPLATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // DEFAULT_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.defaultPermissions = new ImagePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // SHARE_MODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.shareMode = ShareMode.findByValue(iprot.readI32());
+ struct.setShareModeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(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, ImageBaseWrite struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.imageName != null) {
+ oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
+ oprot.writeString(struct.imageName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(OS_ID_FIELD_DESC);
+ oprot.writeI32(struct.osId);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC);
+ oprot.writeBool(struct.isTemplate);
+ oprot.writeFieldEnd();
+ if (struct.defaultPermissions != null) {
+ oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC);
+ struct.defaultPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.shareMode != null) {
+ oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC);
+ oprot.writeI32(struct.shareMode.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.ownerId != null) {
+ if (struct.isSetOwnerId()) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ImageBaseWriteTupleSchemeFactory implements SchemeFactory {
+ public ImageBaseWriteTupleScheme getScheme() {
+ return new ImageBaseWriteTupleScheme();
+ }
+ }
+
+ private static class ImageBaseWriteTupleScheme extends TupleScheme<ImageBaseWrite> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ImageBaseWrite struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetImageName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(1);
+ }
+ if (struct.isSetOsId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetIsTemplate()) {
+ optionals.set(3);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ optionals.set(4);
+ }
+ if (struct.isSetShareMode()) {
+ optionals.set(5);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(6);
+ }
+ oprot.writeBitSet(optionals, 7);
+ if (struct.isSetImageName()) {
+ oprot.writeString(struct.imageName);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetOsId()) {
+ oprot.writeI32(struct.osId);
+ }
+ if (struct.isSetIsTemplate()) {
+ oprot.writeBool(struct.isTemplate);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ struct.defaultPermissions.write(oprot);
+ }
+ if (struct.isSetShareMode()) {
+ oprot.writeI32(struct.shareMode.getValue());
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ImageBaseWrite struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(7);
+ if (incoming.get(0)) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.defaultPermissions = new ImagePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.shareMode = ShareMode.findByValue(iprot.readI32());
+ struct.setShareModeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java
new file mode 100644
index 0000000..4567fe7
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDataError.java
@@ -0,0 +1,45 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum ImageDataError implements org.apache.thrift.TEnum {
+ INVALID_DATA(0),
+ UNKNOWN_IMAGE(1);
+
+ private final int value;
+
+ private ImageDataError(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ImageDataError findByValue(int value) {
+ switch (value) {
+ case 0:
+ return INVALID_DATA;
+ case 1:
+ return UNKNOWN_IMAGE;
+ default:
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java
new file mode 100644
index 0000000..cf4bb9d
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java
@@ -0,0 +1,2149 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRead, ImageDetailsRead._Fields>, java.io.Serializable, Cloneable, Comparable<ImageDetailsRead> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageDetailsRead");
+
+ private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CURRENT_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("currentVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("versions", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("tags", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField SOFTWARE_FIELD_DESC = new org.apache.thrift.protocol.TField("software", org.apache.thrift.protocol.TType.LIST, (short)7);
+ private static final org.apache.thrift.protocol.TField OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("osId", org.apache.thrift.protocol.TType.I32, (short)8);
+ private static final org.apache.thrift.protocol.TField VIRT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtId", org.apache.thrift.protocol.TType.STRING, (short)9);
+ private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)10);
+ private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.I64, (short)11);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)12);
+ private static final org.apache.thrift.protocol.TField UPDATER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updaterId", org.apache.thrift.protocol.TType.STRING, (short)13);
+ private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I32, (short)14);
+ private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)15);
+ private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)16);
+ private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)17);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ImageDetailsReadStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ImageDetailsReadTupleSchemeFactory());
+ }
+
+ public String imageBaseId; // required
+ public String currentVersionId; // required
+ public List<ImageVersionDetails> versions; // required
+ public String imageName; // required
+ public String description; // required
+ public List<String> tags; // required
+ public List<String> software; // required
+ public int osId; // required
+ public String virtId; // required
+ public long createTime; // required
+ public long updateTime; // required
+ public String ownerId; // required
+ public String updaterId; // required
+ /**
+ *
+ * @see ShareMode
+ */
+ public ShareMode shareMode; // required
+ public boolean isTemplate; // required
+ public ImagePermissions defaultPermissions; // required
+ public ImagePermissions userPermissions; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IMAGE_BASE_ID((short)1, "imageBaseId"),
+ CURRENT_VERSION_ID((short)2, "currentVersionId"),
+ VERSIONS((short)3, "versions"),
+ IMAGE_NAME((short)4, "imageName"),
+ DESCRIPTION((short)5, "description"),
+ TAGS((short)6, "tags"),
+ SOFTWARE((short)7, "software"),
+ OS_ID((short)8, "osId"),
+ VIRT_ID((short)9, "virtId"),
+ CREATE_TIME((short)10, "createTime"),
+ UPDATE_TIME((short)11, "updateTime"),
+ OWNER_ID((short)12, "ownerId"),
+ UPDATER_ID((short)13, "updaterId"),
+ /**
+ *
+ * @see ShareMode
+ */
+ SHARE_MODE((short)14, "shareMode"),
+ IS_TEMPLATE((short)15, "isTemplate"),
+ DEFAULT_PERMISSIONS((short)16, "defaultPermissions"),
+ USER_PERMISSIONS((short)17, "userPermissions");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ case 2: // CURRENT_VERSION_ID
+ return CURRENT_VERSION_ID;
+ case 3: // VERSIONS
+ return VERSIONS;
+ case 4: // IMAGE_NAME
+ return IMAGE_NAME;
+ case 5: // DESCRIPTION
+ return DESCRIPTION;
+ case 6: // TAGS
+ return TAGS;
+ case 7: // SOFTWARE
+ return SOFTWARE;
+ case 8: // OS_ID
+ return OS_ID;
+ case 9: // VIRT_ID
+ return VIRT_ID;
+ case 10: // CREATE_TIME
+ return CREATE_TIME;
+ case 11: // UPDATE_TIME
+ return UPDATE_TIME;
+ case 12: // OWNER_ID
+ return OWNER_ID;
+ case 13: // UPDATER_ID
+ return UPDATER_ID;
+ case 14: // SHARE_MODE
+ return SHARE_MODE;
+ case 15: // IS_TEMPLATE
+ return IS_TEMPLATE;
+ case 16: // DEFAULT_PERMISSIONS
+ return DEFAULT_PERMISSIONS;
+ case 17: // USER_PERMISSIONS
+ return USER_PERMISSIONS;
+ 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 __OSID_ISSET_ID = 0;
+ private static final int __CREATETIME_ISSET_ID = 1;
+ private static final int __UPDATETIME_ISSET_ID = 2;
+ private static final int __ISTEMPLATE_ISSET_ID = 3;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.USER_PERMISSIONS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.CURRENT_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("currentVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("versions", 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, ImageVersionDetails.class))));
+ tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TAGS, new org.apache.thrift.meta_data.FieldMetaData("tags", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.SOFTWARE, new org.apache.thrift.meta_data.FieldMetaData("software", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.VIRT_ID, new org.apache.thrift.meta_data.FieldMetaData("virtId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.UPDATER_ID, new org.apache.thrift.meta_data.FieldMetaData("updaterId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ShareMode.class)));
+ tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)));
+ tmpMap.put(_Fields.USER_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("userPermissions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageDetailsRead.class, metaDataMap);
+ }
+
+ public ImageDetailsRead() {
+ }
+
+ public ImageDetailsRead(
+ String imageBaseId,
+ String currentVersionId,
+ List<ImageVersionDetails> versions,
+ String imageName,
+ String description,
+ List<String> tags,
+ List<String> software,
+ int osId,
+ String virtId,
+ long createTime,
+ long updateTime,
+ String ownerId,
+ String updaterId,
+ ShareMode shareMode,
+ boolean isTemplate,
+ ImagePermissions defaultPermissions)
+ {
+ this();
+ this.imageBaseId = imageBaseId;
+ this.currentVersionId = currentVersionId;
+ this.versions = versions;
+ this.imageName = imageName;
+ this.description = description;
+ this.tags = tags;
+ this.software = software;
+ this.osId = osId;
+ setOsIdIsSet(true);
+ this.virtId = virtId;
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ this.updateTime = updateTime;
+ setUpdateTimeIsSet(true);
+ this.ownerId = ownerId;
+ this.updaterId = updaterId;
+ this.shareMode = shareMode;
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ this.defaultPermissions = defaultPermissions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ImageDetailsRead(ImageDetailsRead other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ if (other.isSetCurrentVersionId()) {
+ this.currentVersionId = other.currentVersionId;
+ }
+ if (other.isSetVersions()) {
+ List<ImageVersionDetails> __this__versions = new ArrayList<ImageVersionDetails>(other.versions.size());
+ for (ImageVersionDetails other_element : other.versions) {
+ __this__versions.add(new ImageVersionDetails(other_element));
+ }
+ this.versions = __this__versions;
+ }
+ if (other.isSetImageName()) {
+ this.imageName = other.imageName;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetTags()) {
+ List<String> __this__tags = new ArrayList<String>(other.tags);
+ this.tags = __this__tags;
+ }
+ if (other.isSetSoftware()) {
+ List<String> __this__software = new ArrayList<String>(other.software);
+ this.software = __this__software;
+ }
+ this.osId = other.osId;
+ if (other.isSetVirtId()) {
+ this.virtId = other.virtId;
+ }
+ this.createTime = other.createTime;
+ this.updateTime = other.updateTime;
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetUpdaterId()) {
+ this.updaterId = other.updaterId;
+ }
+ if (other.isSetShareMode()) {
+ this.shareMode = other.shareMode;
+ }
+ this.isTemplate = other.isTemplate;
+ if (other.isSetDefaultPermissions()) {
+ this.defaultPermissions = new ImagePermissions(other.defaultPermissions);
+ }
+ if (other.isSetUserPermissions()) {
+ this.userPermissions = new ImagePermissions(other.userPermissions);
+ }
+ }
+
+ public ImageDetailsRead deepCopy() {
+ return new ImageDetailsRead(this);
+ }
+
+ @Override
+ public void clear() {
+ this.imageBaseId = null;
+ this.currentVersionId = null;
+ this.versions = null;
+ this.imageName = null;
+ this.description = null;
+ this.tags = null;
+ this.software = null;
+ setOsIdIsSet(false);
+ this.osId = 0;
+ this.virtId = null;
+ setCreateTimeIsSet(false);
+ this.createTime = 0;
+ setUpdateTimeIsSet(false);
+ this.updateTime = 0;
+ this.ownerId = null;
+ this.updaterId = null;
+ this.shareMode = null;
+ setIsTemplateIsSet(false);
+ this.isTemplate = false;
+ this.defaultPermissions = null;
+ this.userPermissions = null;
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public ImageDetailsRead setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public String getCurrentVersionId() {
+ return this.currentVersionId;
+ }
+
+ public ImageDetailsRead setCurrentVersionId(String currentVersionId) {
+ this.currentVersionId = currentVersionId;
+ return this;
+ }
+
+ public void unsetCurrentVersionId() {
+ this.currentVersionId = null;
+ }
+
+ /** Returns true if field currentVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetCurrentVersionId() {
+ return this.currentVersionId != null;
+ }
+
+ public void setCurrentVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.currentVersionId = null;
+ }
+ }
+
+ public int getVersionsSize() {
+ return (this.versions == null) ? 0 : this.versions.size();
+ }
+
+ public java.util.Iterator<ImageVersionDetails> getVersionsIterator() {
+ return (this.versions == null) ? null : this.versions.iterator();
+ }
+
+ public void addToVersions(ImageVersionDetails elem) {
+ if (this.versions == null) {
+ this.versions = new ArrayList<ImageVersionDetails>();
+ }
+ this.versions.add(elem);
+ }
+
+ public List<ImageVersionDetails> getVersions() {
+ return this.versions;
+ }
+
+ public ImageDetailsRead setVersions(List<ImageVersionDetails> versions) {
+ this.versions = versions;
+ return this;
+ }
+
+ public void unsetVersions() {
+ this.versions = null;
+ }
+
+ /** Returns true if field versions is set (has been assigned a value) and false otherwise */
+ public boolean isSetVersions() {
+ return this.versions != null;
+ }
+
+ public void setVersionsIsSet(boolean value) {
+ if (!value) {
+ this.versions = null;
+ }
+ }
+
+ public String getImageName() {
+ return this.imageName;
+ }
+
+ public ImageDetailsRead setImageName(String imageName) {
+ this.imageName = imageName;
+ return this;
+ }
+
+ public void unsetImageName() {
+ this.imageName = null;
+ }
+
+ /** Returns true if field imageName is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageName() {
+ return this.imageName != null;
+ }
+
+ public void setImageNameIsSet(boolean value) {
+ if (!value) {
+ this.imageName = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public ImageDetailsRead setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public int getTagsSize() {
+ return (this.tags == null) ? 0 : this.tags.size();
+ }
+
+ public java.util.Iterator<String> getTagsIterator() {
+ return (this.tags == null) ? null : this.tags.iterator();
+ }
+
+ public void addToTags(String elem) {
+ if (this.tags == null) {
+ this.tags = new ArrayList<String>();
+ }
+ this.tags.add(elem);
+ }
+
+ public List<String> getTags() {
+ return this.tags;
+ }
+
+ public ImageDetailsRead setTags(List<String> tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public void unsetTags() {
+ this.tags = null;
+ }
+
+ /** Returns true if field tags is set (has been assigned a value) and false otherwise */
+ public boolean isSetTags() {
+ return this.tags != null;
+ }
+
+ public void setTagsIsSet(boolean value) {
+ if (!value) {
+ this.tags = null;
+ }
+ }
+
+ public int getSoftwareSize() {
+ return (this.software == null) ? 0 : this.software.size();
+ }
+
+ public java.util.Iterator<String> getSoftwareIterator() {
+ return (this.software == null) ? null : this.software.iterator();
+ }
+
+ public void addToSoftware(String elem) {
+ if (this.software == null) {
+ this.software = new ArrayList<String>();
+ }
+ this.software.add(elem);
+ }
+
+ public List<String> getSoftware() {
+ return this.software;
+ }
+
+ public ImageDetailsRead setSoftware(List<String> software) {
+ this.software = software;
+ return this;
+ }
+
+ public void unsetSoftware() {
+ this.software = null;
+ }
+
+ /** Returns true if field software is set (has been assigned a value) and false otherwise */
+ public boolean isSetSoftware() {
+ return this.software != null;
+ }
+
+ public void setSoftwareIsSet(boolean value) {
+ if (!value) {
+ this.software = null;
+ }
+ }
+
+ public int getOsId() {
+ return this.osId;
+ }
+
+ public ImageDetailsRead setOsId(int osId) {
+ this.osId = osId;
+ setOsIdIsSet(true);
+ return this;
+ }
+
+ public void unsetOsId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ /** Returns true if field osId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOsId() {
+ return EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ public void setOsIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ }
+
+ public String getVirtId() {
+ return this.virtId;
+ }
+
+ public ImageDetailsRead setVirtId(String virtId) {
+ this.virtId = virtId;
+ return this;
+ }
+
+ public void unsetVirtId() {
+ this.virtId = null;
+ }
+
+ /** Returns true if field virtId is set (has been assigned a value) and false otherwise */
+ public boolean isSetVirtId() {
+ return this.virtId != null;
+ }
+
+ public void setVirtIdIsSet(boolean value) {
+ if (!value) {
+ this.virtId = null;
+ }
+ }
+
+ public long getCreateTime() {
+ return this.createTime;
+ }
+
+ public ImageDetailsRead setCreateTime(long createTime) {
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ public void setCreateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ }
+
+ public long getUpdateTime() {
+ return this.updateTime;
+ }
+
+ public ImageDetailsRead setUpdateTime(long updateTime) {
+ this.updateTime = updateTime;
+ setUpdateTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
+ }
+
+ public void setUpdateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public ImageDetailsRead setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getUpdaterId() {
+ return this.updaterId;
+ }
+
+ public ImageDetailsRead setUpdaterId(String updaterId) {
+ this.updaterId = updaterId;
+ return this;
+ }
+
+ public void unsetUpdaterId() {
+ this.updaterId = null;
+ }
+
+ /** Returns true if field updaterId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdaterId() {
+ return this.updaterId != null;
+ }
+
+ public void setUpdaterIdIsSet(boolean value) {
+ if (!value) {
+ this.updaterId = null;
+ }
+ }
+
+ /**
+ *
+ * @see ShareMode
+ */
+ public ShareMode getShareMode() {
+ return this.shareMode;
+ }
+
+ /**
+ *
+ * @see ShareMode
+ */
+ public ImageDetailsRead setShareMode(ShareMode shareMode) {
+ this.shareMode = shareMode;
+ return this;
+ }
+
+ public void unsetShareMode() {
+ this.shareMode = null;
+ }
+
+ /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */
+ public boolean isSetShareMode() {
+ return this.shareMode != null;
+ }
+
+ public void setShareModeIsSet(boolean value) {
+ if (!value) {
+ this.shareMode = null;
+ }
+ }
+
+ public boolean isIsTemplate() {
+ return this.isTemplate;
+ }
+
+ public ImageDetailsRead setIsTemplate(boolean isTemplate) {
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ return this;
+ }
+
+ public void unsetIsTemplate() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsTemplate() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ public void setIsTemplateIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
+ }
+
+ public ImagePermissions getDefaultPermissions() {
+ return this.defaultPermissions;
+ }
+
+ public ImageDetailsRead setDefaultPermissions(ImagePermissions defaultPermissions) {
+ this.defaultPermissions = defaultPermissions;
+ return this;
+ }
+
+ public void unsetDefaultPermissions() {
+ this.defaultPermissions = null;
+ }
+
+ /** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultPermissions() {
+ return this.defaultPermissions != null;
+ }
+
+ public void setDefaultPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.defaultPermissions = null;
+ }
+ }
+
+ public ImagePermissions getUserPermissions() {
+ return this.userPermissions;
+ }
+
+ public ImageDetailsRead setUserPermissions(ImagePermissions userPermissions) {
+ this.userPermissions = userPermissions;
+ return this;
+ }
+
+ public void unsetUserPermissions() {
+ this.userPermissions = null;
+ }
+
+ /** Returns true if field userPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserPermissions() {
+ return this.userPermissions != null;
+ }
+
+ public void setUserPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.userPermissions = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ case CURRENT_VERSION_ID:
+ if (value == null) {
+ unsetCurrentVersionId();
+ } else {
+ setCurrentVersionId((String)value);
+ }
+ break;
+
+ case VERSIONS:
+ if (value == null) {
+ unsetVersions();
+ } else {
+ setVersions((List<ImageVersionDetails>)value);
+ }
+ break;
+
+ case IMAGE_NAME:
+ if (value == null) {
+ unsetImageName();
+ } else {
+ setImageName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case TAGS:
+ if (value == null) {
+ unsetTags();
+ } else {
+ setTags((List<String>)value);
+ }
+ break;
+
+ case SOFTWARE:
+ if (value == null) {
+ unsetSoftware();
+ } else {
+ setSoftware((List<String>)value);
+ }
+ break;
+
+ case OS_ID:
+ if (value == null) {
+ unsetOsId();
+ } else {
+ setOsId((Integer)value);
+ }
+ break;
+
+ case VIRT_ID:
+ if (value == null) {
+ unsetVirtId();
+ } else {
+ setVirtId((String)value);
+ }
+ break;
+
+ case CREATE_TIME:
+ if (value == null) {
+ unsetCreateTime();
+ } else {
+ setCreateTime((Long)value);
+ }
+ break;
+
+ case UPDATE_TIME:
+ if (value == null) {
+ unsetUpdateTime();
+ } else {
+ setUpdateTime((Long)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case UPDATER_ID:
+ if (value == null) {
+ unsetUpdaterId();
+ } else {
+ setUpdaterId((String)value);
+ }
+ break;
+
+ case SHARE_MODE:
+ if (value == null) {
+ unsetShareMode();
+ } else {
+ setShareMode((ShareMode)value);
+ }
+ break;
+
+ case IS_TEMPLATE:
+ if (value == null) {
+ unsetIsTemplate();
+ } else {
+ setIsTemplate((Boolean)value);
+ }
+ break;
+
+ case DEFAULT_PERMISSIONS:
+ if (value == null) {
+ unsetDefaultPermissions();
+ } else {
+ setDefaultPermissions((ImagePermissions)value);
+ }
+ break;
+
+ case USER_PERMISSIONS:
+ if (value == null) {
+ unsetUserPermissions();
+ } else {
+ setUserPermissions((ImagePermissions)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ case CURRENT_VERSION_ID:
+ return getCurrentVersionId();
+
+ case VERSIONS:
+ return getVersions();
+
+ case IMAGE_NAME:
+ return getImageName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case TAGS:
+ return getTags();
+
+ case SOFTWARE:
+ return getSoftware();
+
+ case OS_ID:
+ return Integer.valueOf(getOsId());
+
+ case VIRT_ID:
+ return getVirtId();
+
+ case CREATE_TIME:
+ return Long.valueOf(getCreateTime());
+
+ case UPDATE_TIME:
+ return Long.valueOf(getUpdateTime());
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case UPDATER_ID:
+ return getUpdaterId();
+
+ case SHARE_MODE:
+ return getShareMode();
+
+ case IS_TEMPLATE:
+ return Boolean.valueOf(isIsTemplate());
+
+ case DEFAULT_PERMISSIONS:
+ return getDefaultPermissions();
+
+ case USER_PERMISSIONS:
+ return getUserPermissions();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ case CURRENT_VERSION_ID:
+ return isSetCurrentVersionId();
+ case VERSIONS:
+ return isSetVersions();
+ case IMAGE_NAME:
+ return isSetImageName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case TAGS:
+ return isSetTags();
+ case SOFTWARE:
+ return isSetSoftware();
+ case OS_ID:
+ return isSetOsId();
+ case VIRT_ID:
+ return isSetVirtId();
+ case CREATE_TIME:
+ return isSetCreateTime();
+ case UPDATE_TIME:
+ return isSetUpdateTime();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case UPDATER_ID:
+ return isSetUpdaterId();
+ case SHARE_MODE:
+ return isSetShareMode();
+ case IS_TEMPLATE:
+ return isSetIsTemplate();
+ case DEFAULT_PERMISSIONS:
+ return isSetDefaultPermissions();
+ case USER_PERMISSIONS:
+ return isSetUserPermissions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ImageDetailsRead)
+ return this.equals((ImageDetailsRead)that);
+ return false;
+ }
+
+ public boolean equals(ImageDetailsRead that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ boolean this_present_currentVersionId = true && this.isSetCurrentVersionId();
+ boolean that_present_currentVersionId = true && that.isSetCurrentVersionId();
+ if (this_present_currentVersionId || that_present_currentVersionId) {
+ if (!(this_present_currentVersionId && that_present_currentVersionId))
+ return false;
+ if (!this.currentVersionId.equals(that.currentVersionId))
+ return false;
+ }
+
+ boolean this_present_versions = true && this.isSetVersions();
+ boolean that_present_versions = true && that.isSetVersions();
+ if (this_present_versions || that_present_versions) {
+ if (!(this_present_versions && that_present_versions))
+ return false;
+ if (!this.versions.equals(that.versions))
+ return false;
+ }
+
+ boolean this_present_imageName = true && this.isSetImageName();
+ boolean that_present_imageName = true && that.isSetImageName();
+ if (this_present_imageName || that_present_imageName) {
+ if (!(this_present_imageName && that_present_imageName))
+ return false;
+ if (!this.imageName.equals(that.imageName))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_tags = true && this.isSetTags();
+ boolean that_present_tags = true && that.isSetTags();
+ if (this_present_tags || that_present_tags) {
+ if (!(this_present_tags && that_present_tags))
+ return false;
+ if (!this.tags.equals(that.tags))
+ return false;
+ }
+
+ boolean this_present_software = true && this.isSetSoftware();
+ boolean that_present_software = true && that.isSetSoftware();
+ if (this_present_software || that_present_software) {
+ if (!(this_present_software && that_present_software))
+ return false;
+ if (!this.software.equals(that.software))
+ return false;
+ }
+
+ boolean this_present_osId = true;
+ boolean that_present_osId = true;
+ if (this_present_osId || that_present_osId) {
+ if (!(this_present_osId && that_present_osId))
+ return false;
+ if (this.osId != that.osId)
+ return false;
+ }
+
+ boolean this_present_virtId = true && this.isSetVirtId();
+ boolean that_present_virtId = true && that.isSetVirtId();
+ if (this_present_virtId || that_present_virtId) {
+ if (!(this_present_virtId && that_present_virtId))
+ return false;
+ if (!this.virtId.equals(that.virtId))
+ return false;
+ }
+
+ boolean this_present_createTime = true;
+ boolean that_present_createTime = true;
+ if (this_present_createTime || that_present_createTime) {
+ if (!(this_present_createTime && that_present_createTime))
+ return false;
+ if (this.createTime != that.createTime)
+ return false;
+ }
+
+ boolean this_present_updateTime = true;
+ boolean that_present_updateTime = true;
+ if (this_present_updateTime || that_present_updateTime) {
+ if (!(this_present_updateTime && that_present_updateTime))
+ return false;
+ if (this.updateTime != that.updateTime)
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_updaterId = true && this.isSetUpdaterId();
+ boolean that_present_updaterId = true && that.isSetUpdaterId();
+ if (this_present_updaterId || that_present_updaterId) {
+ if (!(this_present_updaterId && that_present_updaterId))
+ return false;
+ if (!this.updaterId.equals(that.updaterId))
+ return false;
+ }
+
+ boolean this_present_shareMode = true && this.isSetShareMode();
+ boolean that_present_shareMode = true && that.isSetShareMode();
+ if (this_present_shareMode || that_present_shareMode) {
+ if (!(this_present_shareMode && that_present_shareMode))
+ return false;
+ if (!this.shareMode.equals(that.shareMode))
+ return false;
+ }
+
+ boolean this_present_isTemplate = true;
+ boolean that_present_isTemplate = true;
+ if (this_present_isTemplate || that_present_isTemplate) {
+ if (!(this_present_isTemplate && that_present_isTemplate))
+ return false;
+ if (this.isTemplate != that.isTemplate)
+ return false;
+ }
+
+ boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions();
+ boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions();
+ if (this_present_defaultPermissions || that_present_defaultPermissions) {
+ if (!(this_present_defaultPermissions && that_present_defaultPermissions))
+ return false;
+ if (!this.defaultPermissions.equals(that.defaultPermissions))
+ return false;
+ }
+
+ boolean this_present_userPermissions = true && this.isSetUserPermissions();
+ boolean that_present_userPermissions = true && that.isSetUserPermissions();
+ if (this_present_userPermissions || that_present_userPermissions) {
+ if (!(this_present_userPermissions && that_present_userPermissions))
+ return false;
+ if (!this.userPermissions.equals(that.userPermissions))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ImageDetailsRead other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCurrentVersionId()).compareTo(other.isSetCurrentVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCurrentVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentVersionId, other.currentVersionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetVersions()).compareTo(other.isSetVersions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVersions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versions, other.versions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTags()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSoftware()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.software, other.software);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOsId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osId, other.osId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVirtId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtId, other.virtId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdaterId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updaterId, other.updaterId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetShareMode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsTemplate()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPermissions, other.userPermissions);
+ 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("ImageDetailsRead(");
+ boolean first = true;
+
+ sb.append("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("currentVersionId:");
+ if (this.currentVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.currentVersionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("versions:");
+ if (this.versions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.versions);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageName:");
+ if (this.imageName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tags:");
+ if (this.tags == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tags);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("software:");
+ if (this.software == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.software);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("osId:");
+ sb.append(this.osId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("virtId:");
+ if (this.virtId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.virtId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("createTime:");
+ sb.append(this.createTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("updateTime:");
+ sb.append(this.updateTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("updaterId:");
+ if (this.updaterId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.updaterId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("shareMode:");
+ if (this.shareMode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.shareMode);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isTemplate:");
+ sb.append(this.isTemplate);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("defaultPermissions:");
+ if (this.defaultPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.defaultPermissions);
+ }
+ first = false;
+ if (isSetUserPermissions()) {
+ if (!first) sb.append(", ");
+ sb.append("userPermissions:");
+ if (this.userPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userPermissions);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (defaultPermissions != null) {
+ defaultPermissions.validate();
+ }
+ if (userPermissions != null) {
+ userPermissions.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // 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 ImageDetailsReadStandardSchemeFactory implements SchemeFactory {
+ public ImageDetailsReadStandardScheme getScheme() {
+ return new ImageDetailsReadStandardScheme();
+ }
+ }
+
+ private static class ImageDetailsReadStandardScheme extends StandardScheme<ImageDetailsRead> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ImageDetailsRead struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CURRENT_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.currentVersionId = iprot.readString();
+ struct.setCurrentVersionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // VERSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
+ struct.versions = new ArrayList<ImageVersionDetails>(_list34.size);
+ for (int _i35 = 0; _i35 < _list34.size; ++_i35)
+ {
+ ImageVersionDetails _elem36;
+ _elem36 = new ImageVersionDetails();
+ _elem36.read(iprot);
+ struct.versions.add(_elem36);
+ }
+ iprot.readListEnd();
+ }
+ struct.setVersionsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // IMAGE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // TAGS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list37 = iprot.readListBegin();
+ struct.tags = new ArrayList<String>(_list37.size);
+ for (int _i38 = 0; _i38 < _list37.size; ++_i38)
+ {
+ String _elem39;
+ _elem39 = iprot.readString();
+ struct.tags.add(_elem39);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTagsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // SOFTWARE
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
+ struct.software = new ArrayList<String>(_list40.size);
+ for (int _i41 = 0; _i41 < _list40.size; ++_i41)
+ {
+ String _elem42;
+ _elem42 = iprot.readString();
+ struct.software.add(_elem42);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSoftwareIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // OS_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // VIRT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // CREATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createTime = iprot.readI64();
+ struct.setCreateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // UPDATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updateTime = iprot.readI64();
+ struct.setUpdateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // UPDATER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.updaterId = iprot.readString();
+ struct.setUpdaterIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // SHARE_MODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.shareMode = ShareMode.findByValue(iprot.readI32());
+ struct.setShareModeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 15: // IS_TEMPLATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 16: // DEFAULT_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.defaultPermissions = new ImagePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 17: // USER_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.userPermissions = new ImagePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(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, ImageDetailsRead struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.currentVersionId != null) {
+ oprot.writeFieldBegin(CURRENT_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.currentVersionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.versions != null) {
+ oprot.writeFieldBegin(VERSIONS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.versions.size()));
+ for (ImageVersionDetails _iter43 : struct.versions)
+ {
+ _iter43.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageName != null) {
+ oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
+ oprot.writeString(struct.imageName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tags != null) {
+ oprot.writeFieldBegin(TAGS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tags.size()));
+ for (String _iter44 : struct.tags)
+ {
+ oprot.writeString(_iter44);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.software != null) {
+ oprot.writeFieldBegin(SOFTWARE_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.software.size()));
+ for (String _iter45 : struct.software)
+ {
+ oprot.writeString(_iter45);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(OS_ID_FIELD_DESC);
+ oprot.writeI32(struct.osId);
+ oprot.writeFieldEnd();
+ if (struct.virtId != null) {
+ oprot.writeFieldBegin(VIRT_ID_FIELD_DESC);
+ oprot.writeString(struct.virtId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updateTime);
+ oprot.writeFieldEnd();
+ if (struct.ownerId != null) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.updaterId != null) {
+ oprot.writeFieldBegin(UPDATER_ID_FIELD_DESC);
+ oprot.writeString(struct.updaterId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.shareMode != null) {
+ oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC);
+ oprot.writeI32(struct.shareMode.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC);
+ oprot.writeBool(struct.isTemplate);
+ oprot.writeFieldEnd();
+ if (struct.defaultPermissions != null) {
+ oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC);
+ struct.defaultPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userPermissions != null) {
+ if (struct.isSetUserPermissions()) {
+ oprot.writeFieldBegin(USER_PERMISSIONS_FIELD_DESC);
+ struct.userPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ImageDetailsReadTupleSchemeFactory implements SchemeFactory {
+ public ImageDetailsReadTupleScheme getScheme() {
+ return new ImageDetailsReadTupleScheme();
+ }
+ }
+
+ private static class ImageDetailsReadTupleScheme extends TupleScheme<ImageDetailsRead> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ImageDetailsRead struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetImageBaseId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCurrentVersionId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetVersions()) {
+ optionals.set(2);
+ }
+ if (struct.isSetImageName()) {
+ optionals.set(3);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(4);
+ }
+ if (struct.isSetTags()) {
+ optionals.set(5);
+ }
+ if (struct.isSetSoftware()) {
+ optionals.set(6);
+ }
+ if (struct.isSetOsId()) {
+ optionals.set(7);
+ }
+ if (struct.isSetVirtId()) {
+ optionals.set(8);
+ }
+ if (struct.isSetCreateTime()) {
+ optionals.set(9);
+ }
+ if (struct.isSetUpdateTime()) {
+ optionals.set(10);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(11);
+ }
+ if (struct.isSetUpdaterId()) {
+ optionals.set(12);
+ }
+ if (struct.isSetShareMode()) {
+ optionals.set(13);
+ }
+ if (struct.isSetIsTemplate()) {
+ optionals.set(14);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ optionals.set(15);
+ }
+ if (struct.isSetUserPermissions()) {
+ optionals.set(16);
+ }
+ oprot.writeBitSet(optionals, 17);
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ if (struct.isSetCurrentVersionId()) {
+ oprot.writeString(struct.currentVersionId);
+ }
+ if (struct.isSetVersions()) {
+ {
+ oprot.writeI32(struct.versions.size());
+ for (ImageVersionDetails _iter46 : struct.versions)
+ {
+ _iter46.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetImageName()) {
+ oprot.writeString(struct.imageName);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetTags()) {
+ {
+ oprot.writeI32(struct.tags.size());
+ for (String _iter47 : struct.tags)
+ {
+ oprot.writeString(_iter47);
+ }
+ }
+ }
+ if (struct.isSetSoftware()) {
+ {
+ oprot.writeI32(struct.software.size());
+ for (String _iter48 : struct.software)
+ {
+ oprot.writeString(_iter48);
+ }
+ }
+ }
+ if (struct.isSetOsId()) {
+ oprot.writeI32(struct.osId);
+ }
+ if (struct.isSetVirtId()) {
+ oprot.writeString(struct.virtId);
+ }
+ if (struct.isSetCreateTime()) {
+ oprot.writeI64(struct.createTime);
+ }
+ if (struct.isSetUpdateTime()) {
+ oprot.writeI64(struct.updateTime);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetUpdaterId()) {
+ oprot.writeString(struct.updaterId);
+ }
+ if (struct.isSetShareMode()) {
+ oprot.writeI32(struct.shareMode.getValue());
+ }
+ if (struct.isSetIsTemplate()) {
+ oprot.writeBool(struct.isTemplate);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ struct.defaultPermissions.write(oprot);
+ }
+ if (struct.isSetUserPermissions()) {
+ struct.userPermissions.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ImageDetailsRead struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(17);
+ if (incoming.get(0)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.currentVersionId = iprot.readString();
+ struct.setCurrentVersionIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.versions = new ArrayList<ImageVersionDetails>(_list49.size);
+ for (int _i50 = 0; _i50 < _list49.size; ++_i50)
+ {
+ ImageVersionDetails _elem51;
+ _elem51 = new ImageVersionDetails();
+ _elem51.read(iprot);
+ struct.versions.add(_elem51);
+ }
+ }
+ struct.setVersionsIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TList _list52 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tags = new ArrayList<String>(_list52.size);
+ for (int _i53 = 0; _i53 < _list52.size; ++_i53)
+ {
+ String _elem54;
+ _elem54 = iprot.readString();
+ struct.tags.add(_elem54);
+ }
+ }
+ struct.setTagsIsSet(true);
+ }
+ if (incoming.get(6)) {
+ {
+ org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.software = new ArrayList<String>(_list55.size);
+ for (int _i56 = 0; _i56 < _list55.size; ++_i56)
+ {
+ String _elem57;
+ _elem57 = iprot.readString();
+ struct.software.add(_elem57);
+ }
+ }
+ struct.setSoftwareIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.createTime = iprot.readI64();
+ struct.setCreateTimeIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.updateTime = iprot.readI64();
+ struct.setUpdateTimeIsSet(true);
+ }
+ if (incoming.get(11)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(12)) {
+ struct.updaterId = iprot.readString();
+ struct.setUpdaterIdIsSet(true);
+ }
+ if (incoming.get(13)) {
+ struct.shareMode = ShareMode.findByValue(iprot.readI32());
+ struct.setShareModeIsSet(true);
+ }
+ if (incoming.get(14)) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(true);
+ }
+ if (incoming.get(15)) {
+ struct.defaultPermissions = new ImagePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ }
+ if (incoming.get(16)) {
+ struct.userPermissions = new ImagePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java
new file mode 100644
index 0000000..95fdaac
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java
@@ -0,0 +1,668 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ImagePermissions implements org.apache.thrift.TBase<ImagePermissions, ImagePermissions._Fields>, java.io.Serializable, Cloneable, Comparable<ImagePermissions> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImagePermissions");
+
+ private static final org.apache.thrift.protocol.TField LINK_FIELD_DESC = new org.apache.thrift.protocol.TField("link", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField DOWNLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("download", org.apache.thrift.protocol.TType.BOOL, (short)2);
+ private static final org.apache.thrift.protocol.TField EDIT_FIELD_DESC = new org.apache.thrift.protocol.TField("edit", org.apache.thrift.protocol.TType.BOOL, (short)3);
+ private static final org.apache.thrift.protocol.TField ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("admin", org.apache.thrift.protocol.TType.BOOL, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ImagePermissionsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ImagePermissionsTupleSchemeFactory());
+ }
+
+ public boolean link; // required
+ public boolean download; // required
+ public boolean edit; // required
+ public boolean admin; // 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 {
+ LINK((short)1, "link"),
+ DOWNLOAD((short)2, "download"),
+ EDIT((short)3, "edit"),
+ ADMIN((short)4, "admin");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // LINK
+ return LINK;
+ case 2: // DOWNLOAD
+ return DOWNLOAD;
+ case 3: // EDIT
+ return EDIT;
+ case 4: // ADMIN
+ return ADMIN;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __LINK_ISSET_ID = 0;
+ private static final int __DOWNLOAD_ISSET_ID = 1;
+ private static final int __EDIT_ISSET_ID = 2;
+ private static final int __ADMIN_ISSET_ID = 3;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.LINK, new org.apache.thrift.meta_data.FieldMetaData("link", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DOWNLOAD, new org.apache.thrift.meta_data.FieldMetaData("download", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.EDIT, new org.apache.thrift.meta_data.FieldMetaData("edit", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.ADMIN, new org.apache.thrift.meta_data.FieldMetaData("admin", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePermissions.class, metaDataMap);
+ }
+
+ public ImagePermissions() {
+ }
+
+ public ImagePermissions(
+ boolean link,
+ boolean download,
+ boolean edit,
+ boolean admin)
+ {
+ this();
+ this.link = link;
+ setLinkIsSet(true);
+ this.download = download;
+ setDownloadIsSet(true);
+ this.edit = edit;
+ setEditIsSet(true);
+ this.admin = admin;
+ setAdminIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ImagePermissions(ImagePermissions other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.link = other.link;
+ this.download = other.download;
+ this.edit = other.edit;
+ this.admin = other.admin;
+ }
+
+ public ImagePermissions deepCopy() {
+ return new ImagePermissions(this);
+ }
+
+ @Override
+ public void clear() {
+ setLinkIsSet(false);
+ this.link = false;
+ setDownloadIsSet(false);
+ this.download = false;
+ setEditIsSet(false);
+ this.edit = false;
+ setAdminIsSet(false);
+ this.admin = false;
+ }
+
+ public boolean isLink() {
+ return this.link;
+ }
+
+ public ImagePermissions setLink(boolean link) {
+ this.link = link;
+ setLinkIsSet(true);
+ return this;
+ }
+
+ public void unsetLink() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LINK_ISSET_ID);
+ }
+
+ /** Returns true if field link is set (has been assigned a value) and false otherwise */
+ public boolean isSetLink() {
+ return EncodingUtils.testBit(__isset_bitfield, __LINK_ISSET_ID);
+ }
+
+ public void setLinkIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LINK_ISSET_ID, value);
+ }
+
+ public boolean isDownload() {
+ return this.download;
+ }
+
+ public ImagePermissions setDownload(boolean download) {
+ this.download = download;
+ setDownloadIsSet(true);
+ return this;
+ }
+
+ public void unsetDownload() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOWNLOAD_ISSET_ID);
+ }
+
+ /** Returns true if field download is set (has been assigned a value) and false otherwise */
+ public boolean isSetDownload() {
+ return EncodingUtils.testBit(__isset_bitfield, __DOWNLOAD_ISSET_ID);
+ }
+
+ public void setDownloadIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOWNLOAD_ISSET_ID, value);
+ }
+
+ public boolean isEdit() {
+ return this.edit;
+ }
+
+ public ImagePermissions setEdit(boolean edit) {
+ this.edit = edit;
+ setEditIsSet(true);
+ return this;
+ }
+
+ public void unsetEdit() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EDIT_ISSET_ID);
+ }
+
+ /** Returns true if field edit is set (has been assigned a value) and false otherwise */
+ public boolean isSetEdit() {
+ return EncodingUtils.testBit(__isset_bitfield, __EDIT_ISSET_ID);
+ }
+
+ public void setEditIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EDIT_ISSET_ID, value);
+ }
+
+ public boolean isAdmin() {
+ return this.admin;
+ }
+
+ public ImagePermissions setAdmin(boolean admin) {
+ this.admin = admin;
+ setAdminIsSet(true);
+ return this;
+ }
+
+ public void unsetAdmin() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ }
+
+ /** Returns true if field admin is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdmin() {
+ return EncodingUtils.testBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ }
+
+ public void setAdminIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ADMIN_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LINK:
+ if (value == null) {
+ unsetLink();
+ } else {
+ setLink((Boolean)value);
+ }
+ break;
+
+ case DOWNLOAD:
+ if (value == null) {
+ unsetDownload();
+ } else {
+ setDownload((Boolean)value);
+ }
+ break;
+
+ case EDIT:
+ if (value == null) {
+ unsetEdit();
+ } else {
+ setEdit((Boolean)value);
+ }
+ break;
+
+ case ADMIN:
+ if (value == null) {
+ unsetAdmin();
+ } else {
+ setAdmin((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LINK:
+ return Boolean.valueOf(isLink());
+
+ case DOWNLOAD:
+ return Boolean.valueOf(isDownload());
+
+ case EDIT:
+ return Boolean.valueOf(isEdit());
+
+ case ADMIN:
+ return Boolean.valueOf(isAdmin());
+
+ }
+ 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 LINK:
+ return isSetLink();
+ case DOWNLOAD:
+ return isSetDownload();
+ case EDIT:
+ return isSetEdit();
+ case ADMIN:
+ return isSetAdmin();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ImagePermissions)
+ return this.equals((ImagePermissions)that);
+ return false;
+ }
+
+ public boolean equals(ImagePermissions that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_link = true;
+ boolean that_present_link = true;
+ if (this_present_link || that_present_link) {
+ if (!(this_present_link && that_present_link))
+ return false;
+ if (this.link != that.link)
+ return false;
+ }
+
+ boolean this_present_download = true;
+ boolean that_present_download = true;
+ if (this_present_download || that_present_download) {
+ if (!(this_present_download && that_present_download))
+ return false;
+ if (this.download != that.download)
+ return false;
+ }
+
+ boolean this_present_edit = true;
+ boolean that_present_edit = true;
+ if (this_present_edit || that_present_edit) {
+ if (!(this_present_edit && that_present_edit))
+ return false;
+ if (this.edit != that.edit)
+ return false;
+ }
+
+ boolean this_present_admin = true;
+ boolean that_present_admin = true;
+ if (this_present_admin || that_present_admin) {
+ if (!(this_present_admin && that_present_admin))
+ return false;
+ if (this.admin != that.admin)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ImagePermissions other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetLink()).compareTo(other.isSetLink());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLink()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.link, other.link);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDownload()).compareTo(other.isSetDownload());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDownload()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.download, other.download);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEdit()).compareTo(other.isSetEdit());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEdit()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.edit, other.edit);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdmin()).compareTo(other.isSetAdmin());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdmin()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.admin, other.admin);
+ 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("ImagePermissions(");
+ boolean first = true;
+
+ sb.append("link:");
+ sb.append(this.link);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("download:");
+ sb.append(this.download);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("edit:");
+ sb.append(this.edit);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("admin:");
+ sb.append(this.admin);
+ 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 ImagePermissionsStandardSchemeFactory implements SchemeFactory {
+ public ImagePermissionsStandardScheme getScheme() {
+ return new ImagePermissionsStandardScheme();
+ }
+ }
+
+ private static class ImagePermissionsStandardScheme extends StandardScheme<ImagePermissions> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ImagePermissions 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: // LINK
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.link = iprot.readBool();
+ struct.setLinkIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DOWNLOAD
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.download = iprot.readBool();
+ struct.setDownloadIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // EDIT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.edit = iprot.readBool();
+ struct.setEditIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // ADMIN
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.admin = iprot.readBool();
+ struct.setAdminIsSet(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, ImagePermissions struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(LINK_FIELD_DESC);
+ oprot.writeBool(struct.link);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(DOWNLOAD_FIELD_DESC);
+ oprot.writeBool(struct.download);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(EDIT_FIELD_DESC);
+ oprot.writeBool(struct.edit);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(ADMIN_FIELD_DESC);
+ oprot.writeBool(struct.admin);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ImagePermissionsTupleSchemeFactory implements SchemeFactory {
+ public ImagePermissionsTupleScheme getScheme() {
+ return new ImagePermissionsTupleScheme();
+ }
+ }
+
+ private static class ImagePermissionsTupleScheme extends TupleScheme<ImagePermissions> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ImagePermissions struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLink()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDownload()) {
+ optionals.set(1);
+ }
+ if (struct.isSetEdit()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAdmin()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetLink()) {
+ oprot.writeBool(struct.link);
+ }
+ if (struct.isSetDownload()) {
+ oprot.writeBool(struct.download);
+ }
+ if (struct.isSetEdit()) {
+ oprot.writeBool(struct.edit);
+ }
+ if (struct.isSetAdmin()) {
+ oprot.writeBool(struct.admin);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ImagePermissions struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.link = iprot.readBool();
+ struct.setLinkIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.download = iprot.readBool();
+ struct.setDownloadIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.edit = iprot.readBool();
+ struct.setEditIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.admin = iprot.readBool();
+ struct.setAdminIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java
new file mode 100644
index 0000000..e8c93a1
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java
@@ -0,0 +1,1362 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishData, ImagePublishData._Fields>, java.io.Serializable, Cloneable, Comparable<ImagePublishData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImagePublishData");
+
+ private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CURRENT_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("currentVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("osId", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField VIRT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtId", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField BASE_CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("baseCreateTime", org.apache.thrift.protocol.TType.I64, (short)6);
+ private static final org.apache.thrift.protocol.TField VERSION_CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("versionCreateTime", org.apache.thrift.protocol.TType.I64, (short)7);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField UPLOADER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("uploaderId", org.apache.thrift.protocol.TType.STRING, (short)9);
+ private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)11);
+ private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)16);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ImagePublishDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ImagePublishDataTupleSchemeFactory());
+ }
+
+ public String imageBaseId; // required
+ public String currentVersionId; // required
+ public String imageName; // required
+ public int osId; // required
+ public String virtId; // required
+ public long baseCreateTime; // required
+ public long versionCreateTime; // required
+ public String ownerId; // required
+ public String uploaderId; // required
+ public long fileSize; // required
+ public boolean isTemplate; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IMAGE_BASE_ID((short)1, "imageBaseId"),
+ CURRENT_VERSION_ID((short)2, "currentVersionId"),
+ IMAGE_NAME((short)3, "imageName"),
+ OS_ID((short)4, "osId"),
+ VIRT_ID((short)5, "virtId"),
+ BASE_CREATE_TIME((short)6, "baseCreateTime"),
+ VERSION_CREATE_TIME((short)7, "versionCreateTime"),
+ OWNER_ID((short)8, "ownerId"),
+ UPLOADER_ID((short)9, "uploaderId"),
+ FILE_SIZE((short)11, "fileSize"),
+ IS_TEMPLATE((short)16, "isTemplate");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ case 2: // CURRENT_VERSION_ID
+ return CURRENT_VERSION_ID;
+ case 3: // IMAGE_NAME
+ return IMAGE_NAME;
+ case 4: // OS_ID
+ return OS_ID;
+ case 5: // VIRT_ID
+ return VIRT_ID;
+ case 6: // BASE_CREATE_TIME
+ return BASE_CREATE_TIME;
+ case 7: // VERSION_CREATE_TIME
+ return VERSION_CREATE_TIME;
+ case 8: // OWNER_ID
+ return OWNER_ID;
+ case 9: // UPLOADER_ID
+ return UPLOADER_ID;
+ case 11: // FILE_SIZE
+ return FILE_SIZE;
+ case 16: // IS_TEMPLATE
+ return IS_TEMPLATE;
+ 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 __OSID_ISSET_ID = 0;
+ private static final int __BASECREATETIME_ISSET_ID = 1;
+ private static final int __VERSIONCREATETIME_ISSET_ID = 2;
+ private static final int __FILESIZE_ISSET_ID = 3;
+ private static final int __ISTEMPLATE_ISSET_ID = 4;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.CURRENT_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("currentVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.VIRT_ID, new org.apache.thrift.meta_data.FieldMetaData("virtId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.BASE_CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("baseCreateTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.VERSION_CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("versionCreateTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.UPLOADER_ID, new org.apache.thrift.meta_data.FieldMetaData("uploaderId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePublishData.class, metaDataMap);
+ }
+
+ public ImagePublishData() {
+ }
+
+ public ImagePublishData(
+ String imageBaseId,
+ String currentVersionId,
+ String imageName,
+ int osId,
+ String virtId,
+ long baseCreateTime,
+ long versionCreateTime,
+ String ownerId,
+ String uploaderId,
+ long fileSize,
+ boolean isTemplate)
+ {
+ this();
+ this.imageBaseId = imageBaseId;
+ this.currentVersionId = currentVersionId;
+ this.imageName = imageName;
+ this.osId = osId;
+ setOsIdIsSet(true);
+ this.virtId = virtId;
+ this.baseCreateTime = baseCreateTime;
+ setBaseCreateTimeIsSet(true);
+ this.versionCreateTime = versionCreateTime;
+ setVersionCreateTimeIsSet(true);
+ this.ownerId = ownerId;
+ this.uploaderId = uploaderId;
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ImagePublishData(ImagePublishData other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ if (other.isSetCurrentVersionId()) {
+ this.currentVersionId = other.currentVersionId;
+ }
+ if (other.isSetImageName()) {
+ this.imageName = other.imageName;
+ }
+ this.osId = other.osId;
+ if (other.isSetVirtId()) {
+ this.virtId = other.virtId;
+ }
+ this.baseCreateTime = other.baseCreateTime;
+ this.versionCreateTime = other.versionCreateTime;
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetUploaderId()) {
+ this.uploaderId = other.uploaderId;
+ }
+ this.fileSize = other.fileSize;
+ this.isTemplate = other.isTemplate;
+ }
+
+ public ImagePublishData deepCopy() {
+ return new ImagePublishData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.imageBaseId = null;
+ this.currentVersionId = null;
+ this.imageName = null;
+ setOsIdIsSet(false);
+ this.osId = 0;
+ this.virtId = null;
+ setBaseCreateTimeIsSet(false);
+ this.baseCreateTime = 0;
+ setVersionCreateTimeIsSet(false);
+ this.versionCreateTime = 0;
+ this.ownerId = null;
+ this.uploaderId = null;
+ setFileSizeIsSet(false);
+ this.fileSize = 0;
+ setIsTemplateIsSet(false);
+ this.isTemplate = false;
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public ImagePublishData setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public String getCurrentVersionId() {
+ return this.currentVersionId;
+ }
+
+ public ImagePublishData setCurrentVersionId(String currentVersionId) {
+ this.currentVersionId = currentVersionId;
+ return this;
+ }
+
+ public void unsetCurrentVersionId() {
+ this.currentVersionId = null;
+ }
+
+ /** Returns true if field currentVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetCurrentVersionId() {
+ return this.currentVersionId != null;
+ }
+
+ public void setCurrentVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.currentVersionId = null;
+ }
+ }
+
+ public String getImageName() {
+ return this.imageName;
+ }
+
+ public ImagePublishData setImageName(String imageName) {
+ this.imageName = imageName;
+ return this;
+ }
+
+ public void unsetImageName() {
+ this.imageName = null;
+ }
+
+ /** Returns true if field imageName is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageName() {
+ return this.imageName != null;
+ }
+
+ public void setImageNameIsSet(boolean value) {
+ if (!value) {
+ this.imageName = null;
+ }
+ }
+
+ public int getOsId() {
+ return this.osId;
+ }
+
+ public ImagePublishData setOsId(int osId) {
+ this.osId = osId;
+ setOsIdIsSet(true);
+ return this;
+ }
+
+ public void unsetOsId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ /** Returns true if field osId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOsId() {
+ return EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ public void setOsIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ }
+
+ public String getVirtId() {
+ return this.virtId;
+ }
+
+ public ImagePublishData setVirtId(String virtId) {
+ this.virtId = virtId;
+ return this;
+ }
+
+ public void unsetVirtId() {
+ this.virtId = null;
+ }
+
+ /** Returns true if field virtId is set (has been assigned a value) and false otherwise */
+ public boolean isSetVirtId() {
+ return this.virtId != null;
+ }
+
+ public void setVirtIdIsSet(boolean value) {
+ if (!value) {
+ this.virtId = null;
+ }
+ }
+
+ public long getBaseCreateTime() {
+ return this.baseCreateTime;
+ }
+
+ public ImagePublishData setBaseCreateTime(long baseCreateTime) {
+ this.baseCreateTime = baseCreateTime;
+ setBaseCreateTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetBaseCreateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BASECREATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field baseCreateTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetBaseCreateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __BASECREATETIME_ISSET_ID);
+ }
+
+ public void setBaseCreateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BASECREATETIME_ISSET_ID, value);
+ }
+
+ public long getVersionCreateTime() {
+ return this.versionCreateTime;
+ }
+
+ public ImagePublishData setVersionCreateTime(long versionCreateTime) {
+ this.versionCreateTime = versionCreateTime;
+ setVersionCreateTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetVersionCreateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSIONCREATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field versionCreateTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetVersionCreateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __VERSIONCREATETIME_ISSET_ID);
+ }
+
+ public void setVersionCreateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSIONCREATETIME_ISSET_ID, value);
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public ImagePublishData setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getUploaderId() {
+ return this.uploaderId;
+ }
+
+ public ImagePublishData setUploaderId(String uploaderId) {
+ this.uploaderId = uploaderId;
+ return this;
+ }
+
+ public void unsetUploaderId() {
+ this.uploaderId = null;
+ }
+
+ /** Returns true if field uploaderId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUploaderId() {
+ return this.uploaderId != null;
+ }
+
+ public void setUploaderIdIsSet(boolean value) {
+ if (!value) {
+ this.uploaderId = null;
+ }
+ }
+
+ public long getFileSize() {
+ return this.fileSize;
+ }
+
+ public ImagePublishData setFileSize(long fileSize) {
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ return this;
+ }
+
+ public void unsetFileSize() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
+ public boolean isSetFileSize() {
+ return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ public void setFileSizeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ }
+
+ public boolean isIsTemplate() {
+ return this.isTemplate;
+ }
+
+ public ImagePublishData setIsTemplate(boolean isTemplate) {
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ return this;
+ }
+
+ public void unsetIsTemplate() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsTemplate() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ public void setIsTemplateIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ case CURRENT_VERSION_ID:
+ if (value == null) {
+ unsetCurrentVersionId();
+ } else {
+ setCurrentVersionId((String)value);
+ }
+ break;
+
+ case IMAGE_NAME:
+ if (value == null) {
+ unsetImageName();
+ } else {
+ setImageName((String)value);
+ }
+ break;
+
+ case OS_ID:
+ if (value == null) {
+ unsetOsId();
+ } else {
+ setOsId((Integer)value);
+ }
+ break;
+
+ case VIRT_ID:
+ if (value == null) {
+ unsetVirtId();
+ } else {
+ setVirtId((String)value);
+ }
+ break;
+
+ case BASE_CREATE_TIME:
+ if (value == null) {
+ unsetBaseCreateTime();
+ } else {
+ setBaseCreateTime((Long)value);
+ }
+ break;
+
+ case VERSION_CREATE_TIME:
+ if (value == null) {
+ unsetVersionCreateTime();
+ } else {
+ setVersionCreateTime((Long)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case UPLOADER_ID:
+ if (value == null) {
+ unsetUploaderId();
+ } else {
+ setUploaderId((String)value);
+ }
+ break;
+
+ case FILE_SIZE:
+ if (value == null) {
+ unsetFileSize();
+ } else {
+ setFileSize((Long)value);
+ }
+ break;
+
+ case IS_TEMPLATE:
+ if (value == null) {
+ unsetIsTemplate();
+ } else {
+ setIsTemplate((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ case CURRENT_VERSION_ID:
+ return getCurrentVersionId();
+
+ case IMAGE_NAME:
+ return getImageName();
+
+ case OS_ID:
+ return Integer.valueOf(getOsId());
+
+ case VIRT_ID:
+ return getVirtId();
+
+ case BASE_CREATE_TIME:
+ return Long.valueOf(getBaseCreateTime());
+
+ case VERSION_CREATE_TIME:
+ return Long.valueOf(getVersionCreateTime());
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case UPLOADER_ID:
+ return getUploaderId();
+
+ case FILE_SIZE:
+ return Long.valueOf(getFileSize());
+
+ case IS_TEMPLATE:
+ return Boolean.valueOf(isIsTemplate());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ case CURRENT_VERSION_ID:
+ return isSetCurrentVersionId();
+ case IMAGE_NAME:
+ return isSetImageName();
+ case OS_ID:
+ return isSetOsId();
+ case VIRT_ID:
+ return isSetVirtId();
+ case BASE_CREATE_TIME:
+ return isSetBaseCreateTime();
+ case VERSION_CREATE_TIME:
+ return isSetVersionCreateTime();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case UPLOADER_ID:
+ return isSetUploaderId();
+ case FILE_SIZE:
+ return isSetFileSize();
+ case IS_TEMPLATE:
+ return isSetIsTemplate();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ImagePublishData)
+ return this.equals((ImagePublishData)that);
+ return false;
+ }
+
+ public boolean equals(ImagePublishData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ boolean this_present_currentVersionId = true && this.isSetCurrentVersionId();
+ boolean that_present_currentVersionId = true && that.isSetCurrentVersionId();
+ if (this_present_currentVersionId || that_present_currentVersionId) {
+ if (!(this_present_currentVersionId && that_present_currentVersionId))
+ return false;
+ if (!this.currentVersionId.equals(that.currentVersionId))
+ return false;
+ }
+
+ boolean this_present_imageName = true && this.isSetImageName();
+ boolean that_present_imageName = true && that.isSetImageName();
+ if (this_present_imageName || that_present_imageName) {
+ if (!(this_present_imageName && that_present_imageName))
+ return false;
+ if (!this.imageName.equals(that.imageName))
+ return false;
+ }
+
+ boolean this_present_osId = true;
+ boolean that_present_osId = true;
+ if (this_present_osId || that_present_osId) {
+ if (!(this_present_osId && that_present_osId))
+ return false;
+ if (this.osId != that.osId)
+ return false;
+ }
+
+ boolean this_present_virtId = true && this.isSetVirtId();
+ boolean that_present_virtId = true && that.isSetVirtId();
+ if (this_present_virtId || that_present_virtId) {
+ if (!(this_present_virtId && that_present_virtId))
+ return false;
+ if (!this.virtId.equals(that.virtId))
+ return false;
+ }
+
+ boolean this_present_baseCreateTime = true;
+ boolean that_present_baseCreateTime = true;
+ if (this_present_baseCreateTime || that_present_baseCreateTime) {
+ if (!(this_present_baseCreateTime && that_present_baseCreateTime))
+ return false;
+ if (this.baseCreateTime != that.baseCreateTime)
+ return false;
+ }
+
+ boolean this_present_versionCreateTime = true;
+ boolean that_present_versionCreateTime = true;
+ if (this_present_versionCreateTime || that_present_versionCreateTime) {
+ if (!(this_present_versionCreateTime && that_present_versionCreateTime))
+ return false;
+ if (this.versionCreateTime != that.versionCreateTime)
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_uploaderId = true && this.isSetUploaderId();
+ boolean that_present_uploaderId = true && that.isSetUploaderId();
+ if (this_present_uploaderId || that_present_uploaderId) {
+ if (!(this_present_uploaderId && that_present_uploaderId))
+ return false;
+ if (!this.uploaderId.equals(that.uploaderId))
+ return false;
+ }
+
+ boolean this_present_fileSize = true;
+ boolean that_present_fileSize = true;
+ if (this_present_fileSize || that_present_fileSize) {
+ if (!(this_present_fileSize && that_present_fileSize))
+ return false;
+ if (this.fileSize != that.fileSize)
+ return false;
+ }
+
+ boolean this_present_isTemplate = true;
+ boolean that_present_isTemplate = true;
+ if (this_present_isTemplate || that_present_isTemplate) {
+ if (!(this_present_isTemplate && that_present_isTemplate))
+ return false;
+ if (this.isTemplate != that.isTemplate)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ImagePublishData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCurrentVersionId()).compareTo(other.isSetCurrentVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCurrentVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentVersionId, other.currentVersionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOsId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osId, other.osId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVirtId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtId, other.virtId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetBaseCreateTime()).compareTo(other.isSetBaseCreateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBaseCreateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.baseCreateTime, other.baseCreateTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetVersionCreateTime()).compareTo(other.isSetVersionCreateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVersionCreateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versionCreateTime, other.versionCreateTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUploaderId()).compareTo(other.isSetUploaderId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUploaderId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploaderId, other.uploaderId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFileSize()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsTemplate()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate);
+ 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("ImagePublishData(");
+ boolean first = true;
+
+ sb.append("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("currentVersionId:");
+ if (this.currentVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.currentVersionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageName:");
+ if (this.imageName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("osId:");
+ sb.append(this.osId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("virtId:");
+ if (this.virtId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.virtId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("baseCreateTime:");
+ sb.append(this.baseCreateTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("versionCreateTime:");
+ sb.append(this.versionCreateTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("uploaderId:");
+ if (this.uploaderId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uploaderId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("fileSize:");
+ sb.append(this.fileSize);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isTemplate:");
+ sb.append(this.isTemplate);
+ 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 ImagePublishDataStandardSchemeFactory implements SchemeFactory {
+ public ImagePublishDataStandardScheme getScheme() {
+ return new ImagePublishDataStandardScheme();
+ }
+ }
+
+ private static class ImagePublishDataStandardScheme extends StandardScheme<ImagePublishData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ImagePublishData struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CURRENT_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.currentVersionId = iprot.readString();
+ struct.setCurrentVersionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // IMAGE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // OS_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // VIRT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // BASE_CREATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.baseCreateTime = iprot.readI64();
+ struct.setBaseCreateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // VERSION_CREATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.versionCreateTime = iprot.readI64();
+ struct.setVersionCreateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // UPLOADER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uploaderId = iprot.readString();
+ struct.setUploaderIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // FILE_SIZE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 16: // IS_TEMPLATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(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, ImagePublishData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.currentVersionId != null) {
+ oprot.writeFieldBegin(CURRENT_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.currentVersionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageName != null) {
+ oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
+ oprot.writeString(struct.imageName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(OS_ID_FIELD_DESC);
+ oprot.writeI32(struct.osId);
+ oprot.writeFieldEnd();
+ if (struct.virtId != null) {
+ oprot.writeFieldBegin(VIRT_ID_FIELD_DESC);
+ oprot.writeString(struct.virtId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(BASE_CREATE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.baseCreateTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(VERSION_CREATE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.versionCreateTime);
+ oprot.writeFieldEnd();
+ if (struct.ownerId != null) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.uploaderId != null) {
+ oprot.writeFieldBegin(UPLOADER_ID_FIELD_DESC);
+ oprot.writeString(struct.uploaderId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
+ oprot.writeI64(struct.fileSize);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC);
+ oprot.writeBool(struct.isTemplate);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ImagePublishDataTupleSchemeFactory implements SchemeFactory {
+ public ImagePublishDataTupleScheme getScheme() {
+ return new ImagePublishDataTupleScheme();
+ }
+ }
+
+ private static class ImagePublishDataTupleScheme extends TupleScheme<ImagePublishData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ImagePublishData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetImageBaseId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCurrentVersionId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetImageName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetOsId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetVirtId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetBaseCreateTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetVersionCreateTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(7);
+ }
+ if (struct.isSetUploaderId()) {
+ optionals.set(8);
+ }
+ if (struct.isSetFileSize()) {
+ optionals.set(9);
+ }
+ if (struct.isSetIsTemplate()) {
+ optionals.set(10);
+ }
+ oprot.writeBitSet(optionals, 11);
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ if (struct.isSetCurrentVersionId()) {
+ oprot.writeString(struct.currentVersionId);
+ }
+ if (struct.isSetImageName()) {
+ oprot.writeString(struct.imageName);
+ }
+ if (struct.isSetOsId()) {
+ oprot.writeI32(struct.osId);
+ }
+ if (struct.isSetVirtId()) {
+ oprot.writeString(struct.virtId);
+ }
+ if (struct.isSetBaseCreateTime()) {
+ oprot.writeI64(struct.baseCreateTime);
+ }
+ if (struct.isSetVersionCreateTime()) {
+ oprot.writeI64(struct.versionCreateTime);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetUploaderId()) {
+ oprot.writeString(struct.uploaderId);
+ }
+ if (struct.isSetFileSize()) {
+ oprot.writeI64(struct.fileSize);
+ }
+ if (struct.isSetIsTemplate()) {
+ oprot.writeBool(struct.isTemplate);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ImagePublishData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(11);
+ if (incoming.get(0)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.currentVersionId = iprot.readString();
+ struct.setCurrentVersionIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.baseCreateTime = iprot.readI64();
+ struct.setBaseCreateTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.versionCreateTime = iprot.readI64();
+ struct.setVersionCreateTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.uploaderId = iprot.readString();
+ struct.setUploaderIdIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
new file mode 100644
index 0000000..379fa13
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
@@ -0,0 +1,2067 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRead, ImageSummaryRead._Fields>, java.io.Serializable, Cloneable, Comparable<ImageSummaryRead> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageSummaryRead");
+
+ private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CURRENT_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("currentVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("osId", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField VIRT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtId", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)6);
+ private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.I64, (short)7);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField UPLOADER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("uploaderId", org.apache.thrift.protocol.TType.STRING, (short)9);
+ private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I32, (short)10);
+ private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)11);
+ private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)12);
+ private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)13);
+ private static final org.apache.thrift.protocol.TField IS_VALID_FIELD_DESC = new org.apache.thrift.protocol.TField("isValid", org.apache.thrift.protocol.TType.BOOL, (short)14);
+ private static final org.apache.thrift.protocol.TField IS_PROCESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("isProcessed", org.apache.thrift.protocol.TType.BOOL, (short)15);
+ private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)16);
+ private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)17);
+ private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)18);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ImageSummaryReadStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ImageSummaryReadTupleSchemeFactory());
+ }
+
+ public String imageBaseId; // required
+ public String currentVersionId; // required
+ public String imageName; // required
+ public int osId; // required
+ public String virtId; // required
+ public long createTime; // required
+ public long updateTime; // required
+ public String ownerId; // required
+ public String uploaderId; // required
+ /**
+ *
+ * @see ShareMode
+ */
+ public ShareMode shareMode; // required
+ public long fileSize; // required
+ public boolean isEnabled; // required
+ public boolean isRestricted; // required
+ public boolean isValid; // required
+ public boolean isProcessed; // required
+ public boolean isTemplate; // required
+ public ImagePermissions defaultPermissions; // required
+ public ImagePermissions userPermissions; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IMAGE_BASE_ID((short)1, "imageBaseId"),
+ CURRENT_VERSION_ID((short)2, "currentVersionId"),
+ IMAGE_NAME((short)3, "imageName"),
+ OS_ID((short)4, "osId"),
+ VIRT_ID((short)5, "virtId"),
+ CREATE_TIME((short)6, "createTime"),
+ UPDATE_TIME((short)7, "updateTime"),
+ OWNER_ID((short)8, "ownerId"),
+ UPLOADER_ID((short)9, "uploaderId"),
+ /**
+ *
+ * @see ShareMode
+ */
+ SHARE_MODE((short)10, "shareMode"),
+ FILE_SIZE((short)11, "fileSize"),
+ IS_ENABLED((short)12, "isEnabled"),
+ IS_RESTRICTED((short)13, "isRestricted"),
+ IS_VALID((short)14, "isValid"),
+ IS_PROCESSED((short)15, "isProcessed"),
+ IS_TEMPLATE((short)16, "isTemplate"),
+ DEFAULT_PERMISSIONS((short)17, "defaultPermissions"),
+ USER_PERMISSIONS((short)18, "userPermissions");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ case 2: // CURRENT_VERSION_ID
+ return CURRENT_VERSION_ID;
+ case 3: // IMAGE_NAME
+ return IMAGE_NAME;
+ case 4: // OS_ID
+ return OS_ID;
+ case 5: // VIRT_ID
+ return VIRT_ID;
+ case 6: // CREATE_TIME
+ return CREATE_TIME;
+ case 7: // UPDATE_TIME
+ return UPDATE_TIME;
+ case 8: // OWNER_ID
+ return OWNER_ID;
+ case 9: // UPLOADER_ID
+ return UPLOADER_ID;
+ case 10: // SHARE_MODE
+ return SHARE_MODE;
+ case 11: // FILE_SIZE
+ return FILE_SIZE;
+ case 12: // IS_ENABLED
+ return IS_ENABLED;
+ case 13: // IS_RESTRICTED
+ return IS_RESTRICTED;
+ case 14: // IS_VALID
+ return IS_VALID;
+ case 15: // IS_PROCESSED
+ return IS_PROCESSED;
+ case 16: // IS_TEMPLATE
+ return IS_TEMPLATE;
+ case 17: // DEFAULT_PERMISSIONS
+ return DEFAULT_PERMISSIONS;
+ case 18: // USER_PERMISSIONS
+ return USER_PERMISSIONS;
+ 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 __OSID_ISSET_ID = 0;
+ private static final int __CREATETIME_ISSET_ID = 1;
+ private static final int __UPDATETIME_ISSET_ID = 2;
+ private static final int __FILESIZE_ISSET_ID = 3;
+ private static final int __ISENABLED_ISSET_ID = 4;
+ private static final int __ISRESTRICTED_ISSET_ID = 5;
+ private static final int __ISVALID_ISSET_ID = 6;
+ private static final int __ISPROCESSED_ISSET_ID = 7;
+ private static final int __ISTEMPLATE_ISSET_ID = 8;
+ private short __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.USER_PERMISSIONS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.CURRENT_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("currentVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.VIRT_ID, new org.apache.thrift.meta_data.FieldMetaData("virtId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.UPLOADER_ID, new org.apache.thrift.meta_data.FieldMetaData("uploaderId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ShareMode.class)));
+ tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_VALID, new org.apache.thrift.meta_data.FieldMetaData("isValid", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_PROCESSED, new org.apache.thrift.meta_data.FieldMetaData("isProcessed", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)));
+ tmpMap.put(_Fields.USER_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("userPermissions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageSummaryRead.class, metaDataMap);
+ }
+
+ public ImageSummaryRead() {
+ }
+
+ public ImageSummaryRead(
+ String imageBaseId,
+ String currentVersionId,
+ String imageName,
+ int osId,
+ String virtId,
+ long createTime,
+ long updateTime,
+ String ownerId,
+ String uploaderId,
+ ShareMode shareMode,
+ long fileSize,
+ boolean isEnabled,
+ boolean isRestricted,
+ boolean isValid,
+ boolean isProcessed,
+ boolean isTemplate,
+ ImagePermissions defaultPermissions)
+ {
+ this();
+ this.imageBaseId = imageBaseId;
+ this.currentVersionId = currentVersionId;
+ this.imageName = imageName;
+ this.osId = osId;
+ setOsIdIsSet(true);
+ this.virtId = virtId;
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ this.updateTime = updateTime;
+ setUpdateTimeIsSet(true);
+ this.ownerId = ownerId;
+ this.uploaderId = uploaderId;
+ this.shareMode = shareMode;
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ this.isRestricted = isRestricted;
+ setIsRestrictedIsSet(true);
+ this.isValid = isValid;
+ setIsValidIsSet(true);
+ this.isProcessed = isProcessed;
+ setIsProcessedIsSet(true);
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ this.defaultPermissions = defaultPermissions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ImageSummaryRead(ImageSummaryRead other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ if (other.isSetCurrentVersionId()) {
+ this.currentVersionId = other.currentVersionId;
+ }
+ if (other.isSetImageName()) {
+ this.imageName = other.imageName;
+ }
+ this.osId = other.osId;
+ if (other.isSetVirtId()) {
+ this.virtId = other.virtId;
+ }
+ this.createTime = other.createTime;
+ this.updateTime = other.updateTime;
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetUploaderId()) {
+ this.uploaderId = other.uploaderId;
+ }
+ if (other.isSetShareMode()) {
+ this.shareMode = other.shareMode;
+ }
+ this.fileSize = other.fileSize;
+ this.isEnabled = other.isEnabled;
+ this.isRestricted = other.isRestricted;
+ this.isValid = other.isValid;
+ this.isProcessed = other.isProcessed;
+ this.isTemplate = other.isTemplate;
+ if (other.isSetDefaultPermissions()) {
+ this.defaultPermissions = new ImagePermissions(other.defaultPermissions);
+ }
+ if (other.isSetUserPermissions()) {
+ this.userPermissions = new ImagePermissions(other.userPermissions);
+ }
+ }
+
+ public ImageSummaryRead deepCopy() {
+ return new ImageSummaryRead(this);
+ }
+
+ @Override
+ public void clear() {
+ this.imageBaseId = null;
+ this.currentVersionId = null;
+ this.imageName = null;
+ setOsIdIsSet(false);
+ this.osId = 0;
+ this.virtId = null;
+ setCreateTimeIsSet(false);
+ this.createTime = 0;
+ setUpdateTimeIsSet(false);
+ this.updateTime = 0;
+ this.ownerId = null;
+ this.uploaderId = null;
+ this.shareMode = null;
+ setFileSizeIsSet(false);
+ this.fileSize = 0;
+ setIsEnabledIsSet(false);
+ this.isEnabled = false;
+ setIsRestrictedIsSet(false);
+ this.isRestricted = false;
+ setIsValidIsSet(false);
+ this.isValid = false;
+ setIsProcessedIsSet(false);
+ this.isProcessed = false;
+ setIsTemplateIsSet(false);
+ this.isTemplate = false;
+ this.defaultPermissions = null;
+ this.userPermissions = null;
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public ImageSummaryRead setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public String getCurrentVersionId() {
+ return this.currentVersionId;
+ }
+
+ public ImageSummaryRead setCurrentVersionId(String currentVersionId) {
+ this.currentVersionId = currentVersionId;
+ return this;
+ }
+
+ public void unsetCurrentVersionId() {
+ this.currentVersionId = null;
+ }
+
+ /** Returns true if field currentVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetCurrentVersionId() {
+ return this.currentVersionId != null;
+ }
+
+ public void setCurrentVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.currentVersionId = null;
+ }
+ }
+
+ public String getImageName() {
+ return this.imageName;
+ }
+
+ public ImageSummaryRead setImageName(String imageName) {
+ this.imageName = imageName;
+ return this;
+ }
+
+ public void unsetImageName() {
+ this.imageName = null;
+ }
+
+ /** Returns true if field imageName is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageName() {
+ return this.imageName != null;
+ }
+
+ public void setImageNameIsSet(boolean value) {
+ if (!value) {
+ this.imageName = null;
+ }
+ }
+
+ public int getOsId() {
+ return this.osId;
+ }
+
+ public ImageSummaryRead setOsId(int osId) {
+ this.osId = osId;
+ setOsIdIsSet(true);
+ return this;
+ }
+
+ public void unsetOsId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ /** Returns true if field osId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOsId() {
+ return EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ public void setOsIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ }
+
+ public String getVirtId() {
+ return this.virtId;
+ }
+
+ public ImageSummaryRead setVirtId(String virtId) {
+ this.virtId = virtId;
+ return this;
+ }
+
+ public void unsetVirtId() {
+ this.virtId = null;
+ }
+
+ /** Returns true if field virtId is set (has been assigned a value) and false otherwise */
+ public boolean isSetVirtId() {
+ return this.virtId != null;
+ }
+
+ public void setVirtIdIsSet(boolean value) {
+ if (!value) {
+ this.virtId = null;
+ }
+ }
+
+ public long getCreateTime() {
+ return this.createTime;
+ }
+
+ public ImageSummaryRead setCreateTime(long createTime) {
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ public void setCreateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ }
+
+ public long getUpdateTime() {
+ return this.updateTime;
+ }
+
+ public ImageSummaryRead setUpdateTime(long updateTime) {
+ this.updateTime = updateTime;
+ setUpdateTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetUpdateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
+ }
+
+ public void setUpdateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public ImageSummaryRead setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getUploaderId() {
+ return this.uploaderId;
+ }
+
+ public ImageSummaryRead setUploaderId(String uploaderId) {
+ this.uploaderId = uploaderId;
+ return this;
+ }
+
+ public void unsetUploaderId() {
+ this.uploaderId = null;
+ }
+
+ /** Returns true if field uploaderId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUploaderId() {
+ return this.uploaderId != null;
+ }
+
+ public void setUploaderIdIsSet(boolean value) {
+ if (!value) {
+ this.uploaderId = null;
+ }
+ }
+
+ /**
+ *
+ * @see ShareMode
+ */
+ public ShareMode getShareMode() {
+ return this.shareMode;
+ }
+
+ /**
+ *
+ * @see ShareMode
+ */
+ public ImageSummaryRead setShareMode(ShareMode shareMode) {
+ this.shareMode = shareMode;
+ return this;
+ }
+
+ public void unsetShareMode() {
+ this.shareMode = null;
+ }
+
+ /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */
+ public boolean isSetShareMode() {
+ return this.shareMode != null;
+ }
+
+ public void setShareModeIsSet(boolean value) {
+ if (!value) {
+ this.shareMode = null;
+ }
+ }
+
+ public long getFileSize() {
+ return this.fileSize;
+ }
+
+ public ImageSummaryRead setFileSize(long fileSize) {
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ return this;
+ }
+
+ public void unsetFileSize() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
+ public boolean isSetFileSize() {
+ return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ public void setFileSizeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ }
+
+ public boolean isIsEnabled() {
+ return this.isEnabled;
+ }
+
+ public ImageSummaryRead setIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ return this;
+ }
+
+ public void unsetIsEnabled() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ /** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsEnabled() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ public void setIsEnabledIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ }
+
+ public boolean isIsRestricted() {
+ return this.isRestricted;
+ }
+
+ public ImageSummaryRead setIsRestricted(boolean isRestricted) {
+ this.isRestricted = isRestricted;
+ setIsRestrictedIsSet(true);
+ return this;
+ }
+
+ public void unsetIsRestricted() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ }
+
+ /** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsRestricted() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ }
+
+ public void setIsRestrictedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
+ }
+
+ public boolean isIsValid() {
+ return this.isValid;
+ }
+
+ public ImageSummaryRead setIsValid(boolean isValid) {
+ this.isValid = isValid;
+ setIsValidIsSet(true);
+ return this;
+ }
+
+ public void unsetIsValid() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ }
+
+ /** Returns true if field isValid is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsValid() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ }
+
+ public void setIsValidIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
+ }
+
+ public boolean isIsProcessed() {
+ return this.isProcessed;
+ }
+
+ public ImageSummaryRead setIsProcessed(boolean isProcessed) {
+ this.isProcessed = isProcessed;
+ setIsProcessedIsSet(true);
+ return this;
+ }
+
+ public void unsetIsProcessed() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ }
+
+ /** Returns true if field isProcessed is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsProcessed() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ }
+
+ public void setIsProcessedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISPROCESSED_ISSET_ID, value);
+ }
+
+ public boolean isIsTemplate() {
+ return this.isTemplate;
+ }
+
+ public ImageSummaryRead setIsTemplate(boolean isTemplate) {
+ this.isTemplate = isTemplate;
+ setIsTemplateIsSet(true);
+ return this;
+ }
+
+ public void unsetIsTemplate() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsTemplate() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ }
+
+ public void setIsTemplateIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
+ }
+
+ public ImagePermissions getDefaultPermissions() {
+ return this.defaultPermissions;
+ }
+
+ public ImageSummaryRead setDefaultPermissions(ImagePermissions defaultPermissions) {
+ this.defaultPermissions = defaultPermissions;
+ return this;
+ }
+
+ public void unsetDefaultPermissions() {
+ this.defaultPermissions = null;
+ }
+
+ /** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultPermissions() {
+ return this.defaultPermissions != null;
+ }
+
+ public void setDefaultPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.defaultPermissions = null;
+ }
+ }
+
+ public ImagePermissions getUserPermissions() {
+ return this.userPermissions;
+ }
+
+ public ImageSummaryRead setUserPermissions(ImagePermissions userPermissions) {
+ this.userPermissions = userPermissions;
+ return this;
+ }
+
+ public void unsetUserPermissions() {
+ this.userPermissions = null;
+ }
+
+ /** Returns true if field userPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserPermissions() {
+ return this.userPermissions != null;
+ }
+
+ public void setUserPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.userPermissions = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ case CURRENT_VERSION_ID:
+ if (value == null) {
+ unsetCurrentVersionId();
+ } else {
+ setCurrentVersionId((String)value);
+ }
+ break;
+
+ case IMAGE_NAME:
+ if (value == null) {
+ unsetImageName();
+ } else {
+ setImageName((String)value);
+ }
+ break;
+
+ case OS_ID:
+ if (value == null) {
+ unsetOsId();
+ } else {
+ setOsId((Integer)value);
+ }
+ break;
+
+ case VIRT_ID:
+ if (value == null) {
+ unsetVirtId();
+ } else {
+ setVirtId((String)value);
+ }
+ break;
+
+ case CREATE_TIME:
+ if (value == null) {
+ unsetCreateTime();
+ } else {
+ setCreateTime((Long)value);
+ }
+ break;
+
+ case UPDATE_TIME:
+ if (value == null) {
+ unsetUpdateTime();
+ } else {
+ setUpdateTime((Long)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case UPLOADER_ID:
+ if (value == null) {
+ unsetUploaderId();
+ } else {
+ setUploaderId((String)value);
+ }
+ break;
+
+ case SHARE_MODE:
+ if (value == null) {
+ unsetShareMode();
+ } else {
+ setShareMode((ShareMode)value);
+ }
+ break;
+
+ case FILE_SIZE:
+ if (value == null) {
+ unsetFileSize();
+ } else {
+ setFileSize((Long)value);
+ }
+ break;
+
+ case IS_ENABLED:
+ if (value == null) {
+ unsetIsEnabled();
+ } else {
+ setIsEnabled((Boolean)value);
+ }
+ break;
+
+ case IS_RESTRICTED:
+ if (value == null) {
+ unsetIsRestricted();
+ } else {
+ setIsRestricted((Boolean)value);
+ }
+ break;
+
+ case IS_VALID:
+ if (value == null) {
+ unsetIsValid();
+ } else {
+ setIsValid((Boolean)value);
+ }
+ break;
+
+ case IS_PROCESSED:
+ if (value == null) {
+ unsetIsProcessed();
+ } else {
+ setIsProcessed((Boolean)value);
+ }
+ break;
+
+ case IS_TEMPLATE:
+ if (value == null) {
+ unsetIsTemplate();
+ } else {
+ setIsTemplate((Boolean)value);
+ }
+ break;
+
+ case DEFAULT_PERMISSIONS:
+ if (value == null) {
+ unsetDefaultPermissions();
+ } else {
+ setDefaultPermissions((ImagePermissions)value);
+ }
+ break;
+
+ case USER_PERMISSIONS:
+ if (value == null) {
+ unsetUserPermissions();
+ } else {
+ setUserPermissions((ImagePermissions)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ case CURRENT_VERSION_ID:
+ return getCurrentVersionId();
+
+ case IMAGE_NAME:
+ return getImageName();
+
+ case OS_ID:
+ return Integer.valueOf(getOsId());
+
+ case VIRT_ID:
+ return getVirtId();
+
+ case CREATE_TIME:
+ return Long.valueOf(getCreateTime());
+
+ case UPDATE_TIME:
+ return Long.valueOf(getUpdateTime());
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case UPLOADER_ID:
+ return getUploaderId();
+
+ case SHARE_MODE:
+ return getShareMode();
+
+ case FILE_SIZE:
+ return Long.valueOf(getFileSize());
+
+ case IS_ENABLED:
+ return Boolean.valueOf(isIsEnabled());
+
+ case IS_RESTRICTED:
+ return Boolean.valueOf(isIsRestricted());
+
+ case IS_VALID:
+ return Boolean.valueOf(isIsValid());
+
+ case IS_PROCESSED:
+ return Boolean.valueOf(isIsProcessed());
+
+ case IS_TEMPLATE:
+ return Boolean.valueOf(isIsTemplate());
+
+ case DEFAULT_PERMISSIONS:
+ return getDefaultPermissions();
+
+ case USER_PERMISSIONS:
+ return getUserPermissions();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ case CURRENT_VERSION_ID:
+ return isSetCurrentVersionId();
+ case IMAGE_NAME:
+ return isSetImageName();
+ case OS_ID:
+ return isSetOsId();
+ case VIRT_ID:
+ return isSetVirtId();
+ case CREATE_TIME:
+ return isSetCreateTime();
+ case UPDATE_TIME:
+ return isSetUpdateTime();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case UPLOADER_ID:
+ return isSetUploaderId();
+ case SHARE_MODE:
+ return isSetShareMode();
+ case FILE_SIZE:
+ return isSetFileSize();
+ case IS_ENABLED:
+ return isSetIsEnabled();
+ case IS_RESTRICTED:
+ return isSetIsRestricted();
+ case IS_VALID:
+ return isSetIsValid();
+ case IS_PROCESSED:
+ return isSetIsProcessed();
+ case IS_TEMPLATE:
+ return isSetIsTemplate();
+ case DEFAULT_PERMISSIONS:
+ return isSetDefaultPermissions();
+ case USER_PERMISSIONS:
+ return isSetUserPermissions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ImageSummaryRead)
+ return this.equals((ImageSummaryRead)that);
+ return false;
+ }
+
+ public boolean equals(ImageSummaryRead that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ boolean this_present_currentVersionId = true && this.isSetCurrentVersionId();
+ boolean that_present_currentVersionId = true && that.isSetCurrentVersionId();
+ if (this_present_currentVersionId || that_present_currentVersionId) {
+ if (!(this_present_currentVersionId && that_present_currentVersionId))
+ return false;
+ if (!this.currentVersionId.equals(that.currentVersionId))
+ return false;
+ }
+
+ boolean this_present_imageName = true && this.isSetImageName();
+ boolean that_present_imageName = true && that.isSetImageName();
+ if (this_present_imageName || that_present_imageName) {
+ if (!(this_present_imageName && that_present_imageName))
+ return false;
+ if (!this.imageName.equals(that.imageName))
+ return false;
+ }
+
+ boolean this_present_osId = true;
+ boolean that_present_osId = true;
+ if (this_present_osId || that_present_osId) {
+ if (!(this_present_osId && that_present_osId))
+ return false;
+ if (this.osId != that.osId)
+ return false;
+ }
+
+ boolean this_present_virtId = true && this.isSetVirtId();
+ boolean that_present_virtId = true && that.isSetVirtId();
+ if (this_present_virtId || that_present_virtId) {
+ if (!(this_present_virtId && that_present_virtId))
+ return false;
+ if (!this.virtId.equals(that.virtId))
+ return false;
+ }
+
+ boolean this_present_createTime = true;
+ boolean that_present_createTime = true;
+ if (this_present_createTime || that_present_createTime) {
+ if (!(this_present_createTime && that_present_createTime))
+ return false;
+ if (this.createTime != that.createTime)
+ return false;
+ }
+
+ boolean this_present_updateTime = true;
+ boolean that_present_updateTime = true;
+ if (this_present_updateTime || that_present_updateTime) {
+ if (!(this_present_updateTime && that_present_updateTime))
+ return false;
+ if (this.updateTime != that.updateTime)
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_uploaderId = true && this.isSetUploaderId();
+ boolean that_present_uploaderId = true && that.isSetUploaderId();
+ if (this_present_uploaderId || that_present_uploaderId) {
+ if (!(this_present_uploaderId && that_present_uploaderId))
+ return false;
+ if (!this.uploaderId.equals(that.uploaderId))
+ return false;
+ }
+
+ boolean this_present_shareMode = true && this.isSetShareMode();
+ boolean that_present_shareMode = true && that.isSetShareMode();
+ if (this_present_shareMode || that_present_shareMode) {
+ if (!(this_present_shareMode && that_present_shareMode))
+ return false;
+ if (!this.shareMode.equals(that.shareMode))
+ return false;
+ }
+
+ boolean this_present_fileSize = true;
+ boolean that_present_fileSize = true;
+ if (this_present_fileSize || that_present_fileSize) {
+ if (!(this_present_fileSize && that_present_fileSize))
+ return false;
+ if (this.fileSize != that.fileSize)
+ return false;
+ }
+
+ boolean this_present_isEnabled = true;
+ boolean that_present_isEnabled = true;
+ if (this_present_isEnabled || that_present_isEnabled) {
+ if (!(this_present_isEnabled && that_present_isEnabled))
+ return false;
+ if (this.isEnabled != that.isEnabled)
+ return false;
+ }
+
+ boolean this_present_isRestricted = true;
+ boolean that_present_isRestricted = true;
+ if (this_present_isRestricted || that_present_isRestricted) {
+ if (!(this_present_isRestricted && that_present_isRestricted))
+ return false;
+ if (this.isRestricted != that.isRestricted)
+ return false;
+ }
+
+ boolean this_present_isValid = true;
+ boolean that_present_isValid = true;
+ if (this_present_isValid || that_present_isValid) {
+ if (!(this_present_isValid && that_present_isValid))
+ return false;
+ if (this.isValid != that.isValid)
+ return false;
+ }
+
+ boolean this_present_isProcessed = true;
+ boolean that_present_isProcessed = true;
+ if (this_present_isProcessed || that_present_isProcessed) {
+ if (!(this_present_isProcessed && that_present_isProcessed))
+ return false;
+ if (this.isProcessed != that.isProcessed)
+ return false;
+ }
+
+ boolean this_present_isTemplate = true;
+ boolean that_present_isTemplate = true;
+ if (this_present_isTemplate || that_present_isTemplate) {
+ if (!(this_present_isTemplate && that_present_isTemplate))
+ return false;
+ if (this.isTemplate != that.isTemplate)
+ return false;
+ }
+
+ boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions();
+ boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions();
+ if (this_present_defaultPermissions || that_present_defaultPermissions) {
+ if (!(this_present_defaultPermissions && that_present_defaultPermissions))
+ return false;
+ if (!this.defaultPermissions.equals(that.defaultPermissions))
+ return false;
+ }
+
+ boolean this_present_userPermissions = true && this.isSetUserPermissions();
+ boolean that_present_userPermissions = true && that.isSetUserPermissions();
+ if (this_present_userPermissions || that_present_userPermissions) {
+ if (!(this_present_userPermissions && that_present_userPermissions))
+ return false;
+ if (!this.userPermissions.equals(that.userPermissions))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ImageSummaryRead other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCurrentVersionId()).compareTo(other.isSetCurrentVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCurrentVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentVersionId, other.currentVersionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOsId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osId, other.osId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVirtId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtId, other.virtId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUploaderId()).compareTo(other.isSetUploaderId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUploaderId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploaderId, other.uploaderId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetShareMode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFileSize()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsEnabled()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEnabled, other.isEnabled);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsRestricted()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRestricted, other.isRestricted);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsValid()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, other.isValid);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsProcessed()).compareTo(other.isSetIsProcessed());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsProcessed()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isProcessed, other.isProcessed);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsTemplate()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPermissions, other.userPermissions);
+ 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("ImageSummaryRead(");
+ boolean first = true;
+
+ sb.append("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("currentVersionId:");
+ if (this.currentVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.currentVersionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageName:");
+ if (this.imageName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("osId:");
+ sb.append(this.osId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("virtId:");
+ if (this.virtId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.virtId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("createTime:");
+ sb.append(this.createTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("updateTime:");
+ sb.append(this.updateTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("uploaderId:");
+ if (this.uploaderId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uploaderId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("shareMode:");
+ if (this.shareMode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.shareMode);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("fileSize:");
+ sb.append(this.fileSize);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isEnabled:");
+ sb.append(this.isEnabled);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isRestricted:");
+ sb.append(this.isRestricted);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isValid:");
+ sb.append(this.isValid);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isProcessed:");
+ sb.append(this.isProcessed);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isTemplate:");
+ sb.append(this.isTemplate);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("defaultPermissions:");
+ if (this.defaultPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.defaultPermissions);
+ }
+ first = false;
+ if (isSetUserPermissions()) {
+ if (!first) sb.append(", ");
+ sb.append("userPermissions:");
+ if (this.userPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userPermissions);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (defaultPermissions != null) {
+ defaultPermissions.validate();
+ }
+ if (userPermissions != null) {
+ userPermissions.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // 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 ImageSummaryReadStandardSchemeFactory implements SchemeFactory {
+ public ImageSummaryReadStandardScheme getScheme() {
+ return new ImageSummaryReadStandardScheme();
+ }
+ }
+
+ private static class ImageSummaryReadStandardScheme extends StandardScheme<ImageSummaryRead> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ImageSummaryRead struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CURRENT_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.currentVersionId = iprot.readString();
+ struct.setCurrentVersionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // IMAGE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // OS_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // VIRT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // CREATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createTime = iprot.readI64();
+ struct.setCreateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // UPDATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.updateTime = iprot.readI64();
+ struct.setUpdateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // UPLOADER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uploaderId = iprot.readString();
+ struct.setUploaderIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // SHARE_MODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.shareMode = ShareMode.findByValue(iprot.readI32());
+ struct.setShareModeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // FILE_SIZE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // IS_ENABLED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // IS_RESTRICTED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isRestricted = iprot.readBool();
+ struct.setIsRestrictedIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // IS_VALID
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isValid = iprot.readBool();
+ struct.setIsValidIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 15: // IS_PROCESSED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isProcessed = iprot.readBool();
+ struct.setIsProcessedIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 16: // IS_TEMPLATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 17: // DEFAULT_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.defaultPermissions = new ImagePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 18: // USER_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.userPermissions = new ImagePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(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, ImageSummaryRead struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.currentVersionId != null) {
+ oprot.writeFieldBegin(CURRENT_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.currentVersionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageName != null) {
+ oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
+ oprot.writeString(struct.imageName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(OS_ID_FIELD_DESC);
+ oprot.writeI32(struct.osId);
+ oprot.writeFieldEnd();
+ if (struct.virtId != null) {
+ oprot.writeFieldBegin(VIRT_ID_FIELD_DESC);
+ oprot.writeString(struct.virtId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.updateTime);
+ oprot.writeFieldEnd();
+ if (struct.ownerId != null) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.uploaderId != null) {
+ oprot.writeFieldBegin(UPLOADER_ID_FIELD_DESC);
+ oprot.writeString(struct.uploaderId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.shareMode != null) {
+ oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC);
+ oprot.writeI32(struct.shareMode.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
+ oprot.writeI64(struct.fileSize);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
+ oprot.writeBool(struct.isEnabled);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_RESTRICTED_FIELD_DESC);
+ oprot.writeBool(struct.isRestricted);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
+ oprot.writeBool(struct.isValid);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_PROCESSED_FIELD_DESC);
+ oprot.writeBool(struct.isProcessed);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC);
+ oprot.writeBool(struct.isTemplate);
+ oprot.writeFieldEnd();
+ if (struct.defaultPermissions != null) {
+ oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC);
+ struct.defaultPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userPermissions != null) {
+ if (struct.isSetUserPermissions()) {
+ oprot.writeFieldBegin(USER_PERMISSIONS_FIELD_DESC);
+ struct.userPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ImageSummaryReadTupleSchemeFactory implements SchemeFactory {
+ public ImageSummaryReadTupleScheme getScheme() {
+ return new ImageSummaryReadTupleScheme();
+ }
+ }
+
+ private static class ImageSummaryReadTupleScheme extends TupleScheme<ImageSummaryRead> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ImageSummaryRead struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetImageBaseId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCurrentVersionId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetImageName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetOsId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetVirtId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetCreateTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetUpdateTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(7);
+ }
+ if (struct.isSetUploaderId()) {
+ optionals.set(8);
+ }
+ if (struct.isSetShareMode()) {
+ optionals.set(9);
+ }
+ if (struct.isSetFileSize()) {
+ optionals.set(10);
+ }
+ if (struct.isSetIsEnabled()) {
+ optionals.set(11);
+ }
+ if (struct.isSetIsRestricted()) {
+ optionals.set(12);
+ }
+ if (struct.isSetIsValid()) {
+ optionals.set(13);
+ }
+ if (struct.isSetIsProcessed()) {
+ optionals.set(14);
+ }
+ if (struct.isSetIsTemplate()) {
+ optionals.set(15);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ optionals.set(16);
+ }
+ if (struct.isSetUserPermissions()) {
+ optionals.set(17);
+ }
+ oprot.writeBitSet(optionals, 18);
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ if (struct.isSetCurrentVersionId()) {
+ oprot.writeString(struct.currentVersionId);
+ }
+ if (struct.isSetImageName()) {
+ oprot.writeString(struct.imageName);
+ }
+ if (struct.isSetOsId()) {
+ oprot.writeI32(struct.osId);
+ }
+ if (struct.isSetVirtId()) {
+ oprot.writeString(struct.virtId);
+ }
+ if (struct.isSetCreateTime()) {
+ oprot.writeI64(struct.createTime);
+ }
+ if (struct.isSetUpdateTime()) {
+ oprot.writeI64(struct.updateTime);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetUploaderId()) {
+ oprot.writeString(struct.uploaderId);
+ }
+ if (struct.isSetShareMode()) {
+ oprot.writeI32(struct.shareMode.getValue());
+ }
+ if (struct.isSetFileSize()) {
+ oprot.writeI64(struct.fileSize);
+ }
+ if (struct.isSetIsEnabled()) {
+ oprot.writeBool(struct.isEnabled);
+ }
+ if (struct.isSetIsRestricted()) {
+ oprot.writeBool(struct.isRestricted);
+ }
+ if (struct.isSetIsValid()) {
+ oprot.writeBool(struct.isValid);
+ }
+ if (struct.isSetIsProcessed()) {
+ oprot.writeBool(struct.isProcessed);
+ }
+ if (struct.isSetIsTemplate()) {
+ oprot.writeBool(struct.isTemplate);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ struct.defaultPermissions.write(oprot);
+ }
+ if (struct.isSetUserPermissions()) {
+ struct.userPermissions.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ImageSummaryRead struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(18);
+ if (incoming.get(0)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.currentVersionId = iprot.readString();
+ struct.setCurrentVersionIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.createTime = iprot.readI64();
+ struct.setCreateTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.updateTime = iprot.readI64();
+ struct.setUpdateTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.uploaderId = iprot.readString();
+ struct.setUploaderIdIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.shareMode = ShareMode.findByValue(iprot.readI32());
+ struct.setShareModeIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ }
+ if (incoming.get(11)) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ }
+ if (incoming.get(12)) {
+ struct.isRestricted = iprot.readBool();
+ struct.setIsRestrictedIsSet(true);
+ }
+ if (incoming.get(13)) {
+ struct.isValid = iprot.readBool();
+ struct.setIsValidIsSet(true);
+ }
+ if (incoming.get(14)) {
+ struct.isProcessed = iprot.readBool();
+ struct.setIsProcessedIsSet(true);
+ }
+ if (incoming.get(15)) {
+ struct.isTemplate = iprot.readBool();
+ struct.setIsTemplateIsSet(true);
+ }
+ if (incoming.get(16)) {
+ struct.defaultPermissions = new ImagePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ }
+ if (incoming.get(17)) {
+ struct.userPermissions = new ImagePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java
new file mode 100644
index 0000000..39202db
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java
@@ -0,0 +1,1150 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersionDetails, ImageVersionDetails._Fields>, java.io.Serializable, Cloneable, Comparable<ImageVersionDetails> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageVersionDetails");
+
+ private static final org.apache.thrift.protocol.TField VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("versionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField EXPIRE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expireTime", org.apache.thrift.protocol.TType.I64, (short)3);
+ private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)4);
+ private static final org.apache.thrift.protocol.TField UPLOADER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("uploaderId", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)6);
+ private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)7);
+ private static final org.apache.thrift.protocol.TField IS_VALID_FIELD_DESC = new org.apache.thrift.protocol.TField("isValid", org.apache.thrift.protocol.TType.BOOL, (short)8);
+ private static final org.apache.thrift.protocol.TField IS_PROCESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("isProcessed", org.apache.thrift.protocol.TType.BOOL, (short)9);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ImageVersionDetailsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ImageVersionDetailsTupleSchemeFactory());
+ }
+
+ public String versionId; // required
+ public long createTime; // required
+ public long expireTime; // required
+ public long fileSize; // required
+ public String uploaderId; // required
+ public boolean isEnabled; // required
+ public boolean isRestricted; // required
+ public boolean isValid; // required
+ public boolean isProcessed; // 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 {
+ VERSION_ID((short)1, "versionId"),
+ CREATE_TIME((short)2, "createTime"),
+ EXPIRE_TIME((short)3, "expireTime"),
+ FILE_SIZE((short)4, "fileSize"),
+ UPLOADER_ID((short)5, "uploaderId"),
+ IS_ENABLED((short)6, "isEnabled"),
+ IS_RESTRICTED((short)7, "isRestricted"),
+ IS_VALID((short)8, "isValid"),
+ IS_PROCESSED((short)9, "isProcessed");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // VERSION_ID
+ return VERSION_ID;
+ case 2: // CREATE_TIME
+ return CREATE_TIME;
+ case 3: // EXPIRE_TIME
+ return EXPIRE_TIME;
+ case 4: // FILE_SIZE
+ return FILE_SIZE;
+ case 5: // UPLOADER_ID
+ return UPLOADER_ID;
+ case 6: // IS_ENABLED
+ return IS_ENABLED;
+ case 7: // IS_RESTRICTED
+ return IS_RESTRICTED;
+ case 8: // IS_VALID
+ return IS_VALID;
+ case 9: // IS_PROCESSED
+ return IS_PROCESSED;
+ 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 __CREATETIME_ISSET_ID = 0;
+ private static final int __EXPIRETIME_ISSET_ID = 1;
+ private static final int __FILESIZE_ISSET_ID = 2;
+ private static final int __ISENABLED_ISSET_ID = 3;
+ private static final int __ISRESTRICTED_ISSET_ID = 4;
+ private static final int __ISVALID_ISSET_ID = 5;
+ private static final int __ISPROCESSED_ISSET_ID = 6;
+ 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.VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("versionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.EXPIRE_TIME, new org.apache.thrift.meta_data.FieldMetaData("expireTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.UPLOADER_ID, new org.apache.thrift.meta_data.FieldMetaData("uploaderId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_VALID, new org.apache.thrift.meta_data.FieldMetaData("isValid", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_PROCESSED, new org.apache.thrift.meta_data.FieldMetaData("isProcessed", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageVersionDetails.class, metaDataMap);
+ }
+
+ public ImageVersionDetails() {
+ }
+
+ public ImageVersionDetails(
+ String versionId,
+ long createTime,
+ long expireTime,
+ long fileSize,
+ String uploaderId,
+ boolean isEnabled,
+ boolean isRestricted,
+ boolean isValid,
+ boolean isProcessed)
+ {
+ this();
+ this.versionId = versionId;
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ this.expireTime = expireTime;
+ setExpireTimeIsSet(true);
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ this.uploaderId = uploaderId;
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ this.isRestricted = isRestricted;
+ setIsRestrictedIsSet(true);
+ this.isValid = isValid;
+ setIsValidIsSet(true);
+ this.isProcessed = isProcessed;
+ setIsProcessedIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ImageVersionDetails(ImageVersionDetails other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetVersionId()) {
+ this.versionId = other.versionId;
+ }
+ this.createTime = other.createTime;
+ this.expireTime = other.expireTime;
+ this.fileSize = other.fileSize;
+ if (other.isSetUploaderId()) {
+ this.uploaderId = other.uploaderId;
+ }
+ this.isEnabled = other.isEnabled;
+ this.isRestricted = other.isRestricted;
+ this.isValid = other.isValid;
+ this.isProcessed = other.isProcessed;
+ }
+
+ public ImageVersionDetails deepCopy() {
+ return new ImageVersionDetails(this);
+ }
+
+ @Override
+ public void clear() {
+ this.versionId = null;
+ setCreateTimeIsSet(false);
+ this.createTime = 0;
+ setExpireTimeIsSet(false);
+ this.expireTime = 0;
+ setFileSizeIsSet(false);
+ this.fileSize = 0;
+ this.uploaderId = null;
+ setIsEnabledIsSet(false);
+ this.isEnabled = false;
+ setIsRestrictedIsSet(false);
+ this.isRestricted = false;
+ setIsValidIsSet(false);
+ this.isValid = false;
+ setIsProcessedIsSet(false);
+ this.isProcessed = false;
+ }
+
+ public String getVersionId() {
+ return this.versionId;
+ }
+
+ public ImageVersionDetails setVersionId(String versionId) {
+ this.versionId = versionId;
+ return this;
+ }
+
+ public void unsetVersionId() {
+ this.versionId = null;
+ }
+
+ /** Returns true if field versionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetVersionId() {
+ return this.versionId != null;
+ }
+
+ public void setVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.versionId = null;
+ }
+ }
+
+ public long getCreateTime() {
+ return this.createTime;
+ }
+
+ public ImageVersionDetails setCreateTime(long createTime) {
+ this.createTime = createTime;
+ setCreateTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetCreateTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetCreateTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ }
+
+ public void setCreateTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ }
+
+ public long getExpireTime() {
+ return this.expireTime;
+ }
+
+ public ImageVersionDetails setExpireTime(long expireTime) {
+ this.expireTime = expireTime;
+ setExpireTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetExpireTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ }
+
+ /** Returns true if field expireTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetExpireTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ }
+
+ public void setExpireTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
+ }
+
+ public long getFileSize() {
+ return this.fileSize;
+ }
+
+ public ImageVersionDetails setFileSize(long fileSize) {
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ return this;
+ }
+
+ public void unsetFileSize() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
+ public boolean isSetFileSize() {
+ return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ public void setFileSizeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ }
+
+ public String getUploaderId() {
+ return this.uploaderId;
+ }
+
+ public ImageVersionDetails setUploaderId(String uploaderId) {
+ this.uploaderId = uploaderId;
+ return this;
+ }
+
+ public void unsetUploaderId() {
+ this.uploaderId = null;
+ }
+
+ /** Returns true if field uploaderId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUploaderId() {
+ return this.uploaderId != null;
+ }
+
+ public void setUploaderIdIsSet(boolean value) {
+ if (!value) {
+ this.uploaderId = null;
+ }
+ }
+
+ public boolean isIsEnabled() {
+ return this.isEnabled;
+ }
+
+ public ImageVersionDetails setIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ return this;
+ }
+
+ public void unsetIsEnabled() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ /** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsEnabled() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ public void setIsEnabledIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ }
+
+ public boolean isIsRestricted() {
+ return this.isRestricted;
+ }
+
+ public ImageVersionDetails setIsRestricted(boolean isRestricted) {
+ this.isRestricted = isRestricted;
+ setIsRestrictedIsSet(true);
+ return this;
+ }
+
+ public void unsetIsRestricted() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ }
+
+ /** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsRestricted() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ }
+
+ public void setIsRestrictedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
+ }
+
+ public boolean isIsValid() {
+ return this.isValid;
+ }
+
+ public ImageVersionDetails setIsValid(boolean isValid) {
+ this.isValid = isValid;
+ setIsValidIsSet(true);
+ return this;
+ }
+
+ public void unsetIsValid() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ }
+
+ /** Returns true if field isValid is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsValid() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ }
+
+ public void setIsValidIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
+ }
+
+ public boolean isIsProcessed() {
+ return this.isProcessed;
+ }
+
+ public ImageVersionDetails setIsProcessed(boolean isProcessed) {
+ this.isProcessed = isProcessed;
+ setIsProcessedIsSet(true);
+ return this;
+ }
+
+ public void unsetIsProcessed() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ }
+
+ /** Returns true if field isProcessed is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsProcessed() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ }
+
+ public void setIsProcessedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISPROCESSED_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case VERSION_ID:
+ if (value == null) {
+ unsetVersionId();
+ } else {
+ setVersionId((String)value);
+ }
+ break;
+
+ case CREATE_TIME:
+ if (value == null) {
+ unsetCreateTime();
+ } else {
+ setCreateTime((Long)value);
+ }
+ break;
+
+ case EXPIRE_TIME:
+ if (value == null) {
+ unsetExpireTime();
+ } else {
+ setExpireTime((Long)value);
+ }
+ break;
+
+ case FILE_SIZE:
+ if (value == null) {
+ unsetFileSize();
+ } else {
+ setFileSize((Long)value);
+ }
+ break;
+
+ case UPLOADER_ID:
+ if (value == null) {
+ unsetUploaderId();
+ } else {
+ setUploaderId((String)value);
+ }
+ break;
+
+ case IS_ENABLED:
+ if (value == null) {
+ unsetIsEnabled();
+ } else {
+ setIsEnabled((Boolean)value);
+ }
+ break;
+
+ case IS_RESTRICTED:
+ if (value == null) {
+ unsetIsRestricted();
+ } else {
+ setIsRestricted((Boolean)value);
+ }
+ break;
+
+ case IS_VALID:
+ if (value == null) {
+ unsetIsValid();
+ } else {
+ setIsValid((Boolean)value);
+ }
+ break;
+
+ case IS_PROCESSED:
+ if (value == null) {
+ unsetIsProcessed();
+ } else {
+ setIsProcessed((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VERSION_ID:
+ return getVersionId();
+
+ case CREATE_TIME:
+ return Long.valueOf(getCreateTime());
+
+ case EXPIRE_TIME:
+ return Long.valueOf(getExpireTime());
+
+ case FILE_SIZE:
+ return Long.valueOf(getFileSize());
+
+ case UPLOADER_ID:
+ return getUploaderId();
+
+ case IS_ENABLED:
+ return Boolean.valueOf(isIsEnabled());
+
+ case IS_RESTRICTED:
+ return Boolean.valueOf(isIsRestricted());
+
+ case IS_VALID:
+ return Boolean.valueOf(isIsValid());
+
+ case IS_PROCESSED:
+ return Boolean.valueOf(isIsProcessed());
+
+ }
+ 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 VERSION_ID:
+ return isSetVersionId();
+ case CREATE_TIME:
+ return isSetCreateTime();
+ case EXPIRE_TIME:
+ return isSetExpireTime();
+ case FILE_SIZE:
+ return isSetFileSize();
+ case UPLOADER_ID:
+ return isSetUploaderId();
+ case IS_ENABLED:
+ return isSetIsEnabled();
+ case IS_RESTRICTED:
+ return isSetIsRestricted();
+ case IS_VALID:
+ return isSetIsValid();
+ case IS_PROCESSED:
+ return isSetIsProcessed();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ImageVersionDetails)
+ return this.equals((ImageVersionDetails)that);
+ return false;
+ }
+
+ public boolean equals(ImageVersionDetails that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_versionId = true && this.isSetVersionId();
+ boolean that_present_versionId = true && that.isSetVersionId();
+ if (this_present_versionId || that_present_versionId) {
+ if (!(this_present_versionId && that_present_versionId))
+ return false;
+ if (!this.versionId.equals(that.versionId))
+ return false;
+ }
+
+ boolean this_present_createTime = true;
+ boolean that_present_createTime = true;
+ if (this_present_createTime || that_present_createTime) {
+ if (!(this_present_createTime && that_present_createTime))
+ return false;
+ if (this.createTime != that.createTime)
+ return false;
+ }
+
+ boolean this_present_expireTime = true;
+ boolean that_present_expireTime = true;
+ if (this_present_expireTime || that_present_expireTime) {
+ if (!(this_present_expireTime && that_present_expireTime))
+ return false;
+ if (this.expireTime != that.expireTime)
+ return false;
+ }
+
+ boolean this_present_fileSize = true;
+ boolean that_present_fileSize = true;
+ if (this_present_fileSize || that_present_fileSize) {
+ if (!(this_present_fileSize && that_present_fileSize))
+ return false;
+ if (this.fileSize != that.fileSize)
+ return false;
+ }
+
+ boolean this_present_uploaderId = true && this.isSetUploaderId();
+ boolean that_present_uploaderId = true && that.isSetUploaderId();
+ if (this_present_uploaderId || that_present_uploaderId) {
+ if (!(this_present_uploaderId && that_present_uploaderId))
+ return false;
+ if (!this.uploaderId.equals(that.uploaderId))
+ return false;
+ }
+
+ boolean this_present_isEnabled = true;
+ boolean that_present_isEnabled = true;
+ if (this_present_isEnabled || that_present_isEnabled) {
+ if (!(this_present_isEnabled && that_present_isEnabled))
+ return false;
+ if (this.isEnabled != that.isEnabled)
+ return false;
+ }
+
+ boolean this_present_isRestricted = true;
+ boolean that_present_isRestricted = true;
+ if (this_present_isRestricted || that_present_isRestricted) {
+ if (!(this_present_isRestricted && that_present_isRestricted))
+ return false;
+ if (this.isRestricted != that.isRestricted)
+ return false;
+ }
+
+ boolean this_present_isValid = true;
+ boolean that_present_isValid = true;
+ if (this_present_isValid || that_present_isValid) {
+ if (!(this_present_isValid && that_present_isValid))
+ return false;
+ if (this.isValid != that.isValid)
+ return false;
+ }
+
+ boolean this_present_isProcessed = true;
+ boolean that_present_isProcessed = true;
+ if (this_present_isProcessed || that_present_isProcessed) {
+ if (!(this_present_isProcessed && that_present_isProcessed))
+ return false;
+ if (this.isProcessed != that.isProcessed)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ImageVersionDetails other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetVersionId()).compareTo(other.isSetVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versionId, other.versionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCreateTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExpireTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expireTime, other.expireTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFileSize()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUploaderId()).compareTo(other.isSetUploaderId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUploaderId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploaderId, other.uploaderId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsEnabled()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEnabled, other.isEnabled);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsRestricted()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRestricted, other.isRestricted);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsValid()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, other.isValid);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsProcessed()).compareTo(other.isSetIsProcessed());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsProcessed()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isProcessed, other.isProcessed);
+ 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("ImageVersionDetails(");
+ boolean first = true;
+
+ sb.append("versionId:");
+ if (this.versionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.versionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("createTime:");
+ sb.append(this.createTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("expireTime:");
+ sb.append(this.expireTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("fileSize:");
+ sb.append(this.fileSize);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("uploaderId:");
+ if (this.uploaderId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uploaderId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isEnabled:");
+ sb.append(this.isEnabled);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isRestricted:");
+ sb.append(this.isRestricted);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isValid:");
+ sb.append(this.isValid);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isProcessed:");
+ sb.append(this.isProcessed);
+ 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 ImageVersionDetailsStandardSchemeFactory implements SchemeFactory {
+ public ImageVersionDetailsStandardScheme getScheme() {
+ return new ImageVersionDetailsStandardScheme();
+ }
+ }
+
+ private static class ImageVersionDetailsStandardScheme extends StandardScheme<ImageVersionDetails> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ImageVersionDetails 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: // VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.versionId = iprot.readString();
+ struct.setVersionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.createTime = iprot.readI64();
+ struct.setCreateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // EXPIRE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.expireTime = iprot.readI64();
+ struct.setExpireTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // FILE_SIZE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // UPLOADER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uploaderId = iprot.readString();
+ struct.setUploaderIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // IS_ENABLED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // IS_RESTRICTED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isRestricted = iprot.readBool();
+ struct.setIsRestrictedIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // IS_VALID
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isValid = iprot.readBool();
+ struct.setIsValidIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // IS_PROCESSED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isProcessed = iprot.readBool();
+ struct.setIsProcessedIsSet(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, ImageVersionDetails struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.versionId != null) {
+ oprot.writeFieldBegin(VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.versionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.createTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(EXPIRE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.expireTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
+ oprot.writeI64(struct.fileSize);
+ oprot.writeFieldEnd();
+ if (struct.uploaderId != null) {
+ oprot.writeFieldBegin(UPLOADER_ID_FIELD_DESC);
+ oprot.writeString(struct.uploaderId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
+ oprot.writeBool(struct.isEnabled);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_RESTRICTED_FIELD_DESC);
+ oprot.writeBool(struct.isRestricted);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
+ oprot.writeBool(struct.isValid);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_PROCESSED_FIELD_DESC);
+ oprot.writeBool(struct.isProcessed);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ImageVersionDetailsTupleSchemeFactory implements SchemeFactory {
+ public ImageVersionDetailsTupleScheme getScheme() {
+ return new ImageVersionDetailsTupleScheme();
+ }
+ }
+
+ private static class ImageVersionDetailsTupleScheme extends TupleScheme<ImageVersionDetails> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ImageVersionDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetVersionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetCreateTime()) {
+ optionals.set(1);
+ }
+ if (struct.isSetExpireTime()) {
+ optionals.set(2);
+ }
+ if (struct.isSetFileSize()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUploaderId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetIsEnabled()) {
+ optionals.set(5);
+ }
+ if (struct.isSetIsRestricted()) {
+ optionals.set(6);
+ }
+ if (struct.isSetIsValid()) {
+ optionals.set(7);
+ }
+ if (struct.isSetIsProcessed()) {
+ optionals.set(8);
+ }
+ oprot.writeBitSet(optionals, 9);
+ if (struct.isSetVersionId()) {
+ oprot.writeString(struct.versionId);
+ }
+ if (struct.isSetCreateTime()) {
+ oprot.writeI64(struct.createTime);
+ }
+ if (struct.isSetExpireTime()) {
+ oprot.writeI64(struct.expireTime);
+ }
+ if (struct.isSetFileSize()) {
+ oprot.writeI64(struct.fileSize);
+ }
+ if (struct.isSetUploaderId()) {
+ oprot.writeString(struct.uploaderId);
+ }
+ if (struct.isSetIsEnabled()) {
+ oprot.writeBool(struct.isEnabled);
+ }
+ if (struct.isSetIsRestricted()) {
+ oprot.writeBool(struct.isRestricted);
+ }
+ if (struct.isSetIsValid()) {
+ oprot.writeBool(struct.isValid);
+ }
+ if (struct.isSetIsProcessed()) {
+ oprot.writeBool(struct.isProcessed);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ImageVersionDetails struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(9);
+ if (incoming.get(0)) {
+ struct.versionId = iprot.readString();
+ struct.setVersionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.createTime = iprot.readI64();
+ struct.setCreateTimeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.expireTime = iprot.readI64();
+ struct.setExpireTimeIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.uploaderId = iprot.readString();
+ struct.setUploaderIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.isRestricted = iprot.readBool();
+ struct.setIsRestrictedIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.isValid = iprot.readBool();
+ struct.setIsValidIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.isProcessed = iprot.readBool();
+ struct.setIsProcessedIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java
new file mode 100644
index 0000000..603e027
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java
@@ -0,0 +1,480 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWrite, ImageVersionWrite._Fields>, java.io.Serializable, Cloneable, Comparable<ImageVersionWrite> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageVersionWrite");
+
+ private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ImageVersionWriteStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ImageVersionWriteTupleSchemeFactory());
+ }
+
+ public boolean isEnabled; // required
+ public boolean isRestricted; // 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 {
+ IS_ENABLED((short)1, "isEnabled"),
+ IS_RESTRICTED((short)2, "isRestricted");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IS_ENABLED
+ return IS_ENABLED;
+ case 2: // IS_RESTRICTED
+ return IS_RESTRICTED;
+ 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 __ISENABLED_ISSET_ID = 0;
+ private static final int __ISRESTRICTED_ISSET_ID = 1;
+ 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.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageVersionWrite.class, metaDataMap);
+ }
+
+ public ImageVersionWrite() {
+ }
+
+ public ImageVersionWrite(
+ boolean isEnabled,
+ boolean isRestricted)
+ {
+ this();
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ this.isRestricted = isRestricted;
+ setIsRestrictedIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ImageVersionWrite(ImageVersionWrite other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.isEnabled = other.isEnabled;
+ this.isRestricted = other.isRestricted;
+ }
+
+ public ImageVersionWrite deepCopy() {
+ return new ImageVersionWrite(this);
+ }
+
+ @Override
+ public void clear() {
+ setIsEnabledIsSet(false);
+ this.isEnabled = false;
+ setIsRestrictedIsSet(false);
+ this.isRestricted = false;
+ }
+
+ public boolean isIsEnabled() {
+ return this.isEnabled;
+ }
+
+ public ImageVersionWrite setIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ return this;
+ }
+
+ public void unsetIsEnabled() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ /** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsEnabled() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ public void setIsEnabledIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ }
+
+ public boolean isIsRestricted() {
+ return this.isRestricted;
+ }
+
+ public ImageVersionWrite setIsRestricted(boolean isRestricted) {
+ this.isRestricted = isRestricted;
+ setIsRestrictedIsSet(true);
+ return this;
+ }
+
+ public void unsetIsRestricted() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ }
+
+ /** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsRestricted() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ }
+
+ public void setIsRestrictedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IS_ENABLED:
+ if (value == null) {
+ unsetIsEnabled();
+ } else {
+ setIsEnabled((Boolean)value);
+ }
+ break;
+
+ case IS_RESTRICTED:
+ if (value == null) {
+ unsetIsRestricted();
+ } else {
+ setIsRestricted((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IS_ENABLED:
+ return Boolean.valueOf(isIsEnabled());
+
+ case IS_RESTRICTED:
+ return Boolean.valueOf(isIsRestricted());
+
+ }
+ 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 IS_ENABLED:
+ return isSetIsEnabled();
+ case IS_RESTRICTED:
+ return isSetIsRestricted();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ImageVersionWrite)
+ return this.equals((ImageVersionWrite)that);
+ return false;
+ }
+
+ public boolean equals(ImageVersionWrite that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_isEnabled = true;
+ boolean that_present_isEnabled = true;
+ if (this_present_isEnabled || that_present_isEnabled) {
+ if (!(this_present_isEnabled && that_present_isEnabled))
+ return false;
+ if (this.isEnabled != that.isEnabled)
+ return false;
+ }
+
+ boolean this_present_isRestricted = true;
+ boolean that_present_isRestricted = true;
+ if (this_present_isRestricted || that_present_isRestricted) {
+ if (!(this_present_isRestricted && that_present_isRestricted))
+ return false;
+ if (this.isRestricted != that.isRestricted)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ImageVersionWrite other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsEnabled()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEnabled, other.isEnabled);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsRestricted()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRestricted, other.isRestricted);
+ 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("ImageVersionWrite(");
+ boolean first = true;
+
+ sb.append("isEnabled:");
+ sb.append(this.isEnabled);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isRestricted:");
+ sb.append(this.isRestricted);
+ 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 ImageVersionWriteStandardSchemeFactory implements SchemeFactory {
+ public ImageVersionWriteStandardScheme getScheme() {
+ return new ImageVersionWriteStandardScheme();
+ }
+ }
+
+ private static class ImageVersionWriteStandardScheme extends StandardScheme<ImageVersionWrite> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ImageVersionWrite 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: // IS_ENABLED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // IS_RESTRICTED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isRestricted = iprot.readBool();
+ struct.setIsRestrictedIsSet(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, ImageVersionWrite struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
+ oprot.writeBool(struct.isEnabled);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IS_RESTRICTED_FIELD_DESC);
+ oprot.writeBool(struct.isRestricted);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ImageVersionWriteTupleSchemeFactory implements SchemeFactory {
+ public ImageVersionWriteTupleScheme getScheme() {
+ return new ImageVersionWriteTupleScheme();
+ }
+ }
+
+ private static class ImageVersionWriteTupleScheme extends TupleScheme<ImageVersionWrite> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ImageVersionWrite struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIsEnabled()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIsRestricted()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetIsEnabled()) {
+ oprot.writeBool(struct.isEnabled);
+ }
+ if (struct.isSetIsRestricted()) {
+ oprot.writeBool(struct.isRestricted);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ImageVersionWrite struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.isRestricted = iprot.readBool();
+ struct.setIsRestrictedIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java b/src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java
new file mode 100644
index 0000000..5538ce1
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java
@@ -0,0 +1,480 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LecturePermissions implements org.apache.thrift.TBase<LecturePermissions, LecturePermissions._Fields>, java.io.Serializable, Cloneable, Comparable<LecturePermissions> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LecturePermissions");
+
+ private static final org.apache.thrift.protocol.TField EDIT_FIELD_DESC = new org.apache.thrift.protocol.TField("edit", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("admin", org.apache.thrift.protocol.TType.BOOL, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LecturePermissionsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LecturePermissionsTupleSchemeFactory());
+ }
+
+ public boolean edit; // required
+ public boolean admin; // 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 {
+ EDIT((short)1, "edit"),
+ ADMIN((short)2, "admin");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // EDIT
+ return EDIT;
+ case 2: // ADMIN
+ return ADMIN;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __EDIT_ISSET_ID = 0;
+ private static final int __ADMIN_ISSET_ID = 1;
+ 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.EDIT, new org.apache.thrift.meta_data.FieldMetaData("edit", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.ADMIN, new org.apache.thrift.meta_data.FieldMetaData("admin", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LecturePermissions.class, metaDataMap);
+ }
+
+ public LecturePermissions() {
+ }
+
+ public LecturePermissions(
+ boolean edit,
+ boolean admin)
+ {
+ this();
+ this.edit = edit;
+ setEditIsSet(true);
+ this.admin = admin;
+ setAdminIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public LecturePermissions(LecturePermissions other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.edit = other.edit;
+ this.admin = other.admin;
+ }
+
+ public LecturePermissions deepCopy() {
+ return new LecturePermissions(this);
+ }
+
+ @Override
+ public void clear() {
+ setEditIsSet(false);
+ this.edit = false;
+ setAdminIsSet(false);
+ this.admin = false;
+ }
+
+ public boolean isEdit() {
+ return this.edit;
+ }
+
+ public LecturePermissions setEdit(boolean edit) {
+ this.edit = edit;
+ setEditIsSet(true);
+ return this;
+ }
+
+ public void unsetEdit() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EDIT_ISSET_ID);
+ }
+
+ /** Returns true if field edit is set (has been assigned a value) and false otherwise */
+ public boolean isSetEdit() {
+ return EncodingUtils.testBit(__isset_bitfield, __EDIT_ISSET_ID);
+ }
+
+ public void setEditIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EDIT_ISSET_ID, value);
+ }
+
+ public boolean isAdmin() {
+ return this.admin;
+ }
+
+ public LecturePermissions setAdmin(boolean admin) {
+ this.admin = admin;
+ setAdminIsSet(true);
+ return this;
+ }
+
+ public void unsetAdmin() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ }
+
+ /** Returns true if field admin is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdmin() {
+ return EncodingUtils.testBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ }
+
+ public void setAdminIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ADMIN_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case EDIT:
+ if (value == null) {
+ unsetEdit();
+ } else {
+ setEdit((Boolean)value);
+ }
+ break;
+
+ case ADMIN:
+ if (value == null) {
+ unsetAdmin();
+ } else {
+ setAdmin((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case EDIT:
+ return Boolean.valueOf(isEdit());
+
+ case ADMIN:
+ return Boolean.valueOf(isAdmin());
+
+ }
+ 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 EDIT:
+ return isSetEdit();
+ case ADMIN:
+ return isSetAdmin();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof LecturePermissions)
+ return this.equals((LecturePermissions)that);
+ return false;
+ }
+
+ public boolean equals(LecturePermissions that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_edit = true;
+ boolean that_present_edit = true;
+ if (this_present_edit || that_present_edit) {
+ if (!(this_present_edit && that_present_edit))
+ return false;
+ if (this.edit != that.edit)
+ return false;
+ }
+
+ boolean this_present_admin = true;
+ boolean that_present_admin = true;
+ if (this_present_admin || that_present_admin) {
+ if (!(this_present_admin && that_present_admin))
+ return false;
+ if (this.admin != that.admin)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(LecturePermissions other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetEdit()).compareTo(other.isSetEdit());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEdit()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.edit, other.edit);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdmin()).compareTo(other.isSetAdmin());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdmin()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.admin, other.admin);
+ 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("LecturePermissions(");
+ boolean first = true;
+
+ sb.append("edit:");
+ sb.append(this.edit);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("admin:");
+ sb.append(this.admin);
+ 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 LecturePermissionsStandardSchemeFactory implements SchemeFactory {
+ public LecturePermissionsStandardScheme getScheme() {
+ return new LecturePermissionsStandardScheme();
+ }
+ }
+
+ private static class LecturePermissionsStandardScheme extends StandardScheme<LecturePermissions> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LecturePermissions 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: // EDIT
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.edit = iprot.readBool();
+ struct.setEditIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ADMIN
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.admin = iprot.readBool();
+ struct.setAdminIsSet(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, LecturePermissions struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(EDIT_FIELD_DESC);
+ oprot.writeBool(struct.edit);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(ADMIN_FIELD_DESC);
+ oprot.writeBool(struct.admin);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LecturePermissionsTupleSchemeFactory implements SchemeFactory {
+ public LecturePermissionsTupleScheme getScheme() {
+ return new LecturePermissionsTupleScheme();
+ }
+ }
+
+ private static class LecturePermissionsTupleScheme extends TupleScheme<LecturePermissions> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LecturePermissions struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetEdit()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAdmin()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetEdit()) {
+ oprot.writeBool(struct.edit);
+ }
+ if (struct.isSetAdmin()) {
+ oprot.writeBool(struct.admin);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LecturePermissions struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.edit = iprot.readBool();
+ struct.setEditIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.admin = iprot.readBool();
+ struct.setAdminIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
new file mode 100644
index 0000000..b6ea4ea
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
@@ -0,0 +1,1768 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LectureRead implements org.apache.thrift.TBase<LectureRead, LectureRead._Fields>, java.io.Serializable, Cloneable, Comparable<LectureRead> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureRead");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)5);
+ private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)6);
+ private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)7);
+ private static final org.apache.thrift.protocol.TField LAST_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUsed", org.apache.thrift.protocol.TType.I64, (short)8);
+ private static final org.apache.thrift.protocol.TField USE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("useCount", org.apache.thrift.protocol.TType.I32, (short)9);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField UPDATER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updaterId", org.apache.thrift.protocol.TType.STRING, (short)11);
+ private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)12);
+ private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)13);
+ private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)14);
+ private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)15);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LectureReadStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LectureReadTupleSchemeFactory());
+ }
+
+ public String lectureId; // required
+ public String lectureName; // required
+ public String description; // required
+ public ImageSummaryRead image; // required
+ public boolean isEnabled; // required
+ public long startTime; // required
+ public long endTime; // required
+ public long lastUsed; // required
+ public int useCount; // required
+ public String ownerId; // required
+ public String updaterId; // required
+ public boolean isExam; // required
+ public boolean hasInternetAccess; // required
+ public LecturePermissions defaultPermissions; // required
+ public LecturePermissions userPermissions; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ LECTURE_ID((short)1, "lectureId"),
+ LECTURE_NAME((short)2, "lectureName"),
+ DESCRIPTION((short)3, "description"),
+ IMAGE((short)4, "image"),
+ IS_ENABLED((short)5, "isEnabled"),
+ START_TIME((short)6, "startTime"),
+ END_TIME((short)7, "endTime"),
+ LAST_USED((short)8, "lastUsed"),
+ USE_COUNT((short)9, "useCount"),
+ OWNER_ID((short)10, "ownerId"),
+ UPDATER_ID((short)11, "updaterId"),
+ IS_EXAM((short)12, "isExam"),
+ HAS_INTERNET_ACCESS((short)13, "hasInternetAccess"),
+ DEFAULT_PERMISSIONS((short)14, "defaultPermissions"),
+ USER_PERMISSIONS((short)15, "userPermissions");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // LECTURE_ID
+ return LECTURE_ID;
+ case 2: // LECTURE_NAME
+ return LECTURE_NAME;
+ case 3: // DESCRIPTION
+ return DESCRIPTION;
+ case 4: // IMAGE
+ return IMAGE;
+ case 5: // IS_ENABLED
+ return IS_ENABLED;
+ case 6: // START_TIME
+ return START_TIME;
+ case 7: // END_TIME
+ return END_TIME;
+ case 8: // LAST_USED
+ return LAST_USED;
+ case 9: // USE_COUNT
+ return USE_COUNT;
+ case 10: // OWNER_ID
+ return OWNER_ID;
+ case 11: // UPDATER_ID
+ return UPDATER_ID;
+ case 12: // IS_EXAM
+ return IS_EXAM;
+ case 13: // HAS_INTERNET_ACCESS
+ return HAS_INTERNET_ACCESS;
+ case 14: // DEFAULT_PERMISSIONS
+ return DEFAULT_PERMISSIONS;
+ case 15: // USER_PERMISSIONS
+ return USER_PERMISSIONS;
+ 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 __ISENABLED_ISSET_ID = 0;
+ private static final int __STARTTIME_ISSET_ID = 1;
+ private static final int __ENDTIME_ISSET_ID = 2;
+ private static final int __LASTUSED_ISSET_ID = 3;
+ private static final int __USECOUNT_ISSET_ID = 4;
+ private static final int __ISEXAM_ISSET_ID = 5;
+ private static final int __HASINTERNETACCESS_ISSET_ID = 6;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.USER_PERMISSIONS};
+ 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.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.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageSummaryRead.class)));
+ tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.LAST_USED, new org.apache.thrift.meta_data.FieldMetaData("lastUsed", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.USE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("useCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.UPDATER_ID, new org.apache.thrift.meta_data.FieldMetaData("updaterId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IS_EXAM, new org.apache.thrift.meta_data.FieldMetaData("isExam", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_INTERNET_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasInternetAccess", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)));
+ tmpMap.put(_Fields.USER_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("userPermissions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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(LectureRead.class, metaDataMap);
+ }
+
+ public LectureRead() {
+ }
+
+ public LectureRead(
+ String lectureId,
+ String lectureName,
+ String description,
+ ImageSummaryRead image,
+ boolean isEnabled,
+ long startTime,
+ long endTime,
+ long lastUsed,
+ int useCount,
+ String ownerId,
+ String updaterId,
+ boolean isExam,
+ boolean hasInternetAccess,
+ LecturePermissions defaultPermissions)
+ {
+ this();
+ this.lectureId = lectureId;
+ this.lectureName = lectureName;
+ this.description = description;
+ this.image = image;
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ this.endTime = endTime;
+ setEndTimeIsSet(true);
+ this.lastUsed = lastUsed;
+ setLastUsedIsSet(true);
+ this.useCount = useCount;
+ setUseCountIsSet(true);
+ this.ownerId = ownerId;
+ this.updaterId = updaterId;
+ this.isExam = isExam;
+ setIsExamIsSet(true);
+ this.hasInternetAccess = hasInternetAccess;
+ setHasInternetAccessIsSet(true);
+ this.defaultPermissions = defaultPermissions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public LectureRead(LectureRead other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetLectureId()) {
+ this.lectureId = other.lectureId;
+ }
+ if (other.isSetLectureName()) {
+ this.lectureName = other.lectureName;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetImage()) {
+ this.image = new ImageSummaryRead(other.image);
+ }
+ this.isEnabled = other.isEnabled;
+ this.startTime = other.startTime;
+ this.endTime = other.endTime;
+ this.lastUsed = other.lastUsed;
+ this.useCount = other.useCount;
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetUpdaterId()) {
+ this.updaterId = other.updaterId;
+ }
+ this.isExam = other.isExam;
+ this.hasInternetAccess = other.hasInternetAccess;
+ if (other.isSetDefaultPermissions()) {
+ this.defaultPermissions = new LecturePermissions(other.defaultPermissions);
+ }
+ if (other.isSetUserPermissions()) {
+ this.userPermissions = new LecturePermissions(other.userPermissions);
+ }
+ }
+
+ public LectureRead deepCopy() {
+ return new LectureRead(this);
+ }
+
+ @Override
+ public void clear() {
+ this.lectureId = null;
+ this.lectureName = null;
+ this.description = null;
+ this.image = null;
+ setIsEnabledIsSet(false);
+ this.isEnabled = false;
+ setStartTimeIsSet(false);
+ this.startTime = 0;
+ setEndTimeIsSet(false);
+ this.endTime = 0;
+ setLastUsedIsSet(false);
+ this.lastUsed = 0;
+ setUseCountIsSet(false);
+ this.useCount = 0;
+ this.ownerId = null;
+ this.updaterId = null;
+ setIsExamIsSet(false);
+ this.isExam = false;
+ setHasInternetAccessIsSet(false);
+ this.hasInternetAccess = false;
+ this.defaultPermissions = null;
+ this.userPermissions = null;
+ }
+
+ public String getLectureId() {
+ return this.lectureId;
+ }
+
+ public LectureRead 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 getLectureName() {
+ return this.lectureName;
+ }
+
+ public LectureRead setLectureName(String lectureName) {
+ this.lectureName = lectureName;
+ return this;
+ }
+
+ public void unsetLectureName() {
+ this.lectureName = null;
+ }
+
+ /** Returns true if field lectureName is set (has been assigned a value) and false otherwise */
+ public boolean isSetLectureName() {
+ return this.lectureName != null;
+ }
+
+ public void setLectureNameIsSet(boolean value) {
+ if (!value) {
+ this.lectureName = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public LectureRead setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public ImageSummaryRead getImage() {
+ return this.image;
+ }
+
+ public LectureRead setImage(ImageSummaryRead image) {
+ this.image = image;
+ return this;
+ }
+
+ public void unsetImage() {
+ this.image = null;
+ }
+
+ /** Returns true if field image is set (has been assigned a value) and false otherwise */
+ public boolean isSetImage() {
+ return this.image != null;
+ }
+
+ public void setImageIsSet(boolean value) {
+ if (!value) {
+ this.image = null;
+ }
+ }
+
+ public boolean isIsEnabled() {
+ return this.isEnabled;
+ }
+
+ public LectureRead setIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ return this;
+ }
+
+ public void unsetIsEnabled() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ /** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsEnabled() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ public void setIsEnabledIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ }
+
+ public long getStartTime() {
+ return this.startTime;
+ }
+
+ public LectureRead setStartTime(long startTime) {
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetStartTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field startTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetStartTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ public void setStartTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ }
+
+ public long getEndTime() {
+ return this.endTime;
+ }
+
+ public LectureRead setEndTime(long endTime) {
+ this.endTime = endTime;
+ setEndTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetEndTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field endTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetEndTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ public void setEndTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
+ }
+
+ public long getLastUsed() {
+ return this.lastUsed;
+ }
+
+ public LectureRead setLastUsed(long lastUsed) {
+ this.lastUsed = lastUsed;
+ setLastUsedIsSet(true);
+ return this;
+ }
+
+ public void unsetLastUsed() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ }
+
+ /** Returns true if field lastUsed is set (has been assigned a value) and false otherwise */
+ public boolean isSetLastUsed() {
+ return EncodingUtils.testBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ }
+
+ public void setLastUsedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTUSED_ISSET_ID, value);
+ }
+
+ public int getUseCount() {
+ return this.useCount;
+ }
+
+ public LectureRead setUseCount(int useCount) {
+ this.useCount = useCount;
+ setUseCountIsSet(true);
+ return this;
+ }
+
+ public void unsetUseCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field useCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetUseCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ }
+
+ public void setUseCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value);
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public LectureRead setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getUpdaterId() {
+ return this.updaterId;
+ }
+
+ public LectureRead setUpdaterId(String updaterId) {
+ this.updaterId = updaterId;
+ return this;
+ }
+
+ public void unsetUpdaterId() {
+ this.updaterId = null;
+ }
+
+ /** Returns true if field updaterId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdaterId() {
+ return this.updaterId != null;
+ }
+
+ public void setUpdaterIdIsSet(boolean value) {
+ if (!value) {
+ this.updaterId = null;
+ }
+ }
+
+ public boolean isIsExam() {
+ return this.isExam;
+ }
+
+ public LectureRead setIsExam(boolean isExam) {
+ this.isExam = isExam;
+ setIsExamIsSet(true);
+ return this;
+ }
+
+ public void unsetIsExam() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ }
+
+ /** Returns true if field isExam is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsExam() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ }
+
+ public void setIsExamIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
+ }
+
+ public boolean isHasInternetAccess() {
+ return this.hasInternetAccess;
+ }
+
+ public LectureRead setHasInternetAccess(boolean hasInternetAccess) {
+ this.hasInternetAccess = hasInternetAccess;
+ setHasInternetAccessIsSet(true);
+ return this;
+ }
+
+ public void unsetHasInternetAccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ }
+
+ /** Returns true if field hasInternetAccess is set (has been assigned a value) and false otherwise */
+ public boolean isSetHasInternetAccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ }
+
+ public void setHasInternetAccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
+ }
+
+ public LecturePermissions getDefaultPermissions() {
+ return this.defaultPermissions;
+ }
+
+ public LectureRead setDefaultPermissions(LecturePermissions defaultPermissions) {
+ this.defaultPermissions = defaultPermissions;
+ return this;
+ }
+
+ public void unsetDefaultPermissions() {
+ this.defaultPermissions = null;
+ }
+
+ /** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultPermissions() {
+ return this.defaultPermissions != null;
+ }
+
+ public void setDefaultPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.defaultPermissions = null;
+ }
+ }
+
+ public LecturePermissions getUserPermissions() {
+ return this.userPermissions;
+ }
+
+ public LectureRead setUserPermissions(LecturePermissions userPermissions) {
+ this.userPermissions = userPermissions;
+ return this;
+ }
+
+ public void unsetUserPermissions() {
+ this.userPermissions = null;
+ }
+
+ /** Returns true if field userPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserPermissions() {
+ return this.userPermissions != null;
+ }
+
+ public void setUserPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.userPermissions = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureId();
+ } else {
+ setLectureId((String)value);
+ }
+ break;
+
+ case LECTURE_NAME:
+ if (value == null) {
+ unsetLectureName();
+ } else {
+ setLectureName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case IMAGE:
+ if (value == null) {
+ unsetImage();
+ } else {
+ setImage((ImageSummaryRead)value);
+ }
+ break;
+
+ case IS_ENABLED:
+ if (value == null) {
+ unsetIsEnabled();
+ } else {
+ setIsEnabled((Boolean)value);
+ }
+ break;
+
+ case START_TIME:
+ if (value == null) {
+ unsetStartTime();
+ } else {
+ setStartTime((Long)value);
+ }
+ break;
+
+ case END_TIME:
+ if (value == null) {
+ unsetEndTime();
+ } else {
+ setEndTime((Long)value);
+ }
+ break;
+
+ case LAST_USED:
+ if (value == null) {
+ unsetLastUsed();
+ } else {
+ setLastUsed((Long)value);
+ }
+ break;
+
+ case USE_COUNT:
+ if (value == null) {
+ unsetUseCount();
+ } else {
+ setUseCount((Integer)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case UPDATER_ID:
+ if (value == null) {
+ unsetUpdaterId();
+ } else {
+ setUpdaterId((String)value);
+ }
+ break;
+
+ case IS_EXAM:
+ if (value == null) {
+ unsetIsExam();
+ } else {
+ setIsExam((Boolean)value);
+ }
+ break;
+
+ case HAS_INTERNET_ACCESS:
+ if (value == null) {
+ unsetHasInternetAccess();
+ } else {
+ setHasInternetAccess((Boolean)value);
+ }
+ break;
+
+ case DEFAULT_PERMISSIONS:
+ if (value == null) {
+ unsetDefaultPermissions();
+ } else {
+ setDefaultPermissions((LecturePermissions)value);
+ }
+ break;
+
+ case USER_PERMISSIONS:
+ if (value == null) {
+ unsetUserPermissions();
+ } else {
+ setUserPermissions((LecturePermissions)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LECTURE_ID:
+ return getLectureId();
+
+ case LECTURE_NAME:
+ return getLectureName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case IMAGE:
+ return getImage();
+
+ case IS_ENABLED:
+ return Boolean.valueOf(isIsEnabled());
+
+ case START_TIME:
+ return Long.valueOf(getStartTime());
+
+ case END_TIME:
+ return Long.valueOf(getEndTime());
+
+ case LAST_USED:
+ return Long.valueOf(getLastUsed());
+
+ case USE_COUNT:
+ return Integer.valueOf(getUseCount());
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case UPDATER_ID:
+ return getUpdaterId();
+
+ case IS_EXAM:
+ return Boolean.valueOf(isIsExam());
+
+ case HAS_INTERNET_ACCESS:
+ return Boolean.valueOf(isHasInternetAccess());
+
+ case DEFAULT_PERMISSIONS:
+ return getDefaultPermissions();
+
+ case USER_PERMISSIONS:
+ return getUserPermissions();
+
+ }
+ 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 LECTURE_ID:
+ return isSetLectureId();
+ case LECTURE_NAME:
+ return isSetLectureName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case IMAGE:
+ return isSetImage();
+ case IS_ENABLED:
+ return isSetIsEnabled();
+ case START_TIME:
+ return isSetStartTime();
+ case END_TIME:
+ return isSetEndTime();
+ case LAST_USED:
+ return isSetLastUsed();
+ case USE_COUNT:
+ return isSetUseCount();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case UPDATER_ID:
+ return isSetUpdaterId();
+ case IS_EXAM:
+ return isSetIsExam();
+ case HAS_INTERNET_ACCESS:
+ return isSetHasInternetAccess();
+ case DEFAULT_PERMISSIONS:
+ return isSetDefaultPermissions();
+ case USER_PERMISSIONS:
+ return isSetUserPermissions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof LectureRead)
+ return this.equals((LectureRead)that);
+ return false;
+ }
+
+ public boolean equals(LectureRead that) {
+ if (that == null)
+ 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_lectureName = true && this.isSetLectureName();
+ boolean that_present_lectureName = true && that.isSetLectureName();
+ if (this_present_lectureName || that_present_lectureName) {
+ if (!(this_present_lectureName && that_present_lectureName))
+ return false;
+ if (!this.lectureName.equals(that.lectureName))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_image = true && this.isSetImage();
+ boolean that_present_image = true && that.isSetImage();
+ if (this_present_image || that_present_image) {
+ if (!(this_present_image && that_present_image))
+ return false;
+ if (!this.image.equals(that.image))
+ return false;
+ }
+
+ boolean this_present_isEnabled = true;
+ boolean that_present_isEnabled = true;
+ if (this_present_isEnabled || that_present_isEnabled) {
+ if (!(this_present_isEnabled && that_present_isEnabled))
+ return false;
+ if (this.isEnabled != that.isEnabled)
+ return false;
+ }
+
+ boolean this_present_startTime = true;
+ boolean that_present_startTime = true;
+ if (this_present_startTime || that_present_startTime) {
+ if (!(this_present_startTime && that_present_startTime))
+ return false;
+ if (this.startTime != that.startTime)
+ return false;
+ }
+
+ boolean this_present_endTime = true;
+ boolean that_present_endTime = true;
+ if (this_present_endTime || that_present_endTime) {
+ if (!(this_present_endTime && that_present_endTime))
+ return false;
+ if (this.endTime != that.endTime)
+ return false;
+ }
+
+ boolean this_present_lastUsed = true;
+ boolean that_present_lastUsed = true;
+ if (this_present_lastUsed || that_present_lastUsed) {
+ if (!(this_present_lastUsed && that_present_lastUsed))
+ return false;
+ if (this.lastUsed != that.lastUsed)
+ return false;
+ }
+
+ boolean this_present_useCount = true;
+ boolean that_present_useCount = true;
+ if (this_present_useCount || that_present_useCount) {
+ if (!(this_present_useCount && that_present_useCount))
+ return false;
+ if (this.useCount != that.useCount)
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_updaterId = true && this.isSetUpdaterId();
+ boolean that_present_updaterId = true && that.isSetUpdaterId();
+ if (this_present_updaterId || that_present_updaterId) {
+ if (!(this_present_updaterId && that_present_updaterId))
+ return false;
+ if (!this.updaterId.equals(that.updaterId))
+ return false;
+ }
+
+ boolean this_present_isExam = true;
+ boolean that_present_isExam = true;
+ if (this_present_isExam || that_present_isExam) {
+ if (!(this_present_isExam && that_present_isExam))
+ return false;
+ if (this.isExam != that.isExam)
+ return false;
+ }
+
+ boolean this_present_hasInternetAccess = true;
+ boolean that_present_hasInternetAccess = true;
+ if (this_present_hasInternetAccess || that_present_hasInternetAccess) {
+ if (!(this_present_hasInternetAccess && that_present_hasInternetAccess))
+ return false;
+ if (this.hasInternetAccess != that.hasInternetAccess)
+ return false;
+ }
+
+ boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions();
+ boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions();
+ if (this_present_defaultPermissions || that_present_defaultPermissions) {
+ if (!(this_present_defaultPermissions && that_present_defaultPermissions))
+ return false;
+ if (!this.defaultPermissions.equals(that.defaultPermissions))
+ return false;
+ }
+
+ boolean this_present_userPermissions = true && this.isSetUserPermissions();
+ boolean that_present_userPermissions = true && that.isSetUserPermissions();
+ if (this_present_userPermissions || that_present_userPermissions) {
+ if (!(this_present_userPermissions && that_present_userPermissions))
+ return false;
+ if (!this.userPermissions.equals(that.userPermissions))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(LectureRead other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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(isSetLectureName()).compareTo(other.isSetLectureName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLectureName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureName, other.lectureName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsEnabled()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEnabled, other.isEnabled);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEndTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLastUsed()).compareTo(other.isSetLastUsed());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLastUsed()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastUsed, other.lastUsed);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUseCount()).compareTo(other.isSetUseCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUseCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.useCount, other.useCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdaterId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updaterId, other.updaterId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsExam()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isExam, other.isExam);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHasInternetAccess()).compareTo(other.isSetHasInternetAccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHasInternetAccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasInternetAccess, other.hasInternetAccess);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPermissions, other.userPermissions);
+ 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("LectureRead(");
+ boolean first = true;
+
+ sb.append("lectureId:");
+ if (this.lectureId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lectureName:");
+ if (this.lectureName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("image:");
+ if (this.image == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.image);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isEnabled:");
+ sb.append(this.isEnabled);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("startTime:");
+ sb.append(this.startTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("endTime:");
+ sb.append(this.endTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lastUsed:");
+ sb.append(this.lastUsed);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("useCount:");
+ sb.append(this.useCount);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("updaterId:");
+ if (this.updaterId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.updaterId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isExam:");
+ sb.append(this.isExam);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hasInternetAccess:");
+ sb.append(this.hasInternetAccess);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("defaultPermissions:");
+ if (this.defaultPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.defaultPermissions);
+ }
+ first = false;
+ if (isSetUserPermissions()) {
+ if (!first) sb.append(", ");
+ sb.append("userPermissions:");
+ if (this.userPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userPermissions);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (image != null) {
+ image.validate();
+ }
+ if (defaultPermissions != null) {
+ defaultPermissions.validate();
+ }
+ if (userPermissions != null) {
+ userPermissions.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // 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 LectureReadStandardSchemeFactory implements SchemeFactory {
+ public LectureReadStandardScheme getScheme() {
+ return new LectureReadStandardScheme();
+ }
+ }
+
+ private static class LectureReadStandardScheme extends StandardScheme<LectureRead> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LectureRead 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: // 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 2: // LECTURE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.lectureName = iprot.readString();
+ struct.setLectureNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // IMAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.image = new ImageSummaryRead();
+ struct.image.read(iprot);
+ struct.setImageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // IS_ENABLED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // END_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // LAST_USED
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.lastUsed = iprot.readI64();
+ struct.setLastUsedIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // USE_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.useCount = iprot.readI32();
+ struct.setUseCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // UPDATER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.updaterId = iprot.readString();
+ struct.setUpdaterIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // IS_EXAM
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isExam = iprot.readBool();
+ struct.setIsExamIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // HAS_INTERNET_ACCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.hasInternetAccess = iprot.readBool();
+ struct.setHasInternetAccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // DEFAULT_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.defaultPermissions = new LecturePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 15: // USER_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.userPermissions = new LecturePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(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, LectureRead struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.lectureId != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ oprot.writeString(struct.lectureId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lectureName != null) {
+ oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC);
+ oprot.writeString(struct.lectureName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ if (struct.image != null) {
+ oprot.writeFieldBegin(IMAGE_FIELD_DESC);
+ struct.image.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
+ oprot.writeBool(struct.isEnabled);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(START_TIME_FIELD_DESC);
+ oprot.writeI64(struct.startTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(END_TIME_FIELD_DESC);
+ oprot.writeI64(struct.endTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_USED_FIELD_DESC);
+ oprot.writeI64(struct.lastUsed);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(USE_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.useCount);
+ oprot.writeFieldEnd();
+ if (struct.ownerId != null) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.updaterId != null) {
+ oprot.writeFieldBegin(UPDATER_ID_FIELD_DESC);
+ oprot.writeString(struct.updaterId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_EXAM_FIELD_DESC);
+ oprot.writeBool(struct.isExam);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HAS_INTERNET_ACCESS_FIELD_DESC);
+ oprot.writeBool(struct.hasInternetAccess);
+ oprot.writeFieldEnd();
+ if (struct.defaultPermissions != null) {
+ oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC);
+ struct.defaultPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userPermissions != null) {
+ if (struct.isSetUserPermissions()) {
+ oprot.writeFieldBegin(USER_PERMISSIONS_FIELD_DESC);
+ struct.userPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LectureReadTupleSchemeFactory implements SchemeFactory {
+ public LectureReadTupleScheme getScheme() {
+ return new LectureReadTupleScheme();
+ }
+ }
+
+ private static class LectureReadTupleScheme extends TupleScheme<LectureRead> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LectureRead struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLectureId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLectureName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(2);
+ }
+ if (struct.isSetImage()) {
+ optionals.set(3);
+ }
+ if (struct.isSetIsEnabled()) {
+ optionals.set(4);
+ }
+ if (struct.isSetStartTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetEndTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetLastUsed()) {
+ optionals.set(7);
+ }
+ if (struct.isSetUseCount()) {
+ optionals.set(8);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(9);
+ }
+ if (struct.isSetUpdaterId()) {
+ optionals.set(10);
+ }
+ if (struct.isSetIsExam()) {
+ optionals.set(11);
+ }
+ if (struct.isSetHasInternetAccess()) {
+ optionals.set(12);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ optionals.set(13);
+ }
+ if (struct.isSetUserPermissions()) {
+ optionals.set(14);
+ }
+ oprot.writeBitSet(optionals, 15);
+ if (struct.isSetLectureId()) {
+ oprot.writeString(struct.lectureId);
+ }
+ if (struct.isSetLectureName()) {
+ oprot.writeString(struct.lectureName);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetImage()) {
+ struct.image.write(oprot);
+ }
+ if (struct.isSetIsEnabled()) {
+ oprot.writeBool(struct.isEnabled);
+ }
+ if (struct.isSetStartTime()) {
+ oprot.writeI64(struct.startTime);
+ }
+ if (struct.isSetEndTime()) {
+ oprot.writeI64(struct.endTime);
+ }
+ if (struct.isSetLastUsed()) {
+ oprot.writeI64(struct.lastUsed);
+ }
+ if (struct.isSetUseCount()) {
+ oprot.writeI32(struct.useCount);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetUpdaterId()) {
+ oprot.writeString(struct.updaterId);
+ }
+ if (struct.isSetIsExam()) {
+ oprot.writeBool(struct.isExam);
+ }
+ if (struct.isSetHasInternetAccess()) {
+ oprot.writeBool(struct.hasInternetAccess);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ struct.defaultPermissions.write(oprot);
+ }
+ if (struct.isSetUserPermissions()) {
+ struct.userPermissions.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LectureRead struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(15);
+ if (incoming.get(0)) {
+ struct.lectureId = iprot.readString();
+ struct.setLectureIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lectureName = iprot.readString();
+ struct.setLectureNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.image = new ImageSummaryRead();
+ struct.image.read(iprot);
+ struct.setImageIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.lastUsed = iprot.readI64();
+ struct.setLastUsedIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.useCount = iprot.readI32();
+ struct.setUseCountIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.updaterId = iprot.readString();
+ struct.setUpdaterIdIsSet(true);
+ }
+ if (incoming.get(11)) {
+ struct.isExam = iprot.readBool();
+ struct.setIsExamIsSet(true);
+ }
+ if (incoming.get(12)) {
+ struct.hasInternetAccess = iprot.readBool();
+ struct.setHasInternetAccessIsSet(true);
+ }
+ if (incoming.get(13)) {
+ struct.defaultPermissions = new LecturePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ }
+ if (incoming.get(14)) {
+ struct.userPermissions = new LecturePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
new file mode 100644
index 0000000..5e13d6e
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
@@ -0,0 +1,1763 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, LectureSummary._Fields>, java.io.Serializable, Cloneable, Comparable<LectureSummary> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureSummary");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)5);
+ private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)6);
+ private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)7);
+ private static final org.apache.thrift.protocol.TField LAST_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUsed", org.apache.thrift.protocol.TType.I64, (short)8);
+ private static final org.apache.thrift.protocol.TField USE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("useCount", org.apache.thrift.protocol.TType.I32, (short)9);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField UPDATER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updaterId", org.apache.thrift.protocol.TType.STRING, (short)11);
+ private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)12);
+ private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)13);
+ private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)14);
+ private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)15);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LectureSummaryStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LectureSummaryTupleSchemeFactory());
+ }
+
+ public String lectureId; // required
+ public String lectureName; // required
+ public String imageVersionId; // required
+ public String imageName; // required
+ public boolean isEnabled; // required
+ public long startTime; // required
+ public long endTime; // required
+ public long lastUsed; // required
+ public int useCount; // required
+ public String ownerId; // required
+ public String updaterId; // required
+ public boolean isExam; // required
+ public boolean hasInternetAccess; // required
+ public LecturePermissions defaultPermissions; // required
+ public LecturePermissions userPermissions; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ LECTURE_ID((short)1, "lectureId"),
+ LECTURE_NAME((short)2, "lectureName"),
+ IMAGE_VERSION_ID((short)3, "imageVersionId"),
+ IMAGE_NAME((short)4, "imageName"),
+ IS_ENABLED((short)5, "isEnabled"),
+ START_TIME((short)6, "startTime"),
+ END_TIME((short)7, "endTime"),
+ LAST_USED((short)8, "lastUsed"),
+ USE_COUNT((short)9, "useCount"),
+ OWNER_ID((short)10, "ownerId"),
+ UPDATER_ID((short)11, "updaterId"),
+ IS_EXAM((short)12, "isExam"),
+ HAS_INTERNET_ACCESS((short)13, "hasInternetAccess"),
+ DEFAULT_PERMISSIONS((short)14, "defaultPermissions"),
+ USER_PERMISSIONS((short)15, "userPermissions");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // LECTURE_ID
+ return LECTURE_ID;
+ case 2: // LECTURE_NAME
+ return LECTURE_NAME;
+ case 3: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_ID;
+ case 4: // IMAGE_NAME
+ return IMAGE_NAME;
+ case 5: // IS_ENABLED
+ return IS_ENABLED;
+ case 6: // START_TIME
+ return START_TIME;
+ case 7: // END_TIME
+ return END_TIME;
+ case 8: // LAST_USED
+ return LAST_USED;
+ case 9: // USE_COUNT
+ return USE_COUNT;
+ case 10: // OWNER_ID
+ return OWNER_ID;
+ case 11: // UPDATER_ID
+ return UPDATER_ID;
+ case 12: // IS_EXAM
+ return IS_EXAM;
+ case 13: // HAS_INTERNET_ACCESS
+ return HAS_INTERNET_ACCESS;
+ case 14: // DEFAULT_PERMISSIONS
+ return DEFAULT_PERMISSIONS;
+ case 15: // USER_PERMISSIONS
+ return USER_PERMISSIONS;
+ 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 __ISENABLED_ISSET_ID = 0;
+ private static final int __STARTTIME_ISSET_ID = 1;
+ private static final int __ENDTIME_ISSET_ID = 2;
+ private static final int __LASTUSED_ISSET_ID = 3;
+ private static final int __USECOUNT_ISSET_ID = 4;
+ private static final int __ISEXAM_ISSET_ID = 5;
+ private static final int __HASINTERNETACCESS_ISSET_ID = 6;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.USER_PERMISSIONS};
+ 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.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.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.LAST_USED, new org.apache.thrift.meta_data.FieldMetaData("lastUsed", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.USE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("useCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.UPDATER_ID, new org.apache.thrift.meta_data.FieldMetaData("updaterId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IS_EXAM, new org.apache.thrift.meta_data.FieldMetaData("isExam", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_INTERNET_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasInternetAccess", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)));
+ tmpMap.put(_Fields.USER_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("userPermissions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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(LectureSummary.class, metaDataMap);
+ }
+
+ public LectureSummary() {
+ }
+
+ public LectureSummary(
+ String lectureId,
+ String lectureName,
+ String imageVersionId,
+ String imageName,
+ boolean isEnabled,
+ long startTime,
+ long endTime,
+ long lastUsed,
+ int useCount,
+ String ownerId,
+ String updaterId,
+ boolean isExam,
+ boolean hasInternetAccess,
+ LecturePermissions defaultPermissions)
+ {
+ this();
+ this.lectureId = lectureId;
+ this.lectureName = lectureName;
+ this.imageVersionId = imageVersionId;
+ this.imageName = imageName;
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ this.endTime = endTime;
+ setEndTimeIsSet(true);
+ this.lastUsed = lastUsed;
+ setLastUsedIsSet(true);
+ this.useCount = useCount;
+ setUseCountIsSet(true);
+ this.ownerId = ownerId;
+ this.updaterId = updaterId;
+ this.isExam = isExam;
+ setIsExamIsSet(true);
+ this.hasInternetAccess = hasInternetAccess;
+ setHasInternetAccessIsSet(true);
+ this.defaultPermissions = defaultPermissions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public LectureSummary(LectureSummary other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetLectureId()) {
+ this.lectureId = other.lectureId;
+ }
+ if (other.isSetLectureName()) {
+ this.lectureName = other.lectureName;
+ }
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ if (other.isSetImageName()) {
+ this.imageName = other.imageName;
+ }
+ this.isEnabled = other.isEnabled;
+ this.startTime = other.startTime;
+ this.endTime = other.endTime;
+ this.lastUsed = other.lastUsed;
+ this.useCount = other.useCount;
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ if (other.isSetUpdaterId()) {
+ this.updaterId = other.updaterId;
+ }
+ this.isExam = other.isExam;
+ this.hasInternetAccess = other.hasInternetAccess;
+ if (other.isSetDefaultPermissions()) {
+ this.defaultPermissions = new LecturePermissions(other.defaultPermissions);
+ }
+ if (other.isSetUserPermissions()) {
+ this.userPermissions = new LecturePermissions(other.userPermissions);
+ }
+ }
+
+ public LectureSummary deepCopy() {
+ return new LectureSummary(this);
+ }
+
+ @Override
+ public void clear() {
+ this.lectureId = null;
+ this.lectureName = null;
+ this.imageVersionId = null;
+ this.imageName = null;
+ setIsEnabledIsSet(false);
+ this.isEnabled = false;
+ setStartTimeIsSet(false);
+ this.startTime = 0;
+ setEndTimeIsSet(false);
+ this.endTime = 0;
+ setLastUsedIsSet(false);
+ this.lastUsed = 0;
+ setUseCountIsSet(false);
+ this.useCount = 0;
+ this.ownerId = null;
+ this.updaterId = null;
+ setIsExamIsSet(false);
+ this.isExam = false;
+ setHasInternetAccessIsSet(false);
+ this.hasInternetAccess = false;
+ this.defaultPermissions = null;
+ this.userPermissions = null;
+ }
+
+ public String getLectureId() {
+ return this.lectureId;
+ }
+
+ public LectureSummary 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 getLectureName() {
+ return this.lectureName;
+ }
+
+ public LectureSummary setLectureName(String lectureName) {
+ this.lectureName = lectureName;
+ return this;
+ }
+
+ public void unsetLectureName() {
+ this.lectureName = null;
+ }
+
+ /** Returns true if field lectureName is set (has been assigned a value) and false otherwise */
+ public boolean isSetLectureName() {
+ return this.lectureName != null;
+ }
+
+ public void setLectureNameIsSet(boolean value) {
+ if (!value) {
+ this.lectureName = null;
+ }
+ }
+
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public LectureSummary setImageVersionId(String imageVersionId) {
+ this.imageVersionId = imageVersionId;
+ return this;
+ }
+
+ public void unsetImageVersionId() {
+ this.imageVersionId = null;
+ }
+
+ /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageVersionId() {
+ return this.imageVersionId != null;
+ }
+
+ public void setImageVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.imageVersionId = null;
+ }
+ }
+
+ public String getImageName() {
+ return this.imageName;
+ }
+
+ public LectureSummary setImageName(String imageName) {
+ this.imageName = imageName;
+ return this;
+ }
+
+ public void unsetImageName() {
+ this.imageName = null;
+ }
+
+ /** Returns true if field imageName is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageName() {
+ return this.imageName != null;
+ }
+
+ public void setImageNameIsSet(boolean value) {
+ if (!value) {
+ this.imageName = null;
+ }
+ }
+
+ public boolean isIsEnabled() {
+ return this.isEnabled;
+ }
+
+ public LectureSummary setIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ return this;
+ }
+
+ public void unsetIsEnabled() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ /** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsEnabled() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ public void setIsEnabledIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ }
+
+ public long getStartTime() {
+ return this.startTime;
+ }
+
+ public LectureSummary setStartTime(long startTime) {
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetStartTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field startTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetStartTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ public void setStartTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ }
+
+ public long getEndTime() {
+ return this.endTime;
+ }
+
+ public LectureSummary setEndTime(long endTime) {
+ this.endTime = endTime;
+ setEndTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetEndTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field endTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetEndTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ public void setEndTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
+ }
+
+ public long getLastUsed() {
+ return this.lastUsed;
+ }
+
+ public LectureSummary setLastUsed(long lastUsed) {
+ this.lastUsed = lastUsed;
+ setLastUsedIsSet(true);
+ return this;
+ }
+
+ public void unsetLastUsed() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ }
+
+ /** Returns true if field lastUsed is set (has been assigned a value) and false otherwise */
+ public boolean isSetLastUsed() {
+ return EncodingUtils.testBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ }
+
+ public void setLastUsedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTUSED_ISSET_ID, value);
+ }
+
+ public int getUseCount() {
+ return this.useCount;
+ }
+
+ public LectureSummary setUseCount(int useCount) {
+ this.useCount = useCount;
+ setUseCountIsSet(true);
+ return this;
+ }
+
+ public void unsetUseCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field useCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetUseCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ }
+
+ public void setUseCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value);
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public LectureSummary setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public String getUpdaterId() {
+ return this.updaterId;
+ }
+
+ public LectureSummary setUpdaterId(String updaterId) {
+ this.updaterId = updaterId;
+ return this;
+ }
+
+ public void unsetUpdaterId() {
+ this.updaterId = null;
+ }
+
+ /** Returns true if field updaterId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUpdaterId() {
+ return this.updaterId != null;
+ }
+
+ public void setUpdaterIdIsSet(boolean value) {
+ if (!value) {
+ this.updaterId = null;
+ }
+ }
+
+ public boolean isIsExam() {
+ return this.isExam;
+ }
+
+ public LectureSummary setIsExam(boolean isExam) {
+ this.isExam = isExam;
+ setIsExamIsSet(true);
+ return this;
+ }
+
+ public void unsetIsExam() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ }
+
+ /** Returns true if field isExam is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsExam() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ }
+
+ public void setIsExamIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
+ }
+
+ public boolean isHasInternetAccess() {
+ return this.hasInternetAccess;
+ }
+
+ public LectureSummary setHasInternetAccess(boolean hasInternetAccess) {
+ this.hasInternetAccess = hasInternetAccess;
+ setHasInternetAccessIsSet(true);
+ return this;
+ }
+
+ public void unsetHasInternetAccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ }
+
+ /** Returns true if field hasInternetAccess is set (has been assigned a value) and false otherwise */
+ public boolean isSetHasInternetAccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ }
+
+ public void setHasInternetAccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
+ }
+
+ public LecturePermissions getDefaultPermissions() {
+ return this.defaultPermissions;
+ }
+
+ public LectureSummary setDefaultPermissions(LecturePermissions defaultPermissions) {
+ this.defaultPermissions = defaultPermissions;
+ return this;
+ }
+
+ public void unsetDefaultPermissions() {
+ this.defaultPermissions = null;
+ }
+
+ /** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultPermissions() {
+ return this.defaultPermissions != null;
+ }
+
+ public void setDefaultPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.defaultPermissions = null;
+ }
+ }
+
+ public LecturePermissions getUserPermissions() {
+ return this.userPermissions;
+ }
+
+ public LectureSummary setUserPermissions(LecturePermissions userPermissions) {
+ this.userPermissions = userPermissions;
+ return this;
+ }
+
+ public void unsetUserPermissions() {
+ this.userPermissions = null;
+ }
+
+ /** Returns true if field userPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserPermissions() {
+ return this.userPermissions != null;
+ }
+
+ public void setUserPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.userPermissions = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureId();
+ } else {
+ setLectureId((String)value);
+ }
+ break;
+
+ case LECTURE_NAME:
+ if (value == null) {
+ unsetLectureName();
+ } else {
+ setLectureName((String)value);
+ }
+ break;
+
+ case IMAGE_VERSION_ID:
+ if (value == null) {
+ unsetImageVersionId();
+ } else {
+ setImageVersionId((String)value);
+ }
+ break;
+
+ case IMAGE_NAME:
+ if (value == null) {
+ unsetImageName();
+ } else {
+ setImageName((String)value);
+ }
+ break;
+
+ case IS_ENABLED:
+ if (value == null) {
+ unsetIsEnabled();
+ } else {
+ setIsEnabled((Boolean)value);
+ }
+ break;
+
+ case START_TIME:
+ if (value == null) {
+ unsetStartTime();
+ } else {
+ setStartTime((Long)value);
+ }
+ break;
+
+ case END_TIME:
+ if (value == null) {
+ unsetEndTime();
+ } else {
+ setEndTime((Long)value);
+ }
+ break;
+
+ case LAST_USED:
+ if (value == null) {
+ unsetLastUsed();
+ } else {
+ setLastUsed((Long)value);
+ }
+ break;
+
+ case USE_COUNT:
+ if (value == null) {
+ unsetUseCount();
+ } else {
+ setUseCount((Integer)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case UPDATER_ID:
+ if (value == null) {
+ unsetUpdaterId();
+ } else {
+ setUpdaterId((String)value);
+ }
+ break;
+
+ case IS_EXAM:
+ if (value == null) {
+ unsetIsExam();
+ } else {
+ setIsExam((Boolean)value);
+ }
+ break;
+
+ case HAS_INTERNET_ACCESS:
+ if (value == null) {
+ unsetHasInternetAccess();
+ } else {
+ setHasInternetAccess((Boolean)value);
+ }
+ break;
+
+ case DEFAULT_PERMISSIONS:
+ if (value == null) {
+ unsetDefaultPermissions();
+ } else {
+ setDefaultPermissions((LecturePermissions)value);
+ }
+ break;
+
+ case USER_PERMISSIONS:
+ if (value == null) {
+ unsetUserPermissions();
+ } else {
+ setUserPermissions((LecturePermissions)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LECTURE_ID:
+ return getLectureId();
+
+ case LECTURE_NAME:
+ return getLectureName();
+
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ case IMAGE_NAME:
+ return getImageName();
+
+ case IS_ENABLED:
+ return Boolean.valueOf(isIsEnabled());
+
+ case START_TIME:
+ return Long.valueOf(getStartTime());
+
+ case END_TIME:
+ return Long.valueOf(getEndTime());
+
+ case LAST_USED:
+ return Long.valueOf(getLastUsed());
+
+ case USE_COUNT:
+ return Integer.valueOf(getUseCount());
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case UPDATER_ID:
+ return getUpdaterId();
+
+ case IS_EXAM:
+ return Boolean.valueOf(isIsExam());
+
+ case HAS_INTERNET_ACCESS:
+ return Boolean.valueOf(isHasInternetAccess());
+
+ case DEFAULT_PERMISSIONS:
+ return getDefaultPermissions();
+
+ case USER_PERMISSIONS:
+ return getUserPermissions();
+
+ }
+ 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 LECTURE_ID:
+ return isSetLectureId();
+ case LECTURE_NAME:
+ return isSetLectureName();
+ case IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ case IMAGE_NAME:
+ return isSetImageName();
+ case IS_ENABLED:
+ return isSetIsEnabled();
+ case START_TIME:
+ return isSetStartTime();
+ case END_TIME:
+ return isSetEndTime();
+ case LAST_USED:
+ return isSetLastUsed();
+ case USE_COUNT:
+ return isSetUseCount();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case UPDATER_ID:
+ return isSetUpdaterId();
+ case IS_EXAM:
+ return isSetIsExam();
+ case HAS_INTERNET_ACCESS:
+ return isSetHasInternetAccess();
+ case DEFAULT_PERMISSIONS:
+ return isSetDefaultPermissions();
+ case USER_PERMISSIONS:
+ return isSetUserPermissions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof LectureSummary)
+ return this.equals((LectureSummary)that);
+ return false;
+ }
+
+ public boolean equals(LectureSummary that) {
+ if (that == null)
+ 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_lectureName = true && this.isSetLectureName();
+ boolean that_present_lectureName = true && that.isSetLectureName();
+ if (this_present_lectureName || that_present_lectureName) {
+ if (!(this_present_lectureName && that_present_lectureName))
+ return false;
+ if (!this.lectureName.equals(that.lectureName))
+ return false;
+ }
+
+ boolean this_present_imageVersionId = true && this.isSetImageVersionId();
+ boolean that_present_imageVersionId = true && that.isSetImageVersionId();
+ if (this_present_imageVersionId || that_present_imageVersionId) {
+ if (!(this_present_imageVersionId && that_present_imageVersionId))
+ return false;
+ if (!this.imageVersionId.equals(that.imageVersionId))
+ return false;
+ }
+
+ boolean this_present_imageName = true && this.isSetImageName();
+ boolean that_present_imageName = true && that.isSetImageName();
+ if (this_present_imageName || that_present_imageName) {
+ if (!(this_present_imageName && that_present_imageName))
+ return false;
+ if (!this.imageName.equals(that.imageName))
+ return false;
+ }
+
+ boolean this_present_isEnabled = true;
+ boolean that_present_isEnabled = true;
+ if (this_present_isEnabled || that_present_isEnabled) {
+ if (!(this_present_isEnabled && that_present_isEnabled))
+ return false;
+ if (this.isEnabled != that.isEnabled)
+ return false;
+ }
+
+ boolean this_present_startTime = true;
+ boolean that_present_startTime = true;
+ if (this_present_startTime || that_present_startTime) {
+ if (!(this_present_startTime && that_present_startTime))
+ return false;
+ if (this.startTime != that.startTime)
+ return false;
+ }
+
+ boolean this_present_endTime = true;
+ boolean that_present_endTime = true;
+ if (this_present_endTime || that_present_endTime) {
+ if (!(this_present_endTime && that_present_endTime))
+ return false;
+ if (this.endTime != that.endTime)
+ return false;
+ }
+
+ boolean this_present_lastUsed = true;
+ boolean that_present_lastUsed = true;
+ if (this_present_lastUsed || that_present_lastUsed) {
+ if (!(this_present_lastUsed && that_present_lastUsed))
+ return false;
+ if (this.lastUsed != that.lastUsed)
+ return false;
+ }
+
+ boolean this_present_useCount = true;
+ boolean that_present_useCount = true;
+ if (this_present_useCount || that_present_useCount) {
+ if (!(this_present_useCount && that_present_useCount))
+ return false;
+ if (this.useCount != that.useCount)
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_updaterId = true && this.isSetUpdaterId();
+ boolean that_present_updaterId = true && that.isSetUpdaterId();
+ if (this_present_updaterId || that_present_updaterId) {
+ if (!(this_present_updaterId && that_present_updaterId))
+ return false;
+ if (!this.updaterId.equals(that.updaterId))
+ return false;
+ }
+
+ boolean this_present_isExam = true;
+ boolean that_present_isExam = true;
+ if (this_present_isExam || that_present_isExam) {
+ if (!(this_present_isExam && that_present_isExam))
+ return false;
+ if (this.isExam != that.isExam)
+ return false;
+ }
+
+ boolean this_present_hasInternetAccess = true;
+ boolean that_present_hasInternetAccess = true;
+ if (this_present_hasInternetAccess || that_present_hasInternetAccess) {
+ if (!(this_present_hasInternetAccess && that_present_hasInternetAccess))
+ return false;
+ if (this.hasInternetAccess != that.hasInternetAccess)
+ return false;
+ }
+
+ boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions();
+ boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions();
+ if (this_present_defaultPermissions || that_present_defaultPermissions) {
+ if (!(this_present_defaultPermissions && that_present_defaultPermissions))
+ return false;
+ if (!this.defaultPermissions.equals(that.defaultPermissions))
+ return false;
+ }
+
+ boolean this_present_userPermissions = true && this.isSetUserPermissions();
+ boolean that_present_userPermissions = true && that.isSetUserPermissions();
+ if (this_present_userPermissions || that_present_userPermissions) {
+ if (!(this_present_userPermissions && that_present_userPermissions))
+ return false;
+ if (!this.userPermissions.equals(that.userPermissions))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(LectureSummary other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ 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(isSetLectureName()).compareTo(other.isSetLectureName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLectureName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureName, other.lectureName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsEnabled()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEnabled, other.isEnabled);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEndTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLastUsed()).compareTo(other.isSetLastUsed());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLastUsed()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastUsed, other.lastUsed);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUseCount()).compareTo(other.isSetUseCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUseCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.useCount, other.useCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUpdaterId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updaterId, other.updaterId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsExam()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isExam, other.isExam);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHasInternetAccess()).compareTo(other.isSetHasInternetAccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHasInternetAccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasInternetAccess, other.hasInternetAccess);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPermissions, other.userPermissions);
+ 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("LectureSummary(");
+ boolean first = true;
+
+ sb.append("lectureId:");
+ if (this.lectureId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lectureName:");
+ if (this.lectureName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageName:");
+ if (this.imageName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isEnabled:");
+ sb.append(this.isEnabled);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("startTime:");
+ sb.append(this.startTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("endTime:");
+ sb.append(this.endTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lastUsed:");
+ sb.append(this.lastUsed);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("useCount:");
+ sb.append(this.useCount);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("updaterId:");
+ if (this.updaterId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.updaterId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isExam:");
+ sb.append(this.isExam);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hasInternetAccess:");
+ sb.append(this.hasInternetAccess);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("defaultPermissions:");
+ if (this.defaultPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.defaultPermissions);
+ }
+ first = false;
+ if (isSetUserPermissions()) {
+ if (!first) sb.append(", ");
+ sb.append("userPermissions:");
+ if (this.userPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userPermissions);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (defaultPermissions != null) {
+ defaultPermissions.validate();
+ }
+ if (userPermissions != null) {
+ userPermissions.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // 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 LectureSummaryStandardSchemeFactory implements SchemeFactory {
+ public LectureSummaryStandardScheme getScheme() {
+ return new LectureSummaryStandardScheme();
+ }
+ }
+
+ private static class LectureSummaryStandardScheme extends StandardScheme<LectureSummary> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LectureSummary 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: // 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 2: // LECTURE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.lectureName = iprot.readString();
+ struct.setLectureNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // IMAGE_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // IMAGE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // IS_ENABLED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // END_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // LAST_USED
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.lastUsed = iprot.readI64();
+ struct.setLastUsedIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // USE_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.useCount = iprot.readI32();
+ struct.setUseCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // UPDATER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.updaterId = iprot.readString();
+ struct.setUpdaterIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // IS_EXAM
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isExam = iprot.readBool();
+ struct.setIsExamIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // HAS_INTERNET_ACCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.hasInternetAccess = iprot.readBool();
+ struct.setHasInternetAccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // DEFAULT_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.defaultPermissions = new LecturePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 15: // USER_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.userPermissions = new LecturePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(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, LectureSummary struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.lectureId != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ oprot.writeString(struct.lectureId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lectureName != null) {
+ oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC);
+ oprot.writeString(struct.lectureName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageName != null) {
+ oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
+ oprot.writeString(struct.imageName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
+ oprot.writeBool(struct.isEnabled);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(START_TIME_FIELD_DESC);
+ oprot.writeI64(struct.startTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(END_TIME_FIELD_DESC);
+ oprot.writeI64(struct.endTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_USED_FIELD_DESC);
+ oprot.writeI64(struct.lastUsed);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(USE_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.useCount);
+ oprot.writeFieldEnd();
+ if (struct.ownerId != null) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.updaterId != null) {
+ oprot.writeFieldBegin(UPDATER_ID_FIELD_DESC);
+ oprot.writeString(struct.updaterId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_EXAM_FIELD_DESC);
+ oprot.writeBool(struct.isExam);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HAS_INTERNET_ACCESS_FIELD_DESC);
+ oprot.writeBool(struct.hasInternetAccess);
+ oprot.writeFieldEnd();
+ if (struct.defaultPermissions != null) {
+ oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC);
+ struct.defaultPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.userPermissions != null) {
+ if (struct.isSetUserPermissions()) {
+ oprot.writeFieldBegin(USER_PERMISSIONS_FIELD_DESC);
+ struct.userPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LectureSummaryTupleSchemeFactory implements SchemeFactory {
+ public LectureSummaryTupleScheme getScheme() {
+ return new LectureSummaryTupleScheme();
+ }
+ }
+
+ private static class LectureSummaryTupleScheme extends TupleScheme<LectureSummary> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LectureSummary struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLectureId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLectureName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetImageVersionId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetImageName()) {
+ optionals.set(3);
+ }
+ if (struct.isSetIsEnabled()) {
+ optionals.set(4);
+ }
+ if (struct.isSetStartTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetEndTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetLastUsed()) {
+ optionals.set(7);
+ }
+ if (struct.isSetUseCount()) {
+ optionals.set(8);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(9);
+ }
+ if (struct.isSetUpdaterId()) {
+ optionals.set(10);
+ }
+ if (struct.isSetIsExam()) {
+ optionals.set(11);
+ }
+ if (struct.isSetHasInternetAccess()) {
+ optionals.set(12);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ optionals.set(13);
+ }
+ if (struct.isSetUserPermissions()) {
+ optionals.set(14);
+ }
+ oprot.writeBitSet(optionals, 15);
+ if (struct.isSetLectureId()) {
+ oprot.writeString(struct.lectureId);
+ }
+ if (struct.isSetLectureName()) {
+ oprot.writeString(struct.lectureName);
+ }
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ if (struct.isSetImageName()) {
+ oprot.writeString(struct.imageName);
+ }
+ if (struct.isSetIsEnabled()) {
+ oprot.writeBool(struct.isEnabled);
+ }
+ if (struct.isSetStartTime()) {
+ oprot.writeI64(struct.startTime);
+ }
+ if (struct.isSetEndTime()) {
+ oprot.writeI64(struct.endTime);
+ }
+ if (struct.isSetLastUsed()) {
+ oprot.writeI64(struct.lastUsed);
+ }
+ if (struct.isSetUseCount()) {
+ oprot.writeI32(struct.useCount);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetUpdaterId()) {
+ oprot.writeString(struct.updaterId);
+ }
+ if (struct.isSetIsExam()) {
+ oprot.writeBool(struct.isExam);
+ }
+ if (struct.isSetHasInternetAccess()) {
+ oprot.writeBool(struct.hasInternetAccess);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ struct.defaultPermissions.write(oprot);
+ }
+ if (struct.isSetUserPermissions()) {
+ struct.userPermissions.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LectureSummary struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(15);
+ if (incoming.get(0)) {
+ struct.lectureId = iprot.readString();
+ struct.setLectureIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lectureName = iprot.readString();
+ struct.setLectureNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.imageName = iprot.readString();
+ struct.setImageNameIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.lastUsed = iprot.readI64();
+ struct.setLastUsedIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.useCount = iprot.readI32();
+ struct.setUseCountIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.updaterId = iprot.readString();
+ struct.setUpdaterIdIsSet(true);
+ }
+ if (incoming.get(11)) {
+ struct.isExam = iprot.readBool();
+ struct.setIsExamIsSet(true);
+ }
+ if (incoming.get(12)) {
+ struct.hasInternetAccess = iprot.readBool();
+ struct.setHasInternetAccessIsSet(true);
+ }
+ if (incoming.get(13)) {
+ struct.defaultPermissions = new LecturePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ }
+ if (incoming.get(14)) {
+ struct.userPermissions = new LecturePermissions();
+ struct.userPermissions.read(iprot);
+ struct.setUserPermissionsIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java
new file mode 100644
index 0000000..94ed38b
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java
@@ -0,0 +1,1267 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, LectureWrite._Fields>, java.io.Serializable, Cloneable, Comparable<LectureWrite> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureWrite");
+
+ private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)4);
+ private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)5);
+ private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)6);
+ private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)8);
+ private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)9);
+ private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LectureWriteStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LectureWriteTupleSchemeFactory());
+ }
+
+ public String lectureName; // required
+ public String description; // required
+ public String imageVersionId; // required
+ public boolean isEnabled; // required
+ public long startTime; // required
+ public long endTime; // required
+ public String ownerId; // required
+ public boolean isExam; // required
+ public boolean hasInternetAccess; // required
+ public LecturePermissions defaultPermissions; // 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 {
+ LECTURE_NAME((short)1, "lectureName"),
+ DESCRIPTION((short)2, "description"),
+ IMAGE_VERSION_ID((short)3, "imageVersionId"),
+ IS_ENABLED((short)4, "isEnabled"),
+ START_TIME((short)5, "startTime"),
+ END_TIME((short)6, "endTime"),
+ OWNER_ID((short)7, "ownerId"),
+ IS_EXAM((short)8, "isExam"),
+ HAS_INTERNET_ACCESS((short)9, "hasInternetAccess"),
+ DEFAULT_PERMISSIONS((short)10, "defaultPermissions");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // LECTURE_NAME
+ return LECTURE_NAME;
+ case 2: // DESCRIPTION
+ return DESCRIPTION;
+ case 3: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_ID;
+ case 4: // IS_ENABLED
+ return IS_ENABLED;
+ case 5: // START_TIME
+ return START_TIME;
+ case 6: // END_TIME
+ return END_TIME;
+ case 7: // OWNER_ID
+ return OWNER_ID;
+ case 8: // IS_EXAM
+ return IS_EXAM;
+ case 9: // HAS_INTERNET_ACCESS
+ return HAS_INTERNET_ACCESS;
+ case 10: // DEFAULT_PERMISSIONS
+ return DEFAULT_PERMISSIONS;
+ 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 __ISENABLED_ISSET_ID = 0;
+ private static final int __STARTTIME_ISSET_ID = 1;
+ private static final int __ENDTIME_ISSET_ID = 2;
+ private static final int __ISEXAM_ISSET_ID = 3;
+ private static final int __HASINTERNETACCESS_ISSET_ID = 4;
+ 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.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
+ tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IS_EXAM, new org.apache.thrift.meta_data.FieldMetaData("isExam", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_INTERNET_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasInternetAccess", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ 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(LectureWrite.class, metaDataMap);
+ }
+
+ public LectureWrite() {
+ }
+
+ public LectureWrite(
+ String lectureName,
+ String description,
+ String imageVersionId,
+ boolean isEnabled,
+ long startTime,
+ long endTime,
+ String ownerId,
+ boolean isExam,
+ boolean hasInternetAccess,
+ LecturePermissions defaultPermissions)
+ {
+ this();
+ this.lectureName = lectureName;
+ this.description = description;
+ this.imageVersionId = imageVersionId;
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ this.endTime = endTime;
+ setEndTimeIsSet(true);
+ this.ownerId = ownerId;
+ this.isExam = isExam;
+ setIsExamIsSet(true);
+ this.hasInternetAccess = hasInternetAccess;
+ setHasInternetAccessIsSet(true);
+ this.defaultPermissions = defaultPermissions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public LectureWrite(LectureWrite other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetLectureName()) {
+ this.lectureName = other.lectureName;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ this.isEnabled = other.isEnabled;
+ this.startTime = other.startTime;
+ this.endTime = other.endTime;
+ if (other.isSetOwnerId()) {
+ this.ownerId = other.ownerId;
+ }
+ this.isExam = other.isExam;
+ this.hasInternetAccess = other.hasInternetAccess;
+ if (other.isSetDefaultPermissions()) {
+ this.defaultPermissions = new LecturePermissions(other.defaultPermissions);
+ }
+ }
+
+ public LectureWrite deepCopy() {
+ return new LectureWrite(this);
+ }
+
+ @Override
+ public void clear() {
+ this.lectureName = null;
+ this.description = null;
+ this.imageVersionId = null;
+ setIsEnabledIsSet(false);
+ this.isEnabled = false;
+ setStartTimeIsSet(false);
+ this.startTime = 0;
+ setEndTimeIsSet(false);
+ this.endTime = 0;
+ this.ownerId = null;
+ setIsExamIsSet(false);
+ this.isExam = false;
+ setHasInternetAccessIsSet(false);
+ this.hasInternetAccess = false;
+ this.defaultPermissions = null;
+ }
+
+ public String getLectureName() {
+ return this.lectureName;
+ }
+
+ public LectureWrite setLectureName(String lectureName) {
+ this.lectureName = lectureName;
+ return this;
+ }
+
+ public void unsetLectureName() {
+ this.lectureName = null;
+ }
+
+ /** Returns true if field lectureName is set (has been assigned a value) and false otherwise */
+ public boolean isSetLectureName() {
+ return this.lectureName != null;
+ }
+
+ public void setLectureNameIsSet(boolean value) {
+ if (!value) {
+ this.lectureName = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public LectureWrite setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public LectureWrite setImageVersionId(String imageVersionId) {
+ this.imageVersionId = imageVersionId;
+ return this;
+ }
+
+ public void unsetImageVersionId() {
+ this.imageVersionId = null;
+ }
+
+ /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageVersionId() {
+ return this.imageVersionId != null;
+ }
+
+ public void setImageVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.imageVersionId = null;
+ }
+ }
+
+ public boolean isIsEnabled() {
+ return this.isEnabled;
+ }
+
+ public LectureWrite setIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ setIsEnabledIsSet(true);
+ return this;
+ }
+
+ public void unsetIsEnabled() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ /** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsEnabled() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ }
+
+ public void setIsEnabledIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ }
+
+ public long getStartTime() {
+ return this.startTime;
+ }
+
+ public LectureWrite setStartTime(long startTime) {
+ this.startTime = startTime;
+ setStartTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetStartTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field startTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetStartTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ }
+
+ public void setStartTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ }
+
+ public long getEndTime() {
+ return this.endTime;
+ }
+
+ public LectureWrite setEndTime(long endTime) {
+ this.endTime = endTime;
+ setEndTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetEndTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field endTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetEndTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ public void setEndTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
+ }
+
+ public String getOwnerId() {
+ return this.ownerId;
+ }
+
+ public LectureWrite setOwnerId(String ownerId) {
+ this.ownerId = ownerId;
+ return this;
+ }
+
+ public void unsetOwnerId() {
+ this.ownerId = null;
+ }
+
+ /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOwnerId() {
+ return this.ownerId != null;
+ }
+
+ public void setOwnerIdIsSet(boolean value) {
+ if (!value) {
+ this.ownerId = null;
+ }
+ }
+
+ public boolean isIsExam() {
+ return this.isExam;
+ }
+
+ public LectureWrite setIsExam(boolean isExam) {
+ this.isExam = isExam;
+ setIsExamIsSet(true);
+ return this;
+ }
+
+ public void unsetIsExam() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ }
+
+ /** Returns true if field isExam is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsExam() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ }
+
+ public void setIsExamIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
+ }
+
+ public boolean isHasInternetAccess() {
+ return this.hasInternetAccess;
+ }
+
+ public LectureWrite setHasInternetAccess(boolean hasInternetAccess) {
+ this.hasInternetAccess = hasInternetAccess;
+ setHasInternetAccessIsSet(true);
+ return this;
+ }
+
+ public void unsetHasInternetAccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ }
+
+ /** Returns true if field hasInternetAccess is set (has been assigned a value) and false otherwise */
+ public boolean isSetHasInternetAccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ }
+
+ public void setHasInternetAccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
+ }
+
+ public LecturePermissions getDefaultPermissions() {
+ return this.defaultPermissions;
+ }
+
+ public LectureWrite setDefaultPermissions(LecturePermissions defaultPermissions) {
+ this.defaultPermissions = defaultPermissions;
+ return this;
+ }
+
+ public void unsetDefaultPermissions() {
+ this.defaultPermissions = null;
+ }
+
+ /** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */
+ public boolean isSetDefaultPermissions() {
+ return this.defaultPermissions != null;
+ }
+
+ public void setDefaultPermissionsIsSet(boolean value) {
+ if (!value) {
+ this.defaultPermissions = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LECTURE_NAME:
+ if (value == null) {
+ unsetLectureName();
+ } else {
+ setLectureName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ case IMAGE_VERSION_ID:
+ if (value == null) {
+ unsetImageVersionId();
+ } else {
+ setImageVersionId((String)value);
+ }
+ break;
+
+ case IS_ENABLED:
+ if (value == null) {
+ unsetIsEnabled();
+ } else {
+ setIsEnabled((Boolean)value);
+ }
+ break;
+
+ case START_TIME:
+ if (value == null) {
+ unsetStartTime();
+ } else {
+ setStartTime((Long)value);
+ }
+ break;
+
+ case END_TIME:
+ if (value == null) {
+ unsetEndTime();
+ } else {
+ setEndTime((Long)value);
+ }
+ break;
+
+ case OWNER_ID:
+ if (value == null) {
+ unsetOwnerId();
+ } else {
+ setOwnerId((String)value);
+ }
+ break;
+
+ case IS_EXAM:
+ if (value == null) {
+ unsetIsExam();
+ } else {
+ setIsExam((Boolean)value);
+ }
+ break;
+
+ case HAS_INTERNET_ACCESS:
+ if (value == null) {
+ unsetHasInternetAccess();
+ } else {
+ setHasInternetAccess((Boolean)value);
+ }
+ break;
+
+ case DEFAULT_PERMISSIONS:
+ if (value == null) {
+ unsetDefaultPermissions();
+ } else {
+ setDefaultPermissions((LecturePermissions)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LECTURE_NAME:
+ return getLectureName();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ case IS_ENABLED:
+ return Boolean.valueOf(isIsEnabled());
+
+ case START_TIME:
+ return Long.valueOf(getStartTime());
+
+ case END_TIME:
+ return Long.valueOf(getEndTime());
+
+ case OWNER_ID:
+ return getOwnerId();
+
+ case IS_EXAM:
+ return Boolean.valueOf(isIsExam());
+
+ case HAS_INTERNET_ACCESS:
+ return Boolean.valueOf(isHasInternetAccess());
+
+ case DEFAULT_PERMISSIONS:
+ return getDefaultPermissions();
+
+ }
+ 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 LECTURE_NAME:
+ return isSetLectureName();
+ case DESCRIPTION:
+ return isSetDescription();
+ case IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ case IS_ENABLED:
+ return isSetIsEnabled();
+ case START_TIME:
+ return isSetStartTime();
+ case END_TIME:
+ return isSetEndTime();
+ case OWNER_ID:
+ return isSetOwnerId();
+ case IS_EXAM:
+ return isSetIsExam();
+ case HAS_INTERNET_ACCESS:
+ return isSetHasInternetAccess();
+ case DEFAULT_PERMISSIONS:
+ return isSetDefaultPermissions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof LectureWrite)
+ return this.equals((LectureWrite)that);
+ return false;
+ }
+
+ public boolean equals(LectureWrite that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_lectureName = true && this.isSetLectureName();
+ boolean that_present_lectureName = true && that.isSetLectureName();
+ if (this_present_lectureName || that_present_lectureName) {
+ if (!(this_present_lectureName && that_present_lectureName))
+ return false;
+ if (!this.lectureName.equals(that.lectureName))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ boolean this_present_imageVersionId = true && this.isSetImageVersionId();
+ boolean that_present_imageVersionId = true && that.isSetImageVersionId();
+ if (this_present_imageVersionId || that_present_imageVersionId) {
+ if (!(this_present_imageVersionId && that_present_imageVersionId))
+ return false;
+ if (!this.imageVersionId.equals(that.imageVersionId))
+ return false;
+ }
+
+ boolean this_present_isEnabled = true;
+ boolean that_present_isEnabled = true;
+ if (this_present_isEnabled || that_present_isEnabled) {
+ if (!(this_present_isEnabled && that_present_isEnabled))
+ return false;
+ if (this.isEnabled != that.isEnabled)
+ return false;
+ }
+
+ boolean this_present_startTime = true;
+ boolean that_present_startTime = true;
+ if (this_present_startTime || that_present_startTime) {
+ if (!(this_present_startTime && that_present_startTime))
+ return false;
+ if (this.startTime != that.startTime)
+ return false;
+ }
+
+ boolean this_present_endTime = true;
+ boolean that_present_endTime = true;
+ if (this_present_endTime || that_present_endTime) {
+ if (!(this_present_endTime && that_present_endTime))
+ return false;
+ if (this.endTime != that.endTime)
+ return false;
+ }
+
+ boolean this_present_ownerId = true && this.isSetOwnerId();
+ boolean that_present_ownerId = true && that.isSetOwnerId();
+ if (this_present_ownerId || that_present_ownerId) {
+ if (!(this_present_ownerId && that_present_ownerId))
+ return false;
+ if (!this.ownerId.equals(that.ownerId))
+ return false;
+ }
+
+ boolean this_present_isExam = true;
+ boolean that_present_isExam = true;
+ if (this_present_isExam || that_present_isExam) {
+ if (!(this_present_isExam && that_present_isExam))
+ return false;
+ if (this.isExam != that.isExam)
+ return false;
+ }
+
+ boolean this_present_hasInternetAccess = true;
+ boolean that_present_hasInternetAccess = true;
+ if (this_present_hasInternetAccess || that_present_hasInternetAccess) {
+ if (!(this_present_hasInternetAccess && that_present_hasInternetAccess))
+ return false;
+ if (this.hasInternetAccess != that.hasInternetAccess)
+ return false;
+ }
+
+ boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions();
+ boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions();
+ if (this_present_defaultPermissions || that_present_defaultPermissions) {
+ if (!(this_present_defaultPermissions && that_present_defaultPermissions))
+ return false;
+ if (!this.defaultPermissions.equals(that.defaultPermissions))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(LectureWrite other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLectureName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureName, other.lectureName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsEnabled()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEnabled, other.isEnabled);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEndTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOwnerId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsExam()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isExam, other.isExam);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHasInternetAccess()).compareTo(other.isSetHasInternetAccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHasInternetAccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasInternetAccess, other.hasInternetAccess);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDefaultPermissions()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions);
+ 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("LectureWrite(");
+ boolean first = true;
+
+ sb.append("lectureName:");
+ if (this.lectureName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isEnabled:");
+ sb.append(this.isEnabled);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("startTime:");
+ sb.append(this.startTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("endTime:");
+ sb.append(this.endTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ownerId:");
+ if (this.ownerId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ownerId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("isExam:");
+ sb.append(this.isExam);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hasInternetAccess:");
+ sb.append(this.hasInternetAccess);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("defaultPermissions:");
+ if (this.defaultPermissions == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.defaultPermissions);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (defaultPermissions != null) {
+ defaultPermissions.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // 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 LectureWriteStandardSchemeFactory implements SchemeFactory {
+ public LectureWriteStandardScheme getScheme() {
+ return new LectureWriteStandardScheme();
+ }
+ }
+
+ private static class LectureWriteStandardScheme extends StandardScheme<LectureWrite> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LectureWrite 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: // LECTURE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.lectureName = iprot.readString();
+ struct.setLectureNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // IMAGE_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // IS_ENABLED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // END_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // OWNER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // IS_EXAM
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isExam = iprot.readBool();
+ struct.setIsExamIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // HAS_INTERNET_ACCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.hasInternetAccess = iprot.readBool();
+ struct.setHasInternetAccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // DEFAULT_PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.defaultPermissions = new LecturePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(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, LectureWrite struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.lectureName != null) {
+ oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC);
+ oprot.writeString(struct.lectureName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
+ oprot.writeBool(struct.isEnabled);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(START_TIME_FIELD_DESC);
+ oprot.writeI64(struct.startTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(END_TIME_FIELD_DESC);
+ oprot.writeI64(struct.endTime);
+ oprot.writeFieldEnd();
+ if (struct.ownerId != null) {
+ oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
+ oprot.writeString(struct.ownerId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(IS_EXAM_FIELD_DESC);
+ oprot.writeBool(struct.isExam);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HAS_INTERNET_ACCESS_FIELD_DESC);
+ oprot.writeBool(struct.hasInternetAccess);
+ oprot.writeFieldEnd();
+ if (struct.defaultPermissions != null) {
+ oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC);
+ struct.defaultPermissions.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LectureWriteTupleSchemeFactory implements SchemeFactory {
+ public LectureWriteTupleScheme getScheme() {
+ return new LectureWriteTupleScheme();
+ }
+ }
+
+ private static class LectureWriteTupleScheme extends TupleScheme<LectureWrite> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LectureWrite struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLectureName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(1);
+ }
+ if (struct.isSetImageVersionId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetIsEnabled()) {
+ optionals.set(3);
+ }
+ if (struct.isSetStartTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetEndTime()) {
+ optionals.set(5);
+ }
+ if (struct.isSetOwnerId()) {
+ optionals.set(6);
+ }
+ if (struct.isSetIsExam()) {
+ optionals.set(7);
+ }
+ if (struct.isSetHasInternetAccess()) {
+ optionals.set(8);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ optionals.set(9);
+ }
+ oprot.writeBitSet(optionals, 10);
+ if (struct.isSetLectureName()) {
+ oprot.writeString(struct.lectureName);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ if (struct.isSetIsEnabled()) {
+ oprot.writeBool(struct.isEnabled);
+ }
+ if (struct.isSetStartTime()) {
+ oprot.writeI64(struct.startTime);
+ }
+ if (struct.isSetEndTime()) {
+ oprot.writeI64(struct.endTime);
+ }
+ if (struct.isSetOwnerId()) {
+ oprot.writeString(struct.ownerId);
+ }
+ if (struct.isSetIsExam()) {
+ oprot.writeBool(struct.isExam);
+ }
+ if (struct.isSetHasInternetAccess()) {
+ oprot.writeBool(struct.hasInternetAccess);
+ }
+ if (struct.isSetDefaultPermissions()) {
+ struct.defaultPermissions.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LectureWrite struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(10);
+ if (incoming.get(0)) {
+ struct.lectureName = iprot.readString();
+ struct.setLectureNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.isEnabled = iprot.readBool();
+ struct.setIsEnabledIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.startTime = iprot.readI64();
+ struct.setStartTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.ownerId = iprot.readString();
+ struct.setOwnerIdIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.isExam = iprot.readBool();
+ struct.setIsExamIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.hasInternetAccess = iprot.readBool();
+ struct.setHasInternetAccessIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.defaultPermissions = new LecturePermissions();
+ struct.defaultPermissions.read(iprot);
+ struct.setDefaultPermissionsIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
new file mode 100644
index 0000000..409d1f4
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
@@ -0,0 +1,16214 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MasterServer {
+
+ public interface Iface {
+
+ public boolean ping() throws org.apache.thrift.TException;
+
+ public SessionData authenticate(String login, String password) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public ClientSessionData localAccountLogin(String login, String password) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public List<ImagePublishData> getPublicImages(String sessionId, int page) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public UserInfo getUserFromToken(String token) throws TInvalidTokenException, org.apache.thrift.TException;
+
+ public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException;
+
+ public ByteBuffer startServerAuthentication(String organizationId) throws TAuthenticationException, org.apache.thrift.TException;
+
+ public ServerSessionData serverAuthenticate(String organizationId, ByteBuffer challengeResponse) throws TAuthenticationException, org.apache.thrift.TException;
+
+ public TransferInformation submitImage(String serverSessionId, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws TAuthorizationException, TImageDataException, TTransferRejectedException, org.apache.thrift.TException;
+
+ public TransferInformation getImage(String serverSessionId, String imageVersionId) throws TAuthorizationException, TImageDataException, org.apache.thrift.TException;
+
+ public boolean registerSatellite(String organizationId, String address, String modulus, String exponent) throws org.apache.thrift.TException;
+
+ public boolean updateSatelliteAddress(String serverSessionId, String address) throws org.apache.thrift.TException;
+
+ public List<Organization> getOrganizations() throws org.apache.thrift.TException;
+
+ public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException;
+
+ public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void localAccountLogin(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void startServerAuthentication(String organizationId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void submitImage(String serverSessionId, ImagePublishData imageDescription, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getImage(String serverSessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public boolean ping() throws org.apache.thrift.TException
+ {
+ send_ping();
+ return recv_ping();
+ }
+
+ public void send_ping() throws org.apache.thrift.TException
+ {
+ ping_args args = new ping_args();
+ sendBase("ping", args);
+ }
+
+ public boolean recv_ping() throws org.apache.thrift.TException
+ {
+ ping_result result = new ping_result();
+ receiveBase(result, "ping");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result");
+ }
+
+ public SessionData authenticate(String login, String password) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_authenticate(login, password);
+ return recv_authenticate();
+ }
+
+ public void send_authenticate(String login, String password) throws org.apache.thrift.TException
+ {
+ authenticate_args args = new authenticate_args();
+ args.setLogin(login);
+ args.setPassword(password);
+ sendBase("authenticate", args);
+ }
+
+ public SessionData recv_authenticate() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ authenticate_result result = new authenticate_result();
+ receiveBase(result, "authenticate");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result");
+ }
+
+ public ClientSessionData localAccountLogin(String login, String password) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_localAccountLogin(login, password);
+ return recv_localAccountLogin();
+ }
+
+ public void send_localAccountLogin(String login, String password) throws org.apache.thrift.TException
+ {
+ localAccountLogin_args args = new localAccountLogin_args();
+ args.setLogin(login);
+ args.setPassword(password);
+ sendBase("localAccountLogin", args);
+ }
+
+ public ClientSessionData recv_localAccountLogin() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ localAccountLogin_result result = new localAccountLogin_result();
+ receiveBase(result, "localAccountLogin");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "localAccountLogin failed: unknown result");
+ }
+
+ public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_findUser(sessionId, organizationId, searchTerm);
+ return recv_findUser();
+ }
+
+ public void send_findUser(String sessionId, String organizationId, String searchTerm) throws org.apache.thrift.TException
+ {
+ findUser_args args = new findUser_args();
+ args.setSessionId(sessionId);
+ args.setOrganizationId(organizationId);
+ args.setSearchTerm(searchTerm);
+ sendBase("findUser", args);
+ }
+
+ public List<UserInfo> recv_findUser() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ findUser_result result = new findUser_result();
+ receiveBase(result, "findUser");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findUser failed: unknown result");
+ }
+
+ public List<ImagePublishData> getPublicImages(String sessionId, int page) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_getPublicImages(sessionId, page);
+ return recv_getPublicImages();
+ }
+
+ public void send_getPublicImages(String sessionId, int page) throws org.apache.thrift.TException
+ {
+ getPublicImages_args args = new getPublicImages_args();
+ args.setSessionId(sessionId);
+ args.setPage(page);
+ sendBase("getPublicImages", args);
+ }
+
+ public List<ImagePublishData> recv_getPublicImages() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ getPublicImages_result result = new getPublicImages_result();
+ receiveBase(result, "getPublicImages");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPublicImages failed: unknown result");
+ }
+
+ public UserInfo getUserFromToken(String token) throws TInvalidTokenException, org.apache.thrift.TException
+ {
+ send_getUserFromToken(token);
+ return recv_getUserFromToken();
+ }
+
+ public void send_getUserFromToken(String token) throws org.apache.thrift.TException
+ {
+ getUserFromToken_args args = new getUserFromToken_args();
+ args.setToken(token);
+ sendBase("getUserFromToken", args);
+ }
+
+ public UserInfo recv_getUserFromToken() throws TInvalidTokenException, org.apache.thrift.TException
+ {
+ getUserFromToken_result result = new getUserFromToken_result();
+ receiveBase(result, "getUserFromToken");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserFromToken failed: unknown result");
+ }
+
+ public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
+ {
+ send_isServerAuthenticated(serverSessionId);
+ return recv_isServerAuthenticated();
+ }
+
+ public void send_isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
+ {
+ isServerAuthenticated_args args = new isServerAuthenticated_args();
+ args.setServerSessionId(serverSessionId);
+ sendBase("isServerAuthenticated", args);
+ }
+
+ public boolean recv_isServerAuthenticated() throws org.apache.thrift.TException
+ {
+ isServerAuthenticated_result result = new isServerAuthenticated_result();
+ receiveBase(result, "isServerAuthenticated");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isServerAuthenticated failed: unknown result");
+ }
+
+ public ByteBuffer startServerAuthentication(String organizationId) throws TAuthenticationException, org.apache.thrift.TException
+ {
+ send_startServerAuthentication(organizationId);
+ return recv_startServerAuthentication();
+ }
+
+ public void send_startServerAuthentication(String organizationId) throws org.apache.thrift.TException
+ {
+ startServerAuthentication_args args = new startServerAuthentication_args();
+ args.setOrganizationId(organizationId);
+ sendBase("startServerAuthentication", args);
+ }
+
+ public ByteBuffer recv_startServerAuthentication() throws TAuthenticationException, org.apache.thrift.TException
+ {
+ startServerAuthentication_result result = new startServerAuthentication_result();
+ receiveBase(result, "startServerAuthentication");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startServerAuthentication failed: unknown result");
+ }
+
+ public ServerSessionData serverAuthenticate(String organizationId, ByteBuffer challengeResponse) throws TAuthenticationException, org.apache.thrift.TException
+ {
+ send_serverAuthenticate(organizationId, challengeResponse);
+ return recv_serverAuthenticate();
+ }
+
+ public void send_serverAuthenticate(String organizationId, ByteBuffer challengeResponse) throws org.apache.thrift.TException
+ {
+ serverAuthenticate_args args = new serverAuthenticate_args();
+ args.setOrganizationId(organizationId);
+ args.setChallengeResponse(challengeResponse);
+ sendBase("serverAuthenticate", args);
+ }
+
+ public ServerSessionData recv_serverAuthenticate() throws TAuthenticationException, org.apache.thrift.TException
+ {
+ serverAuthenticate_result result = new serverAuthenticate_result();
+ receiveBase(result, "serverAuthenticate");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "serverAuthenticate failed: unknown result");
+ }
+
+ public TransferInformation submitImage(String serverSessionId, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws TAuthorizationException, TImageDataException, TTransferRejectedException, org.apache.thrift.TException
+ {
+ send_submitImage(serverSessionId, imageDescription, blockHashes);
+ return recv_submitImage();
+ }
+
+ public void send_submitImage(String serverSessionId, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws org.apache.thrift.TException
+ {
+ submitImage_args args = new submitImage_args();
+ args.setServerSessionId(serverSessionId);
+ args.setImageDescription(imageDescription);
+ args.setBlockHashes(blockHashes);
+ sendBase("submitImage", args);
+ }
+
+ public TransferInformation recv_submitImage() throws TAuthorizationException, TImageDataException, TTransferRejectedException, org.apache.thrift.TException
+ {
+ submitImage_result result = new submitImage_result();
+ receiveBase(result, "submitImage");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ if (result.failure2 != null) {
+ throw result.failure2;
+ }
+ if (result.failure3 != null) {
+ throw result.failure3;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitImage failed: unknown result");
+ }
+
+ public TransferInformation getImage(String serverSessionId, String imageVersionId) throws TAuthorizationException, TImageDataException, org.apache.thrift.TException
+ {
+ send_getImage(serverSessionId, imageVersionId);
+ return recv_getImage();
+ }
+
+ public void send_getImage(String serverSessionId, String imageVersionId) throws org.apache.thrift.TException
+ {
+ getImage_args args = new getImage_args();
+ args.setServerSessionId(serverSessionId);
+ args.setImageVersionId(imageVersionId);
+ sendBase("getImage", args);
+ }
+
+ public TransferInformation recv_getImage() throws TAuthorizationException, TImageDataException, org.apache.thrift.TException
+ {
+ getImage_result result = new getImage_result();
+ receiveBase(result, "getImage");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.failure != null) {
+ throw result.failure;
+ }
+ if (result.failure2 != null) {
+ throw result.failure2;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImage failed: unknown result");
+ }
+
+ public boolean registerSatellite(String organizationId, String address, String modulus, String exponent) throws org.apache.thrift.TException
+ {
+ send_registerSatellite(organizationId, address, modulus, exponent);
+ return recv_registerSatellite();
+ }
+
+ public void send_registerSatellite(String organizationId, String address, String modulus, String exponent) throws org.apache.thrift.TException
+ {
+ registerSatellite_args args = new registerSatellite_args();
+ args.setOrganizationId(organizationId);
+ args.setAddress(address);
+ args.setModulus(modulus);
+ args.setExponent(exponent);
+ sendBase("registerSatellite", args);
+ }
+
+ public boolean recv_registerSatellite() throws org.apache.thrift.TException
+ {
+ registerSatellite_result result = new registerSatellite_result();
+ receiveBase(result, "registerSatellite");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerSatellite failed: unknown result");
+ }
+
+ public boolean updateSatelliteAddress(String serverSessionId, String address) throws org.apache.thrift.TException
+ {
+ send_updateSatelliteAddress(serverSessionId, address);
+ return recv_updateSatelliteAddress();
+ }
+
+ public void send_updateSatelliteAddress(String serverSessionId, String address) throws org.apache.thrift.TException
+ {
+ updateSatelliteAddress_args args = new updateSatelliteAddress_args();
+ args.setServerSessionId(serverSessionId);
+ args.setAddress(address);
+ sendBase("updateSatelliteAddress", args);
+ }
+
+ public boolean recv_updateSatelliteAddress() throws org.apache.thrift.TException
+ {
+ updateSatelliteAddress_result result = new updateSatelliteAddress_result();
+ receiveBase(result, "updateSatelliteAddress");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateSatelliteAddress failed: unknown result");
+ }
+
+ public List<Organization> getOrganizations() throws org.apache.thrift.TException
+ {
+ send_getOrganizations();
+ return recv_getOrganizations();
+ }
+
+ public void send_getOrganizations() throws org.apache.thrift.TException
+ {
+ getOrganizations_args args = new getOrganizations_args();
+ sendBase("getOrganizations", args);
+ }
+
+ public List<Organization> recv_getOrganizations() throws org.apache.thrift.TException
+ {
+ getOrganizations_result result = new getOrganizations_result();
+ receiveBase(result, "getOrganizations");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOrganizations failed: unknown result");
+ }
+
+ public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException
+ {
+ send_getOperatingSystems();
+ return recv_getOperatingSystems();
+ }
+
+ public void send_getOperatingSystems() throws org.apache.thrift.TException
+ {
+ getOperatingSystems_args args = new getOperatingSystems_args();
+ sendBase("getOperatingSystems", args);
+ }
+
+ public List<OperatingSystem> recv_getOperatingSystems() throws org.apache.thrift.TException
+ {
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ receiveBase(result, "getOperatingSystems");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result");
+ }
+
+ public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException
+ {
+ send_getVirtualizers();
+ return recv_getVirtualizers();
+ }
+
+ public void send_getVirtualizers() throws org.apache.thrift.TException
+ {
+ getVirtualizers_args args = new getVirtualizers_args();
+ sendBase("getVirtualizers", args);
+ }
+
+ public List<Virtualizer> recv_getVirtualizers() throws org.apache.thrift.TException
+ {
+ getVirtualizers_result result = new getVirtualizers_result();
+ receiveBase(result, "getVirtualizers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result");
+ }
+
+ }
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public ping_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ ping_args args = new ping_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_ping();
+ }
+ }
+
+ public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ authenticate_call method_call = new authenticate_call(login, password, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String login;
+ private String password;
+ public authenticate_call(String login, String password, 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.login = login;
+ this.password = password;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ authenticate_args args = new authenticate_args();
+ args.setLogin(login);
+ args.setPassword(password);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public SessionData getResult() throws TAuthorizationException, 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_authenticate();
+ }
+ }
+
+ public void localAccountLogin(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ localAccountLogin_call method_call = new localAccountLogin_call(login, password, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class localAccountLogin_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String login;
+ private String password;
+ public localAccountLogin_call(String login, String password, 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.login = login;
+ this.password = password;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("localAccountLogin", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ localAccountLogin_args args = new localAccountLogin_args();
+ args.setLogin(login);
+ args.setPassword(password);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ClientSessionData getResult() throws TAuthorizationException, 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_localAccountLogin();
+ }
+ }
+
+ public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ findUser_call method_call = new findUser_call(sessionId, organizationId, searchTerm, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class findUser_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String sessionId;
+ private String organizationId;
+ private String searchTerm;
+ public findUser_call(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.sessionId = sessionId;
+ this.organizationId = organizationId;
+ this.searchTerm = searchTerm;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("findUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ findUser_args args = new findUser_args();
+ args.setSessionId(sessionId);
+ args.setOrganizationId(organizationId);
+ args.setSearchTerm(searchTerm);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<UserInfo> getResult() throws TAuthorizationException, 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_findUser();
+ }
+ }
+
+ public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getPublicImages_call method_call = new getPublicImages_call(sessionId, page, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getPublicImages_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String sessionId;
+ private int page;
+ public getPublicImages_call(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.sessionId = sessionId;
+ this.page = page;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPublicImages", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getPublicImages_args args = new getPublicImages_args();
+ args.setSessionId(sessionId);
+ args.setPage(page);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<ImagePublishData> getResult() throws TAuthorizationException, 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_getPublicImages();
+ }
+ }
+
+ public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String token;
+ public getUserFromToken_call(String token, 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.token = token;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserFromToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getUserFromToken_args args = new getUserFromToken_args();
+ args.setToken(token);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public UserInfo getResult() throws TInvalidTokenException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getUserFromToken();
+ }
+ }
+
+ public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ isServerAuthenticated_call method_call = new isServerAuthenticated_call(serverSessionId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class isServerAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String serverSessionId;
+ public isServerAuthenticated_call(String serverSessionId, 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.serverSessionId = serverSessionId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isServerAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ isServerAuthenticated_args args = new isServerAuthenticated_args();
+ args.setServerSessionId(serverSessionId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_isServerAuthenticated();
+ }
+ }
+
+ public void startServerAuthentication(String organizationId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ startServerAuthentication_call method_call = new startServerAuthentication_call(organizationId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class startServerAuthentication_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String organizationId;
+ public startServerAuthentication_call(String organizationId, 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.organizationId = organizationId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startServerAuthentication", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ startServerAuthentication_args args = new startServerAuthentication_args();
+ args.setOrganizationId(organizationId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ByteBuffer getResult() throws TAuthenticationException, 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_startServerAuthentication();
+ }
+ }
+
+ public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ serverAuthenticate_call method_call = new serverAuthenticate_call(organizationId, challengeResponse, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class serverAuthenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String organizationId;
+ private ByteBuffer challengeResponse;
+ public serverAuthenticate_call(String organizationId, ByteBuffer challengeResponse, 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.organizationId = organizationId;
+ this.challengeResponse = challengeResponse;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("serverAuthenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ serverAuthenticate_args args = new serverAuthenticate_args();
+ args.setOrganizationId(organizationId);
+ args.setChallengeResponse(challengeResponse);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ServerSessionData getResult() throws TAuthenticationException, 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_serverAuthenticate();
+ }
+ }
+
+ public void submitImage(String serverSessionId, ImagePublishData imageDescription, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ submitImage_call method_call = new submitImage_call(serverSessionId, imageDescription, blockHashes, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class submitImage_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String serverSessionId;
+ private ImagePublishData imageDescription;
+ private List<ByteBuffer> blockHashes;
+ public submitImage_call(String serverSessionId, ImagePublishData imageDescription, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.serverSessionId = serverSessionId;
+ this.imageDescription = imageDescription;
+ this.blockHashes = blockHashes;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ submitImage_args args = new submitImage_args();
+ args.setServerSessionId(serverSessionId);
+ args.setImageDescription(imageDescription);
+ args.setBlockHashes(blockHashes);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TransferInformation getResult() throws TAuthorizationException, TImageDataException, TTransferRejectedException, 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_submitImage();
+ }
+ }
+
+ public void getImage(String serverSessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getImage_call method_call = new getImage_call(serverSessionId, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getImage_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String serverSessionId;
+ private String imageVersionId;
+ public getImage_call(String serverSessionId, String imageVersionId, 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.serverSessionId = serverSessionId;
+ this.imageVersionId = imageVersionId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getImage_args args = new getImage_args();
+ args.setServerSessionId(serverSessionId);
+ args.setImageVersionId(imageVersionId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TransferInformation getResult() throws TAuthorizationException, TImageDataException, 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_getImage();
+ }
+ }
+
+ public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ registerSatellite_call method_call = new registerSatellite_call(organizationId, address, modulus, exponent, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class registerSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String organizationId;
+ private String address;
+ private String modulus;
+ private String exponent;
+ public registerSatellite_call(String organizationId, String address, String modulus, String exponent, 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.organizationId = organizationId;
+ this.address = address;
+ this.modulus = modulus;
+ this.exponent = exponent;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ registerSatellite_args args = new registerSatellite_args();
+ args.setOrganizationId(organizationId);
+ args.setAddress(address);
+ args.setModulus(modulus);
+ args.setExponent(exponent);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_registerSatellite();
+ }
+ }
+
+ public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateSatelliteAddress_call method_call = new updateSatelliteAddress_call(serverSessionId, address, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateSatelliteAddress_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String serverSessionId;
+ private String address;
+ public updateSatelliteAddress_call(String serverSessionId, String address, 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.serverSessionId = serverSessionId;
+ this.address = address;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSatelliteAddress", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateSatelliteAddress_args args = new updateSatelliteAddress_args();
+ args.setServerSessionId(serverSessionId);
+ args.setAddress(address);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_updateSatelliteAddress();
+ }
+ }
+
+ public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getOrganizations_call method_call = new getOrganizations_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getOrganizations_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getOrganizations_args args = new getOrganizations_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<Organization> getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getOrganizations();
+ }
+ }
+
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getOperatingSystems_call method_call = new getOperatingSystems_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getOperatingSystems_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getOperatingSystems_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOperatingSystems", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getOperatingSystems_args args = new getOperatingSystems_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<OperatingSystem> getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getOperatingSystems();
+ }
+ }
+
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getVirtualizers_call method_call = new getVirtualizers_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getVirtualizers_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVirtualizers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getVirtualizers_args args = new getVirtualizers_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<Virtualizer> getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getVirtualizers();
+ }
+ }
+
+ }
+
+ public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("ping", new ping());
+ processMap.put("authenticate", new authenticate());
+ processMap.put("localAccountLogin", new localAccountLogin());
+ processMap.put("findUser", new findUser());
+ processMap.put("getPublicImages", new getPublicImages());
+ processMap.put("getUserFromToken", new getUserFromToken());
+ processMap.put("isServerAuthenticated", new isServerAuthenticated());
+ processMap.put("startServerAuthentication", new startServerAuthentication());
+ processMap.put("serverAuthenticate", new serverAuthenticate());
+ processMap.put("submitImage", new submitImage());
+ processMap.put("getImage", new getImage());
+ processMap.put("registerSatellite", new registerSatellite());
+ processMap.put("updateSatelliteAddress", new updateSatelliteAddress());
+ processMap.put("getOrganizations", new getOrganizations());
+ processMap.put("getOperatingSystems", new getOperatingSystems());
+ processMap.put("getVirtualizers", new getVirtualizers());
+ return processMap;
+ }
+
+ public static class ping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, ping_args> {
+ public ping() {
+ super("ping");
+ }
+
+ public ping_args getEmptyArgsInstance() {
+ return new ping_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException {
+ ping_result result = new ping_result();
+ result.success = iface.ping();
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class authenticate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, authenticate_args> {
+ public authenticate() {
+ super("authenticate");
+ }
+
+ public authenticate_args getEmptyArgsInstance() {
+ return new authenticate_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.thrift.TException {
+ authenticate_result result = new authenticate_result();
+ try {
+ result.success = iface.authenticate(args.login, args.password);
+ } catch (TAuthorizationException failure) {
+ result.failure = failure;
+ }
+ return result;
+ }
+ }
+
+ public static class localAccountLogin<I extends Iface> extends org.apache.thrift.ProcessFunction<I, localAccountLogin_args> {
+ public localAccountLogin() {
+ super("localAccountLogin");
+ }
+
+ public localAccountLogin_args getEmptyArgsInstance() {
+ return new localAccountLogin_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public localAccountLogin_result getResult(I iface, localAccountLogin_args args) throws org.apache.thrift.TException {
+ localAccountLogin_result result = new localAccountLogin_result();
+ try {
+ result.success = iface.localAccountLogin(args.login, args.password);
+ } catch (TAuthorizationException failure) {
+ result.failure = failure;
+ }
+ return result;
+ }
+ }
+
+ public static class findUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, findUser_args> {
+ public findUser() {
+ super("findUser");
+ }
+
+ public findUser_args getEmptyArgsInstance() {
+ return new findUser_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public findUser_result getResult(I iface, findUser_args args) throws org.apache.thrift.TException {
+ findUser_result result = new findUser_result();
+ try {
+ result.success = iface.findUser(args.sessionId, args.organizationId, args.searchTerm);
+ } catch (TAuthorizationException failure) {
+ result.failure = failure;
+ }
+ return result;
+ }
+ }
+
+ public static class getPublicImages<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPublicImages_args> {
+ public getPublicImages() {
+ super("getPublicImages");
+ }
+
+ public getPublicImages_args getEmptyArgsInstance() {
+ return new getPublicImages_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getPublicImages_result getResult(I iface, getPublicImages_args args) throws org.apache.thrift.TException {
+ getPublicImages_result result = new getPublicImages_result();
+ try {
+ result.success = iface.getPublicImages(args.sessionId, args.page);
+ } catch (TAuthorizationException failure) {
+ result.failure = failure;
+ }
+ return result;
+ }
+ }
+
+ public static class getUserFromToken<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserFromToken_args> {
+ public getUserFromToken() {
+ super("getUserFromToken");
+ }
+
+ public getUserFromToken_args getEmptyArgsInstance() {
+ return new getUserFromToken_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getUserFromToken_result getResult(I iface, getUserFromToken_args args) throws org.apache.thrift.TException {
+ getUserFromToken_result result = new getUserFromToken_result();
+ try {
+ result.success = iface.getUserFromToken(args.token);
+ } catch (TInvalidTokenException failure) {
+ result.failure = failure;
+ }
+ return result;
+ }
+ }
+
+ public static class isServerAuthenticated<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isServerAuthenticated_args> {
+ public isServerAuthenticated() {
+ super("isServerAuthenticated");
+ }
+
+ public isServerAuthenticated_args getEmptyArgsInstance() {
+ return new isServerAuthenticated_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public isServerAuthenticated_result getResult(I iface, isServerAuthenticated_args args) throws org.apache.thrift.TException {
+ isServerAuthenticated_result result = new isServerAuthenticated_result();
+ result.success = iface.isServerAuthenticated(args.serverSessionId);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class startServerAuthentication<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startServerAuthentication_args> {
+ public startServerAuthentication() {
+ super("startServerAuthentication");
+ }
+
+ public startServerAuthentication_args getEmptyArgsInstance() {
+ return new startServerAuthentication_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public startServerAuthentication_result getResult(I iface, startServerAuthentication_args args) throws org.apache.thrift.TException {
+ startServerAuthentication_result result = new startServerAuthentication_result();
+ try {
+ result.success = iface.startServerAuthentication(args.organizationId);
+ } catch (TAuthenticationException failure) {
+ result.failure = failure;
+ }
+ return result;
+ }
+ }
+
+ public static class serverAuthenticate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, serverAuthenticate_args> {
+ public serverAuthenticate() {
+ super("serverAuthenticate");
+ }
+
+ public serverAuthenticate_args getEmptyArgsInstance() {
+ return new serverAuthenticate_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public serverAuthenticate_result getResult(I iface, serverAuthenticate_args args) throws org.apache.thrift.TException {
+ serverAuthenticate_result result = new serverAuthenticate_result();
+ try {
+ result.success = iface.serverAuthenticate(args.organizationId, args.challengeResponse);
+ } catch (TAuthenticationException failure) {
+ result.failure = failure;
+ }
+ return result;
+ }
+ }
+
+ public static class submitImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitImage_args> {
+ public submitImage() {
+ super("submitImage");
+ }
+
+ public submitImage_args getEmptyArgsInstance() {
+ return new submitImage_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public submitImage_result getResult(I iface, submitImage_args args) throws org.apache.thrift.TException {
+ submitImage_result result = new submitImage_result();
+ try {
+ result.success = iface.submitImage(args.serverSessionId, args.imageDescription, args.blockHashes);
+ } catch (TAuthorizationException failure) {
+ result.failure = failure;
+ } catch (TImageDataException failure2) {
+ result.failure2 = failure2;
+ } catch (TTransferRejectedException failure3) {
+ result.failure3 = failure3;
+ }
+ return result;
+ }
+ }
+
+ public static class getImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImage_args> {
+ public getImage() {
+ super("getImage");
+ }
+
+ public getImage_args getEmptyArgsInstance() {
+ return new getImage_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getImage_result getResult(I iface, getImage_args args) throws org.apache.thrift.TException {
+ getImage_result result = new getImage_result();
+ try {
+ result.success = iface.getImage(args.serverSessionId, args.imageVersionId);
+ } catch (TAuthorizationException failure) {
+ result.failure = failure;
+ } catch (TImageDataException failure2) {
+ result.failure2 = failure2;
+ }
+ return result;
+ }
+ }
+
+ public static class registerSatellite<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerSatellite_args> {
+ public registerSatellite() {
+ super("registerSatellite");
+ }
+
+ public registerSatellite_args getEmptyArgsInstance() {
+ return new registerSatellite_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public registerSatellite_result getResult(I iface, registerSatellite_args args) throws org.apache.thrift.TException {
+ registerSatellite_result result = new registerSatellite_result();
+ result.success = iface.registerSatellite(args.organizationId, args.address, args.modulus, args.exponent);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class updateSatelliteAddress<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSatelliteAddress_args> {
+ public updateSatelliteAddress() {
+ super("updateSatelliteAddress");
+ }
+
+ public updateSatelliteAddress_args getEmptyArgsInstance() {
+ return new updateSatelliteAddress_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public updateSatelliteAddress_result getResult(I iface, updateSatelliteAddress_args args) throws org.apache.thrift.TException {
+ updateSatelliteAddress_result result = new updateSatelliteAddress_result();
+ result.success = iface.updateSatelliteAddress(args.serverSessionId, args.address);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class getOrganizations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOrganizations_args> {
+ public getOrganizations() {
+ super("getOrganizations");
+ }
+
+ public getOrganizations_args getEmptyArgsInstance() {
+ return new getOrganizations_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getOrganizations_result getResult(I iface, getOrganizations_args args) throws org.apache.thrift.TException {
+ getOrganizations_result result = new getOrganizations_result();
+ result.success = iface.getOrganizations();
+ return result;
+ }
+ }
+
+ public static class getOperatingSystems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOperatingSystems_args> {
+ public getOperatingSystems() {
+ super("getOperatingSystems");
+ }
+
+ public getOperatingSystems_args getEmptyArgsInstance() {
+ return new getOperatingSystems_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getOperatingSystems_result getResult(I iface, getOperatingSystems_args args) throws org.apache.thrift.TException {
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ result.success = iface.getOperatingSystems();
+ return result;
+ }
+ }
+
+ public static class getVirtualizers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVirtualizers_args> {
+ public getVirtualizers() {
+ super("getVirtualizers");
+ }
+
+ public getVirtualizers_args getEmptyArgsInstance() {
+ return new getVirtualizers_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getVirtualizers_result getResult(I iface, getVirtualizers_args args) throws org.apache.thrift.TException {
+ getVirtualizers_result result = new getVirtualizers_result();
+ result.success = iface.getVirtualizers();
+ return result;
+ }
+ }
+
+ }
+
+ public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("ping", new ping());
+ processMap.put("authenticate", new authenticate());
+ processMap.put("localAccountLogin", new localAccountLogin());
+ processMap.put("findUser", new findUser());
+ processMap.put("getPublicImages", new getPublicImages());
+ processMap.put("getUserFromToken", new getUserFromToken());
+ processMap.put("isServerAuthenticated", new isServerAuthenticated());
+ processMap.put("startServerAuthentication", new startServerAuthentication());
+ processMap.put("serverAuthenticate", new serverAuthenticate());
+ processMap.put("submitImage", new submitImage());
+ processMap.put("getImage", new getImage());
+ processMap.put("registerSatellite", new registerSatellite());
+ processMap.put("updateSatelliteAddress", new updateSatelliteAddress());
+ processMap.put("getOrganizations", new getOrganizations());
+ processMap.put("getOperatingSystems", new getOperatingSystems());
+ processMap.put("getVirtualizers", new getVirtualizers());
+ return processMap;
+ }
+
+ public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, Boolean> {
+ public ping() {
+ super("ping");
+ }
+
+ public ping_args getEmptyArgsInstance() {
+ return new ping_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ ping_result result = new ping_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ ping_result result = new ping_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.ping(resultHandler);
+ }
+ }
+
+ public static class authenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, authenticate_args, SessionData> {
+ public authenticate() {
+ super("authenticate");
+ }
+
+ public authenticate_args getEmptyArgsInstance() {
+ return new authenticate_args();
+ }
+
+ public AsyncMethodCallback<SessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<SessionData>() {
+ public void onComplete(SessionData o) {
+ authenticate_result result = new authenticate_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ authenticate_result result = new authenticate_result();
+ if (e instanceof TAuthorizationException) {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws TException {
+ iface.authenticate(args.login, args.password,resultHandler);
+ }
+ }
+
+ public static class localAccountLogin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, localAccountLogin_args, ClientSessionData> {
+ public localAccountLogin() {
+ super("localAccountLogin");
+ }
+
+ public localAccountLogin_args getEmptyArgsInstance() {
+ return new localAccountLogin_args();
+ }
+
+ public AsyncMethodCallback<ClientSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<ClientSessionData>() {
+ public void onComplete(ClientSessionData o) {
+ localAccountLogin_result result = new localAccountLogin_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ localAccountLogin_result result = new localAccountLogin_result();
+ if (e instanceof TAuthorizationException) {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, localAccountLogin_args args, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws TException {
+ iface.localAccountLogin(args.login, args.password,resultHandler);
+ }
+ }
+
+ public static class findUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUser_args, List<UserInfo>> {
+ public findUser() {
+ super("findUser");
+ }
+
+ public findUser_args getEmptyArgsInstance() {
+ return new findUser_args();
+ }
+
+ public AsyncMethodCallback<List<UserInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<UserInfo>>() {
+ public void onComplete(List<UserInfo> o) {
+ findUser_result result = new findUser_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ findUser_result result = new findUser_result();
+ if (e instanceof TAuthorizationException) {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, findUser_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException {
+ iface.findUser(args.sessionId, args.organizationId, args.searchTerm,resultHandler);
+ }
+ }
+
+ public static class getPublicImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPublicImages_args, List<ImagePublishData>> {
+ public getPublicImages() {
+ super("getPublicImages");
+ }
+
+ public getPublicImages_args getEmptyArgsInstance() {
+ return new getPublicImages_args();
+ }
+
+ public AsyncMethodCallback<List<ImagePublishData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<ImagePublishData>>() {
+ public void onComplete(List<ImagePublishData> o) {
+ getPublicImages_result result = new getPublicImages_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getPublicImages_result result = new getPublicImages_result();
+ if (e instanceof TAuthorizationException) {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImagePublishData>> resultHandler) throws TException {
+ iface.getPublicImages(args.sessionId, args.page,resultHandler);
+ }
+ }
+
+ public static class getUserFromToken<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserFromToken_args, UserInfo> {
+ public getUserFromToken() {
+ super("getUserFromToken");
+ }
+
+ public getUserFromToken_args getEmptyArgsInstance() {
+ return new getUserFromToken_args();
+ }
+
+ public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<UserInfo>() {
+ public void onComplete(UserInfo o) {
+ getUserFromToken_result result = new getUserFromToken_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getUserFromToken_result result = new getUserFromToken_result();
+ if (e instanceof TInvalidTokenException) {
+ result.failure = (TInvalidTokenException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException {
+ iface.getUserFromToken(args.token,resultHandler);
+ }
+ }
+
+ public static class isServerAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isServerAuthenticated_args, Boolean> {
+ public isServerAuthenticated() {
+ super("isServerAuthenticated");
+ }
+
+ public isServerAuthenticated_args getEmptyArgsInstance() {
+ return new isServerAuthenticated_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ isServerAuthenticated_result result = new isServerAuthenticated_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ isServerAuthenticated_result result = new isServerAuthenticated_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, isServerAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.isServerAuthenticated(args.serverSessionId,resultHandler);
+ }
+ }
+
+ public static class startServerAuthentication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startServerAuthentication_args, ByteBuffer> {
+ public startServerAuthentication() {
+ super("startServerAuthentication");
+ }
+
+ public startServerAuthentication_args getEmptyArgsInstance() {
+ return new startServerAuthentication_args();
+ }
+
+ public AsyncMethodCallback<ByteBuffer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<ByteBuffer>() {
+ public void onComplete(ByteBuffer o) {
+ startServerAuthentication_result result = new startServerAuthentication_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ startServerAuthentication_result result = new startServerAuthentication_result();
+ if (e instanceof TAuthenticationException) {
+ result.failure = (TAuthenticationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, startServerAuthentication_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
+ iface.startServerAuthentication(args.organizationId,resultHandler);
+ }
+ }
+
+ public static class serverAuthenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, serverAuthenticate_args, ServerSessionData> {
+ public serverAuthenticate() {
+ super("serverAuthenticate");
+ }
+
+ public serverAuthenticate_args getEmptyArgsInstance() {
+ return new serverAuthenticate_args();
+ }
+
+ public AsyncMethodCallback<ServerSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<ServerSessionData>() {
+ public void onComplete(ServerSessionData o) {
+ serverAuthenticate_result result = new serverAuthenticate_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ serverAuthenticate_result result = new serverAuthenticate_result();
+ if (e instanceof TAuthenticationException) {
+ result.failure = (TAuthenticationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, serverAuthenticate_args args, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws TException {
+ iface.serverAuthenticate(args.organizationId, args.challengeResponse,resultHandler);
+ }
+ }
+
+ public static class submitImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitImage_args, TransferInformation> {
+ public submitImage() {
+ super("submitImage");
+ }
+
+ public submitImage_args getEmptyArgsInstance() {
+ return new submitImage_args();
+ }
+
+ public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<TransferInformation>() {
+ public void onComplete(TransferInformation o) {
+ submitImage_result result = new submitImage_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ submitImage_result result = new submitImage_result();
+ if (e instanceof TAuthorizationException) {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TImageDataException) {
+ result.failure2 = (TImageDataException) e;
+ result.setFailure2IsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TTransferRejectedException) {
+ result.failure3 = (TTransferRejectedException) e;
+ result.setFailure3IsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ iface.submitImage(args.serverSessionId, args.imageDescription, args.blockHashes,resultHandler);
+ }
+ }
+
+ public static class getImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImage_args, TransferInformation> {
+ public getImage() {
+ super("getImage");
+ }
+
+ public getImage_args getEmptyArgsInstance() {
+ return new getImage_args();
+ }
+
+ public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<TransferInformation>() {
+ public void onComplete(TransferInformation o) {
+ getImage_result result = new getImage_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getImage_result result = new getImage_result();
+ if (e instanceof TAuthorizationException) {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TImageDataException) {
+ result.failure2 = (TImageDataException) e;
+ result.setFailure2IsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ iface.getImage(args.serverSessionId, args.imageVersionId,resultHandler);
+ }
+ }
+
+ public static class registerSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerSatellite_args, Boolean> {
+ public registerSatellite() {
+ super("registerSatellite");
+ }
+
+ public registerSatellite_args getEmptyArgsInstance() {
+ return new registerSatellite_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ registerSatellite_result result = new registerSatellite_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ registerSatellite_result result = new registerSatellite_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, registerSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.registerSatellite(args.organizationId, args.address, args.modulus, args.exponent,resultHandler);
+ }
+ }
+
+ public static class updateSatelliteAddress<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateSatelliteAddress_args, Boolean> {
+ public updateSatelliteAddress() {
+ super("updateSatelliteAddress");
+ }
+
+ public updateSatelliteAddress_args getEmptyArgsInstance() {
+ return new updateSatelliteAddress_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateSatelliteAddress_result result = new updateSatelliteAddress_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ updateSatelliteAddress_result result = new updateSatelliteAddress_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, updateSatelliteAddress_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateSatelliteAddress(args.serverSessionId, args.address,resultHandler);
+ }
+ }
+
+ public static class getOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOrganizations_args, List<Organization>> {
+ public getOrganizations() {
+ super("getOrganizations");
+ }
+
+ public getOrganizations_args getEmptyArgsInstance() {
+ return new getOrganizations_args();
+ }
+
+ public AsyncMethodCallback<List<Organization>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<Organization>>() {
+ public void onComplete(List<Organization> o) {
+ getOrganizations_result result = new getOrganizations_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getOrganizations_result result = new getOrganizations_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Organization>> resultHandler) throws TException {
+ iface.getOrganizations(resultHandler);
+ }
+ }
+
+ public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, List<OperatingSystem>> {
+ public getOperatingSystems() {
+ super("getOperatingSystems");
+ }
+
+ public getOperatingSystems_args getEmptyArgsInstance() {
+ return new getOperatingSystems_args();
+ }
+
+ public AsyncMethodCallback<List<OperatingSystem>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<OperatingSystem>>() {
+ public void onComplete(List<OperatingSystem> o) {
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback<List<OperatingSystem>> resultHandler) throws TException {
+ iface.getOperatingSystems(resultHandler);
+ }
+ }
+
+ public static class getVirtualizers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVirtualizers_args, List<Virtualizer>> {
+ public getVirtualizers() {
+ super("getVirtualizers");
+ }
+
+ public getVirtualizers_args getEmptyArgsInstance() {
+ return new getVirtualizers_args();
+ }
+
+ public AsyncMethodCallback<List<Virtualizer>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<Virtualizer>>() {
+ public void onComplete(List<Virtualizer> o) {
+ getVirtualizers_result result = new getVirtualizers_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getVirtualizers_result result = new getVirtualizers_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Virtualizer>> resultHandler) throws TException {
+ iface.getVirtualizers(resultHandler);
+ }
+ }
+
+ }
+
+ public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap);
+ }
+
+ public ping_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ping_args(ping_args other) {
+ }
+
+ public ping_args deepCopy() {
+ return new ping_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ping_args)
+ return this.equals((ping_args)that);
+ return false;
+ }
+
+ public boolean equals(ping_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ping_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ping_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ping_argsStandardSchemeFactory implements SchemeFactory {
+ public ping_argsStandardScheme getScheme() {
+ return new ping_argsStandardScheme();
+ }
+ }
+
+ private static class ping_argsStandardScheme extends StandardScheme<ping_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ 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, ping_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ping_argsTupleSchemeFactory implements SchemeFactory {
+ public ping_argsTupleScheme getScheme() {
+ return new ping_argsTupleScheme();
+ }
+ }
+
+ private static class ping_argsTupleScheme extends TupleScheme<ping_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap);
+ }
+
+ public ping_result() {
+ }
+
+ public ping_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ping_result(ping_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public ping_result deepCopy() {
+ return new ping_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public ping_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ping_result)
+ return this.equals((ping_result)that);
+ return false;
+ }
+
+ public boolean equals(ping_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ping_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ping_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class ping_resultStandardSchemeFactory implements SchemeFactory {
+ public ping_resultStandardScheme getScheme() {
+ return new ping_resultStandardScheme();
+ }
+ }
+
+ private static class ping_resultStandardScheme extends StandardScheme<ping_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ping_resultTupleSchemeFactory implements SchemeFactory {
+ public ping_resultTupleScheme getScheme() {
+ return new ping_resultTupleScheme();
+ }
+ }
+
+ private static class ping_resultTupleScheme extends TupleScheme<ping_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class authenticate_args implements org.apache.thrift.TBase<authenticate_args, authenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_args");
+
+ private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new authenticate_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new authenticate_argsTupleSchemeFactory());
+ }
+
+ public String login; // required
+ public String password; // 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 {
+ LOGIN((short)1, "login"),
+ PASSWORD((short)2, "password");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // LOGIN
+ return LOGIN;
+ case 2: // PASSWORD
+ return PASSWORD;
+ 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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_args.class, metaDataMap);
+ }
+
+ public authenticate_args() {
+ }
+
+ public authenticate_args(
+ String login,
+ String password)
+ {
+ this();
+ this.login = login;
+ this.password = password;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public authenticate_args(authenticate_args other) {
+ if (other.isSetLogin()) {
+ this.login = other.login;
+ }
+ if (other.isSetPassword()) {
+ this.password = other.password;
+ }
+ }
+
+ public authenticate_args deepCopy() {
+ return new authenticate_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.login = null;
+ this.password = null;
+ }
+
+ public String getLogin() {
+ return this.login;
+ }
+
+ public authenticate_args setLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ public void unsetLogin() {
+ this.login = null;
+ }
+
+ /** Returns true if field login is set (has been assigned a value) and false otherwise */
+ public boolean isSetLogin() {
+ return this.login != null;
+ }
+
+ public void setLoginIsSet(boolean value) {
+ if (!value) {
+ this.login = null;
+ }
+ }
+
+ public String getPassword() {
+ return this.password;
+ }
+
+ public authenticate_args setPassword(String password) {
+ this.password = password;
+ return this;
+ }
+
+ public void unsetPassword() {
+ this.password = null;
+ }
+
+ /** Returns true if field password is set (has been assigned a value) and false otherwise */
+ public boolean isSetPassword() {
+ return this.password != null;
+ }
+
+ public void setPasswordIsSet(boolean value) {
+ if (!value) {
+ this.password = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LOGIN:
+ if (value == null) {
+ unsetLogin();
+ } else {
+ setLogin((String)value);
+ }
+ break;
+
+ case PASSWORD:
+ if (value == null) {
+ unsetPassword();
+ } else {
+ setPassword((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LOGIN:
+ return getLogin();
+
+ case PASSWORD:
+ return getPassword();
+
+ }
+ 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 LOGIN:
+ return isSetLogin();
+ case PASSWORD:
+ return isSetPassword();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof authenticate_args)
+ return this.equals((authenticate_args)that);
+ return false;
+ }
+
+ public boolean equals(authenticate_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_login = true && this.isSetLogin();
+ boolean that_present_login = true && that.isSetLogin();
+ if (this_present_login || that_present_login) {
+ if (!(this_present_login && that_present_login))
+ return false;
+ if (!this.login.equals(that.login))
+ return false;
+ }
+
+ boolean this_present_password = true && this.isSetPassword();
+ boolean that_present_password = true && that.isSetPassword();
+ if (this_present_password || that_present_password) {
+ if (!(this_present_password && that_present_password))
+ return false;
+ if (!this.password.equals(that.password))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(authenticate_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetLogin()).compareTo(other.isSetLogin());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLogin()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.login, other.login);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPassword()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
+ 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("authenticate_args(");
+ boolean first = true;
+
+ sb.append("login:");
+ if (this.login == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.login);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("password:");
+ if (this.password == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.password);
+ }
+ 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 authenticate_argsStandardSchemeFactory implements SchemeFactory {
+ public authenticate_argsStandardScheme getScheme() {
+ return new authenticate_argsStandardScheme();
+ }
+ }
+
+ private static class authenticate_argsStandardScheme extends StandardScheme<authenticate_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_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: // LOGIN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.login = iprot.readString();
+ struct.setLoginIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PASSWORD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(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, authenticate_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.login != null) {
+ oprot.writeFieldBegin(LOGIN_FIELD_DESC);
+ oprot.writeString(struct.login);
+ oprot.writeFieldEnd();
+ }
+ if (struct.password != null) {
+ oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
+ oprot.writeString(struct.password);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class authenticate_argsTupleSchemeFactory implements SchemeFactory {
+ public authenticate_argsTupleScheme getScheme() {
+ return new authenticate_argsTupleScheme();
+ }
+ }
+
+ private static class authenticate_argsTupleScheme extends TupleScheme<authenticate_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLogin()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPassword()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetLogin()) {
+ oprot.writeString(struct.login);
+ }
+ if (struct.isSetPassword()) {
+ oprot.writeString(struct.password);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.login = iprot.readString();
+ struct.setLoginIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class authenticate_result implements org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new authenticate_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new authenticate_resultTupleSchemeFactory());
+ }
+
+ public SessionData success; // required
+ public TAuthorizationException failure; // 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"),
+ FAILURE((short)1, "failure");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionData.class)));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_result.class, metaDataMap);
+ }
+
+ public authenticate_result() {
+ }
+
+ public authenticate_result(
+ SessionData success,
+ TAuthorizationException failure)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public authenticate_result(authenticate_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new SessionData(other.success);
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthorizationException(other.failure);
+ }
+ }
+
+ public authenticate_result deepCopy() {
+ return new authenticate_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ }
+
+ public SessionData getSuccess() {
+ return this.success;
+ }
+
+ public authenticate_result setSuccess(SessionData 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 getFailure() {
+ return this.failure;
+ }
+
+ public authenticate_result setFailure(TAuthorizationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((SessionData)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof authenticate_result)
+ return this.equals((authenticate_result)that);
+ return false;
+ }
+
+ public boolean equals(authenticate_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(authenticate_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ 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("authenticate_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class authenticate_resultStandardSchemeFactory implements SchemeFactory {
+ public authenticate_resultStandardScheme getScheme() {
+ return new authenticate_resultStandardScheme();
+ }
+ }
+
+ private static class authenticate_resultStandardScheme extends StandardScheme<authenticate_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new SessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(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, authenticate_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.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class authenticate_resultTupleSchemeFactory implements SchemeFactory {
+ public authenticate_resultTupleScheme getScheme() {
+ return new authenticate_resultTupleScheme();
+ }
+ }
+
+ private static class authenticate_resultTupleScheme extends TupleScheme<authenticate_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = new SessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class localAccountLogin_args implements org.apache.thrift.TBase<localAccountLogin_args, localAccountLogin_args._Fields>, java.io.Serializable, Cloneable, Comparable<localAccountLogin_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("localAccountLogin_args");
+
+ private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new localAccountLogin_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new localAccountLogin_argsTupleSchemeFactory());
+ }
+
+ public String login; // required
+ public String password; // 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 {
+ LOGIN((short)1, "login"),
+ PASSWORD((short)2, "password");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // LOGIN
+ return LOGIN;
+ case 2: // PASSWORD
+ return PASSWORD;
+ 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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(localAccountLogin_args.class, metaDataMap);
+ }
+
+ public localAccountLogin_args() {
+ }
+
+ public localAccountLogin_args(
+ String login,
+ String password)
+ {
+ this();
+ this.login = login;
+ this.password = password;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public localAccountLogin_args(localAccountLogin_args other) {
+ if (other.isSetLogin()) {
+ this.login = other.login;
+ }
+ if (other.isSetPassword()) {
+ this.password = other.password;
+ }
+ }
+
+ public localAccountLogin_args deepCopy() {
+ return new localAccountLogin_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.login = null;
+ this.password = null;
+ }
+
+ public String getLogin() {
+ return this.login;
+ }
+
+ public localAccountLogin_args setLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ public void unsetLogin() {
+ this.login = null;
+ }
+
+ /** Returns true if field login is set (has been assigned a value) and false otherwise */
+ public boolean isSetLogin() {
+ return this.login != null;
+ }
+
+ public void setLoginIsSet(boolean value) {
+ if (!value) {
+ this.login = null;
+ }
+ }
+
+ public String getPassword() {
+ return this.password;
+ }
+
+ public localAccountLogin_args setPassword(String password) {
+ this.password = password;
+ return this;
+ }
+
+ public void unsetPassword() {
+ this.password = null;
+ }
+
+ /** Returns true if field password is set (has been assigned a value) and false otherwise */
+ public boolean isSetPassword() {
+ return this.password != null;
+ }
+
+ public void setPasswordIsSet(boolean value) {
+ if (!value) {
+ this.password = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case LOGIN:
+ if (value == null) {
+ unsetLogin();
+ } else {
+ setLogin((String)value);
+ }
+ break;
+
+ case PASSWORD:
+ if (value == null) {
+ unsetPassword();
+ } else {
+ setPassword((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case LOGIN:
+ return getLogin();
+
+ case PASSWORD:
+ return getPassword();
+
+ }
+ 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 LOGIN:
+ return isSetLogin();
+ case PASSWORD:
+ return isSetPassword();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof localAccountLogin_args)
+ return this.equals((localAccountLogin_args)that);
+ return false;
+ }
+
+ public boolean equals(localAccountLogin_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_login = true && this.isSetLogin();
+ boolean that_present_login = true && that.isSetLogin();
+ if (this_present_login || that_present_login) {
+ if (!(this_present_login && that_present_login))
+ return false;
+ if (!this.login.equals(that.login))
+ return false;
+ }
+
+ boolean this_present_password = true && this.isSetPassword();
+ boolean that_present_password = true && that.isSetPassword();
+ if (this_present_password || that_present_password) {
+ if (!(this_present_password && that_present_password))
+ return false;
+ if (!this.password.equals(that.password))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(localAccountLogin_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetLogin()).compareTo(other.isSetLogin());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLogin()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.login, other.login);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPassword()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
+ 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("localAccountLogin_args(");
+ boolean first = true;
+
+ sb.append("login:");
+ if (this.login == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.login);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("password:");
+ if (this.password == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.password);
+ }
+ 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 localAccountLogin_argsStandardSchemeFactory implements SchemeFactory {
+ public localAccountLogin_argsStandardScheme getScheme() {
+ return new localAccountLogin_argsStandardScheme();
+ }
+ }
+
+ private static class localAccountLogin_argsStandardScheme extends StandardScheme<localAccountLogin_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_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: // LOGIN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.login = iprot.readString();
+ struct.setLoginIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PASSWORD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(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, localAccountLogin_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.login != null) {
+ oprot.writeFieldBegin(LOGIN_FIELD_DESC);
+ oprot.writeString(struct.login);
+ oprot.writeFieldEnd();
+ }
+ if (struct.password != null) {
+ oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
+ oprot.writeString(struct.password);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class localAccountLogin_argsTupleSchemeFactory implements SchemeFactory {
+ public localAccountLogin_argsTupleScheme getScheme() {
+ return new localAccountLogin_argsTupleScheme();
+ }
+ }
+
+ private static class localAccountLogin_argsTupleScheme extends TupleScheme<localAccountLogin_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetLogin()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPassword()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetLogin()) {
+ oprot.writeString(struct.login);
+ }
+ if (struct.isSetPassword()) {
+ oprot.writeString(struct.password);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.login = iprot.readString();
+ struct.setLoginIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class localAccountLogin_result implements org.apache.thrift.TBase<localAccountLogin_result, localAccountLogin_result._Fields>, java.io.Serializable, Cloneable, Comparable<localAccountLogin_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("localAccountLogin_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new localAccountLogin_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new localAccountLogin_resultTupleSchemeFactory());
+ }
+
+ public ClientSessionData success; // required
+ public TAuthorizationException failure; // 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"),
+ FAILURE((short)1, "failure");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientSessionData.class)));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(localAccountLogin_result.class, metaDataMap);
+ }
+
+ public localAccountLogin_result() {
+ }
+
+ public localAccountLogin_result(
+ ClientSessionData success,
+ TAuthorizationException failure)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public localAccountLogin_result(localAccountLogin_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new ClientSessionData(other.success);
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthorizationException(other.failure);
+ }
+ }
+
+ public localAccountLogin_result deepCopy() {
+ return new localAccountLogin_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ }
+
+ public ClientSessionData getSuccess() {
+ return this.success;
+ }
+
+ public localAccountLogin_result setSuccess(ClientSessionData 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 getFailure() {
+ return this.failure;
+ }
+
+ public localAccountLogin_result setFailure(TAuthorizationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ClientSessionData)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof localAccountLogin_result)
+ return this.equals((localAccountLogin_result)that);
+ return false;
+ }
+
+ public boolean equals(localAccountLogin_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(localAccountLogin_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ 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("localAccountLogin_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class localAccountLogin_resultStandardSchemeFactory implements SchemeFactory {
+ public localAccountLogin_resultStandardScheme getScheme() {
+ return new localAccountLogin_resultStandardScheme();
+ }
+ }
+
+ private static class localAccountLogin_resultStandardScheme extends StandardScheme<localAccountLogin_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new ClientSessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(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, localAccountLogin_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.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class localAccountLogin_resultTupleSchemeFactory implements SchemeFactory {
+ public localAccountLogin_resultTupleScheme getScheme() {
+ return new localAccountLogin_resultTupleScheme();
+ }
+ }
+
+ private static class localAccountLogin_resultTupleScheme extends TupleScheme<localAccountLogin_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = new ClientSessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class findUser_args implements org.apache.thrift.TBase<findUser_args, findUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_args");
+
+ private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField SEARCH_TERM_FIELD_DESC = new org.apache.thrift.protocol.TField("searchTerm", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new findUser_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new findUser_argsTupleSchemeFactory());
+ }
+
+ public String sessionId; // required
+ public String organizationId; // required
+ public String searchTerm; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SESSION_ID((short)1, "sessionId"),
+ ORGANIZATION_ID((short)2, "organizationId"),
+ SEARCH_TERM((short)3, "searchTerm");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SESSION_ID
+ return SESSION_ID;
+ case 2: // ORGANIZATION_ID
+ return ORGANIZATION_ID;
+ case 3: // SEARCH_TERM
+ return SEARCH_TERM;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SEARCH_TERM, new org.apache.thrift.meta_data.FieldMetaData("searchTerm", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUser_args.class, metaDataMap);
+ }
+
+ public findUser_args() {
+ }
+
+ public findUser_args(
+ String sessionId,
+ String organizationId,
+ String searchTerm)
+ {
+ this();
+ this.sessionId = sessionId;
+ this.organizationId = organizationId;
+ this.searchTerm = searchTerm;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public findUser_args(findUser_args other) {
+ if (other.isSetSessionId()) {
+ this.sessionId = other.sessionId;
+ }
+ if (other.isSetOrganizationId()) {
+ this.organizationId = other.organizationId;
+ }
+ if (other.isSetSearchTerm()) {
+ this.searchTerm = other.searchTerm;
+ }
+ }
+
+ public findUser_args deepCopy() {
+ return new findUser_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.sessionId = null;
+ this.organizationId = null;
+ this.searchTerm = null;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public findUser_args setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ public void unsetSessionId() {
+ this.sessionId = null;
+ }
+
+ /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetSessionId() {
+ return this.sessionId != null;
+ }
+
+ public void setSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.sessionId = null;
+ }
+ }
+
+ public String getOrganizationId() {
+ return this.organizationId;
+ }
+
+ public findUser_args setOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ public void unsetOrganizationId() {
+ this.organizationId = null;
+ }
+
+ /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOrganizationId() {
+ return this.organizationId != null;
+ }
+
+ public void setOrganizationIdIsSet(boolean value) {
+ if (!value) {
+ this.organizationId = null;
+ }
+ }
+
+ public String getSearchTerm() {
+ return this.searchTerm;
+ }
+
+ public findUser_args setSearchTerm(String searchTerm) {
+ this.searchTerm = searchTerm;
+ return this;
+ }
+
+ public void unsetSearchTerm() {
+ this.searchTerm = null;
+ }
+
+ /** Returns true if field searchTerm is set (has been assigned a value) and false otherwise */
+ public boolean isSetSearchTerm() {
+ return this.searchTerm != null;
+ }
+
+ public void setSearchTermIsSet(boolean value) {
+ if (!value) {
+ this.searchTerm = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SESSION_ID:
+ if (value == null) {
+ unsetSessionId();
+ } else {
+ setSessionId((String)value);
+ }
+ break;
+
+ case ORGANIZATION_ID:
+ if (value == null) {
+ unsetOrganizationId();
+ } else {
+ setOrganizationId((String)value);
+ }
+ break;
+
+ case SEARCH_TERM:
+ if (value == null) {
+ unsetSearchTerm();
+ } else {
+ setSearchTerm((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SESSION_ID:
+ return getSessionId();
+
+ case ORGANIZATION_ID:
+ return getOrganizationId();
+
+ case SEARCH_TERM:
+ return getSearchTerm();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SESSION_ID:
+ return isSetSessionId();
+ case ORGANIZATION_ID:
+ return isSetOrganizationId();
+ case SEARCH_TERM:
+ return isSetSearchTerm();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof findUser_args)
+ return this.equals((findUser_args)that);
+ return false;
+ }
+
+ public boolean equals(findUser_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_sessionId = true && this.isSetSessionId();
+ boolean that_present_sessionId = true && that.isSetSessionId();
+ if (this_present_sessionId || that_present_sessionId) {
+ if (!(this_present_sessionId && that_present_sessionId))
+ return false;
+ if (!this.sessionId.equals(that.sessionId))
+ return false;
+ }
+
+ boolean this_present_organizationId = true && this.isSetOrganizationId();
+ boolean that_present_organizationId = true && that.isSetOrganizationId();
+ if (this_present_organizationId || that_present_organizationId) {
+ if (!(this_present_organizationId && that_present_organizationId))
+ return false;
+ if (!this.organizationId.equals(that.organizationId))
+ return false;
+ }
+
+ boolean this_present_searchTerm = true && this.isSetSearchTerm();
+ boolean that_present_searchTerm = true && that.isSetSearchTerm();
+ if (this_present_searchTerm || that_present_searchTerm) {
+ if (!(this_present_searchTerm && that_present_searchTerm))
+ return false;
+ if (!this.searchTerm.equals(that.searchTerm))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(findUser_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOrganizationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSearchTerm()).compareTo(other.isSetSearchTerm());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSearchTerm()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchTerm, other.searchTerm);
+ 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("findUser_args(");
+ boolean first = true;
+
+ sb.append("sessionId:");
+ if (this.sessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("organizationId:");
+ if (this.organizationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.organizationId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("searchTerm:");
+ if (this.searchTerm == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.searchTerm);
+ }
+ 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 findUser_argsStandardSchemeFactory implements SchemeFactory {
+ public findUser_argsStandardScheme getScheme() {
+ return new findUser_argsStandardScheme();
+ }
+ }
+
+ private static class findUser_argsStandardScheme extends StandardScheme<findUser_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ORGANIZATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SEARCH_TERM
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.searchTerm = iprot.readString();
+ struct.setSearchTermIsSet(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, findUser_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sessionId != null) {
+ oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.sessionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.organizationId != null) {
+ oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
+ oprot.writeString(struct.organizationId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.searchTerm != null) {
+ oprot.writeFieldBegin(SEARCH_TERM_FIELD_DESC);
+ oprot.writeString(struct.searchTerm);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class findUser_argsTupleSchemeFactory implements SchemeFactory {
+ public findUser_argsTupleScheme getScheme() {
+ return new findUser_argsTupleScheme();
+ }
+ }
+
+ private static class findUser_argsTupleScheme extends TupleScheme<findUser_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetOrganizationId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetSearchTerm()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSessionId()) {
+ oprot.writeString(struct.sessionId);
+ }
+ if (struct.isSetOrganizationId()) {
+ oprot.writeString(struct.organizationId);
+ }
+ if (struct.isSetSearchTerm()) {
+ oprot.writeString(struct.searchTerm);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.searchTerm = iprot.readString();
+ struct.setSearchTermIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class findUser_result implements org.apache.thrift.TBase<findUser_result, findUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new findUser_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new findUser_resultTupleSchemeFactory());
+ }
+
+ public List<UserInfo> success; // required
+ public TAuthorizationException failure; // 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"),
+ FAILURE((short)1, "failure");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ 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, UserInfo.class))));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUser_result.class, metaDataMap);
+ }
+
+ public findUser_result() {
+ }
+
+ public findUser_result(
+ List<UserInfo> success,
+ TAuthorizationException failure)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public findUser_result(findUser_result other) {
+ if (other.isSetSuccess()) {
+ List<UserInfo> __this__success = new ArrayList<UserInfo>(other.success.size());
+ for (UserInfo other_element : other.success) {
+ __this__success.add(new UserInfo(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthorizationException(other.failure);
+ }
+ }
+
+ public findUser_result deepCopy() {
+ return new findUser_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<UserInfo> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(UserInfo elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<UserInfo>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<UserInfo> getSuccess() {
+ return this.success;
+ }
+
+ public findUser_result setSuccess(List<UserInfo> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public TAuthorizationException getFailure() {
+ return this.failure;
+ }
+
+ public findUser_result setFailure(TAuthorizationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<UserInfo>)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof findUser_result)
+ return this.equals((findUser_result)that);
+ return false;
+ }
+
+ public boolean equals(findUser_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(findUser_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ 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("findUser_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ 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 findUser_resultStandardSchemeFactory implements SchemeFactory {
+ public findUser_resultStandardScheme getScheme() {
+ return new findUser_resultStandardScheme();
+ }
+ }
+
+ private static class findUser_resultStandardScheme extends StandardScheme<findUser_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_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 _list162 = iprot.readListBegin();
+ struct.success = new ArrayList<UserInfo>(_list162.size);
+ for (int _i163 = 0; _i163 < _list162.size; ++_i163)
+ {
+ UserInfo _elem164;
+ _elem164 = new UserInfo();
+ _elem164.read(iprot);
+ struct.success.add(_elem164);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(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, findUser_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 (UserInfo _iter165 : struct.success)
+ {
+ _iter165.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class findUser_resultTupleSchemeFactory implements SchemeFactory {
+ public findUser_resultTupleScheme getScheme() {
+ return new findUser_resultTupleScheme();
+ }
+ }
+
+ private static class findUser_resultTupleScheme extends TupleScheme<findUser_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, findUser_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (UserInfo _iter166 : struct.success)
+ {
+ _iter166.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, findUser_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list167 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<UserInfo>(_list167.size);
+ for (int _i168 = 0; _i168 < _list167.size; ++_i168)
+ {
+ UserInfo _elem169;
+ _elem169 = new UserInfo();
+ _elem169.read(iprot);
+ struct.success.add(_elem169);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getPublicImages_args implements org.apache.thrift.TBase<getPublicImages_args, getPublicImages_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_args");
+
+ private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getPublicImages_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getPublicImages_argsTupleSchemeFactory());
+ }
+
+ public String sessionId; // required
+ public int page; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SESSION_ID((short)1, "sessionId"),
+ PAGE((short)2, "page");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SESSION_ID
+ return SESSION_ID;
+ case 2: // PAGE
+ return PAGE;
+ 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 __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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.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(getPublicImages_args.class, metaDataMap);
+ }
+
+ public getPublicImages_args() {
+ }
+
+ public getPublicImages_args(
+ String sessionId,
+ int page)
+ {
+ this();
+ this.sessionId = sessionId;
+ this.page = page;
+ setPageIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getPublicImages_args(getPublicImages_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetSessionId()) {
+ this.sessionId = other.sessionId;
+ }
+ this.page = other.page;
+ }
+
+ public getPublicImages_args deepCopy() {
+ return new getPublicImages_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.sessionId = null;
+ setPageIsSet(false);
+ this.page = 0;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public getPublicImages_args setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ public void unsetSessionId() {
+ this.sessionId = null;
+ }
+
+ /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetSessionId() {
+ return this.sessionId != null;
+ }
+
+ public void setSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.sessionId = null;
+ }
+ }
+
+ public int getPage() {
+ return this.page;
+ }
+
+ public getPublicImages_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 SESSION_ID:
+ if (value == null) {
+ unsetSessionId();
+ } else {
+ setSessionId((String)value);
+ }
+ break;
+
+ case PAGE:
+ if (value == null) {
+ unsetPage();
+ } else {
+ setPage((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SESSION_ID:
+ return getSessionId();
+
+ case PAGE:
+ return Integer.valueOf(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 SESSION_ID:
+ return isSetSessionId();
+ case PAGE:
+ return isSetPage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getPublicImages_args)
+ return this.equals((getPublicImages_args)that);
+ return false;
+ }
+
+ public boolean equals(getPublicImages_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_sessionId = true && this.isSetSessionId();
+ boolean that_present_sessionId = true && that.isSetSessionId();
+ if (this_present_sessionId || that_present_sessionId) {
+ if (!(this_present_sessionId && that_present_sessionId))
+ return false;
+ if (!this.sessionId.equals(that.sessionId))
+ return false;
+ }
+
+ boolean this_present_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() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getPublicImages_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(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("getPublicImages_args(");
+ boolean first = true;
+
+ sb.append("sessionId:");
+ if (this.sessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("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 getPublicImages_argsStandardSchemeFactory implements SchemeFactory {
+ public getPublicImages_argsStandardScheme getScheme() {
+ return new getPublicImages_argsStandardScheme();
+ }
+ }
+
+ private static class getPublicImages_argsStandardScheme extends StandardScheme<getPublicImages_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // 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, getPublicImages_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sessionId != null) {
+ oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.sessionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(PAGE_FIELD_DESC);
+ oprot.writeI32(struct.page);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getPublicImages_argsTupleSchemeFactory implements SchemeFactory {
+ public getPublicImages_argsTupleScheme getScheme() {
+ return new getPublicImages_argsTupleScheme();
+ }
+ }
+
+ private static class getPublicImages_argsTupleScheme extends TupleScheme<getPublicImages_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPage()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSessionId()) {
+ oprot.writeString(struct.sessionId);
+ }
+ if (struct.isSetPage()) {
+ oprot.writeI32(struct.page);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.page = iprot.readI32();
+ struct.setPageIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getPublicImages_result implements org.apache.thrift.TBase<getPublicImages_result, getPublicImages_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getPublicImages_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getPublicImages_resultTupleSchemeFactory());
+ }
+
+ public List<ImagePublishData> success; // required
+ public TAuthorizationException failure; // 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"),
+ FAILURE((short)1, "failure");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ 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, ImagePublishData.class))));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPublicImages_result.class, metaDataMap);
+ }
+
+ public getPublicImages_result() {
+ }
+
+ public getPublicImages_result(
+ List<ImagePublishData> success,
+ TAuthorizationException failure)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getPublicImages_result(getPublicImages_result other) {
+ if (other.isSetSuccess()) {
+ List<ImagePublishData> __this__success = new ArrayList<ImagePublishData>(other.success.size());
+ for (ImagePublishData other_element : other.success) {
+ __this__success.add(new ImagePublishData(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthorizationException(other.failure);
+ }
+ }
+
+ public getPublicImages_result deepCopy() {
+ return new getPublicImages_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<ImagePublishData> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(ImagePublishData elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<ImagePublishData>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<ImagePublishData> getSuccess() {
+ return this.success;
+ }
+
+ public getPublicImages_result setSuccess(List<ImagePublishData> 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 getFailure() {
+ return this.failure;
+ }
+
+ public getPublicImages_result setFailure(TAuthorizationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<ImagePublishData>)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getPublicImages_result)
+ return this.equals((getPublicImages_result)that);
+ return false;
+ }
+
+ public boolean equals(getPublicImages_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getPublicImages_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ 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("getPublicImages_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ 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 getPublicImages_resultStandardSchemeFactory implements SchemeFactory {
+ public getPublicImages_resultStandardScheme getScheme() {
+ return new getPublicImages_resultStandardScheme();
+ }
+ }
+
+ private static class getPublicImages_resultStandardScheme extends StandardScheme<getPublicImages_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_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 _list170 = iprot.readListBegin();
+ struct.success = new ArrayList<ImagePublishData>(_list170.size);
+ for (int _i171 = 0; _i171 < _list170.size; ++_i171)
+ {
+ ImagePublishData _elem172;
+ _elem172 = new ImagePublishData();
+ _elem172.read(iprot);
+ struct.success.add(_elem172);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(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, getPublicImages_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 (ImagePublishData _iter173 : struct.success)
+ {
+ _iter173.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getPublicImages_resultTupleSchemeFactory implements SchemeFactory {
+ public getPublicImages_resultTupleScheme getScheme() {
+ return new getPublicImages_resultTupleScheme();
+ }
+ }
+
+ private static class getPublicImages_resultTupleScheme extends TupleScheme<getPublicImages_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (ImagePublishData _iter174 : struct.success)
+ {
+ _iter174.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list175 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<ImagePublishData>(_list175.size);
+ for (int _i176 = 0; _i176 < _list175.size; ++_i176)
+ {
+ ImagePublishData _elem177;
+ _elem177 = new ImagePublishData();
+ _elem177.read(iprot);
+ struct.success.add(_elem177);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getUserFromToken_args implements org.apache.thrift.TBase<getUserFromToken_args, getUserFromToken_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_args");
+
+ private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getUserFromToken_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getUserFromToken_argsTupleSchemeFactory());
+ }
+
+ public String token; // 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 {
+ TOKEN((short)1, "token");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TOKEN
+ return TOKEN;
+ 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_args.class, metaDataMap);
+ }
+
+ public getUserFromToken_args() {
+ }
+
+ public getUserFromToken_args(
+ String token)
+ {
+ this();
+ this.token = token;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getUserFromToken_args(getUserFromToken_args other) {
+ if (other.isSetToken()) {
+ this.token = other.token;
+ }
+ }
+
+ public getUserFromToken_args deepCopy() {
+ return new getUserFromToken_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.token = null;
+ }
+
+ public String getToken() {
+ return this.token;
+ }
+
+ public getUserFromToken_args setToken(String token) {
+ this.token = token;
+ return this;
+ }
+
+ public void unsetToken() {
+ this.token = null;
+ }
+
+ /** Returns true if field token is set (has been assigned a value) and false otherwise */
+ public boolean isSetToken() {
+ return this.token != null;
+ }
+
+ public void setTokenIsSet(boolean value) {
+ if (!value) {
+ this.token = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TOKEN:
+ if (value == null) {
+ unsetToken();
+ } else {
+ setToken((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TOKEN:
+ return getToken();
+
+ }
+ 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 TOKEN:
+ return isSetToken();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getUserFromToken_args)
+ return this.equals((getUserFromToken_args)that);
+ return false;
+ }
+
+ public boolean equals(getUserFromToken_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_token = true && this.isSetToken();
+ boolean that_present_token = true && that.isSetToken();
+ if (this_present_token || that_present_token) {
+ if (!(this_present_token && that_present_token))
+ return false;
+ if (!this.token.equals(that.token))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getUserFromToken_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
+ 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("getUserFromToken_args(");
+ boolean first = true;
+
+ sb.append("token:");
+ if (this.token == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.token);
+ }
+ 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 getUserFromToken_argsStandardSchemeFactory implements SchemeFactory {
+ public getUserFromToken_argsStandardScheme getScheme() {
+ return new getUserFromToken_argsStandardScheme();
+ }
+ }
+
+ private static class getUserFromToken_argsStandardScheme extends StandardScheme<getUserFromToken_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_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: // TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.token = iprot.readString();
+ struct.setTokenIsSet(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, getUserFromToken_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.token != null) {
+ oprot.writeFieldBegin(TOKEN_FIELD_DESC);
+ oprot.writeString(struct.token);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getUserFromToken_argsTupleSchemeFactory implements SchemeFactory {
+ public getUserFromToken_argsTupleScheme getScheme() {
+ return new getUserFromToken_argsTupleScheme();
+ }
+ }
+
+ private static class getUserFromToken_argsTupleScheme extends TupleScheme<getUserFromToken_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetToken()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetToken()) {
+ oprot.writeString(struct.token);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.token = iprot.readString();
+ struct.setTokenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getUserFromToken_result implements org.apache.thrift.TBase<getUserFromToken_result, getUserFromToken_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getUserFromToken_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getUserFromToken_resultTupleSchemeFactory());
+ }
+
+ public UserInfo success; // required
+ public TInvalidTokenException failure; // 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"),
+ FAILURE((short)1, "failure");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_result.class, metaDataMap);
+ }
+
+ public getUserFromToken_result() {
+ }
+
+ public getUserFromToken_result(
+ UserInfo success,
+ TInvalidTokenException failure)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getUserFromToken_result(getUserFromToken_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new UserInfo(other.success);
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TInvalidTokenException(other.failure);
+ }
+ }
+
+ public getUserFromToken_result deepCopy() {
+ return new getUserFromToken_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ }
+
+ public UserInfo getSuccess() {
+ return this.success;
+ }
+
+ public getUserFromToken_result setSuccess(UserInfo success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public TInvalidTokenException getFailure() {
+ return this.failure;
+ }
+
+ public getUserFromToken_result setFailure(TInvalidTokenException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((UserInfo)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TInvalidTokenException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getUserFromToken_result)
+ return this.equals((getUserFromToken_result)that);
+ return false;
+ }
+
+ public boolean equals(getUserFromToken_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getUserFromToken_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ 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("getUserFromToken_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getUserFromToken_resultStandardSchemeFactory implements SchemeFactory {
+ public getUserFromToken_resultStandardScheme getScheme() {
+ return new getUserFromToken_resultStandardScheme();
+ }
+ }
+
+ private static class getUserFromToken_resultStandardScheme extends StandardScheme<getUserFromToken_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new UserInfo();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TInvalidTokenException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(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, getUserFromToken_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.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getUserFromToken_resultTupleSchemeFactory implements SchemeFactory {
+ public getUserFromToken_resultTupleScheme getScheme() {
+ return new getUserFromToken_resultTupleScheme();
+ }
+ }
+
+ private static class getUserFromToken_resultTupleScheme extends TupleScheme<getUserFromToken_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = new UserInfo();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TInvalidTokenException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class isServerAuthenticated_args implements org.apache.thrift.TBase<isServerAuthenticated_args, isServerAuthenticated_args._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_args");
+
+ private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new isServerAuthenticated_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new isServerAuthenticated_argsTupleSchemeFactory());
+ }
+
+ public String serverSessionId; // 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 {
+ SERVER_SESSION_ID((short)1, "serverSessionId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SERVER_SESSION_ID
+ return SERVER_SESSION_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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_args.class, metaDataMap);
+ }
+
+ public isServerAuthenticated_args() {
+ }
+
+ public isServerAuthenticated_args(
+ String serverSessionId)
+ {
+ this();
+ this.serverSessionId = serverSessionId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public isServerAuthenticated_args(isServerAuthenticated_args other) {
+ if (other.isSetServerSessionId()) {
+ this.serverSessionId = other.serverSessionId;
+ }
+ }
+
+ public isServerAuthenticated_args deepCopy() {
+ return new isServerAuthenticated_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.serverSessionId = null;
+ }
+
+ public String getServerSessionId() {
+ return this.serverSessionId;
+ }
+
+ public isServerAuthenticated_args setServerSessionId(String serverSessionId) {
+ this.serverSessionId = serverSessionId;
+ return this;
+ }
+
+ public void unsetServerSessionId() {
+ this.serverSessionId = null;
+ }
+
+ /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerSessionId() {
+ return this.serverSessionId != null;
+ }
+
+ public void setServerSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.serverSessionId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ if (value == null) {
+ unsetServerSessionId();
+ } else {
+ setServerSessionId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ return getServerSessionId();
+
+ }
+ 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 SERVER_SESSION_ID:
+ return isSetServerSessionId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof isServerAuthenticated_args)
+ return this.equals((isServerAuthenticated_args)that);
+ return false;
+ }
+
+ public boolean equals(isServerAuthenticated_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_serverSessionId = true && this.isSetServerSessionId();
+ boolean that_present_serverSessionId = true && that.isSetServerSessionId();
+ if (this_present_serverSessionId || that_present_serverSessionId) {
+ if (!(this_present_serverSessionId && that_present_serverSessionId))
+ return false;
+ if (!this.serverSessionId.equals(that.serverSessionId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(isServerAuthenticated_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
+ 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("isServerAuthenticated_args(");
+ boolean first = true;
+
+ sb.append("serverSessionId:");
+ if (this.serverSessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverSessionId);
+ }
+ 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 isServerAuthenticated_argsStandardSchemeFactory implements SchemeFactory {
+ public isServerAuthenticated_argsStandardScheme getScheme() {
+ return new isServerAuthenticated_argsStandardScheme();
+ }
+ }
+
+ private static class isServerAuthenticated_argsStandardScheme extends StandardScheme<isServerAuthenticated_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_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: // SERVER_SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(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, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.serverSessionId != null) {
+ oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.serverSessionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class isServerAuthenticated_argsTupleSchemeFactory implements SchemeFactory {
+ public isServerAuthenticated_argsTupleScheme getScheme() {
+ return new isServerAuthenticated_argsTupleScheme();
+ }
+ }
+
+ private static class isServerAuthenticated_argsTupleScheme extends TupleScheme<isServerAuthenticated_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetServerSessionId()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetServerSessionId()) {
+ oprot.writeString(struct.serverSessionId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class isServerAuthenticated_result implements org.apache.thrift.TBase<isServerAuthenticated_result, isServerAuthenticated_result._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new isServerAuthenticated_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new isServerAuthenticated_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_result.class, metaDataMap);
+ }
+
+ public isServerAuthenticated_result() {
+ }
+
+ public isServerAuthenticated_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public isServerAuthenticated_result(isServerAuthenticated_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public isServerAuthenticated_result deepCopy() {
+ return new isServerAuthenticated_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public isServerAuthenticated_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof isServerAuthenticated_result)
+ return this.equals((isServerAuthenticated_result)that);
+ return false;
+ }
+
+ public boolean equals(isServerAuthenticated_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(isServerAuthenticated_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("isServerAuthenticated_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class isServerAuthenticated_resultStandardSchemeFactory implements SchemeFactory {
+ public isServerAuthenticated_resultStandardScheme getScheme() {
+ return new isServerAuthenticated_resultStandardScheme();
+ }
+ }
+
+ private static class isServerAuthenticated_resultStandardScheme extends StandardScheme<isServerAuthenticated_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class isServerAuthenticated_resultTupleSchemeFactory implements SchemeFactory {
+ public isServerAuthenticated_resultTupleScheme getScheme() {
+ return new isServerAuthenticated_resultTupleScheme();
+ }
+ }
+
+ private static class isServerAuthenticated_resultTupleScheme extends TupleScheme<isServerAuthenticated_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class startServerAuthentication_args implements org.apache.thrift.TBase<startServerAuthentication_args, startServerAuthentication_args._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_args");
+
+ private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new startServerAuthentication_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startServerAuthentication_argsTupleSchemeFactory());
+ }
+
+ public String organizationId; // 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 {
+ ORGANIZATION_ID((short)1, "organizationId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ORGANIZATION_ID
+ return ORGANIZATION_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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startServerAuthentication_args.class, metaDataMap);
+ }
+
+ public startServerAuthentication_args() {
+ }
+
+ public startServerAuthentication_args(
+ String organizationId)
+ {
+ this();
+ this.organizationId = organizationId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startServerAuthentication_args(startServerAuthentication_args other) {
+ if (other.isSetOrganizationId()) {
+ this.organizationId = other.organizationId;
+ }
+ }
+
+ public startServerAuthentication_args deepCopy() {
+ return new startServerAuthentication_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.organizationId = null;
+ }
+
+ public String getOrganizationId() {
+ return this.organizationId;
+ }
+
+ public startServerAuthentication_args setOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ public void unsetOrganizationId() {
+ this.organizationId = null;
+ }
+
+ /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOrganizationId() {
+ return this.organizationId != null;
+ }
+
+ public void setOrganizationIdIsSet(boolean value) {
+ if (!value) {
+ this.organizationId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ if (value == null) {
+ unsetOrganizationId();
+ } else {
+ setOrganizationId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ return getOrganizationId();
+
+ }
+ 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 ORGANIZATION_ID:
+ return isSetOrganizationId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof startServerAuthentication_args)
+ return this.equals((startServerAuthentication_args)that);
+ return false;
+ }
+
+ public boolean equals(startServerAuthentication_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_organizationId = true && this.isSetOrganizationId();
+ boolean that_present_organizationId = true && that.isSetOrganizationId();
+ if (this_present_organizationId || that_present_organizationId) {
+ if (!(this_present_organizationId && that_present_organizationId))
+ return false;
+ if (!this.organizationId.equals(that.organizationId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(startServerAuthentication_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOrganizationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
+ 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("startServerAuthentication_args(");
+ boolean first = true;
+
+ sb.append("organizationId:");
+ if (this.organizationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.organizationId);
+ }
+ 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 startServerAuthentication_argsStandardSchemeFactory implements SchemeFactory {
+ public startServerAuthentication_argsStandardScheme getScheme() {
+ return new startServerAuthentication_argsStandardScheme();
+ }
+ }
+
+ private static class startServerAuthentication_argsStandardScheme extends StandardScheme<startServerAuthentication_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_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: // ORGANIZATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(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, startServerAuthentication_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.organizationId != null) {
+ oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
+ oprot.writeString(struct.organizationId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class startServerAuthentication_argsTupleSchemeFactory implements SchemeFactory {
+ public startServerAuthentication_argsTupleScheme getScheme() {
+ return new startServerAuthentication_argsTupleScheme();
+ }
+ }
+
+ private static class startServerAuthentication_argsTupleScheme extends TupleScheme<startServerAuthentication_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOrganizationId()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetOrganizationId()) {
+ oprot.writeString(struct.organizationId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class startServerAuthentication_result implements org.apache.thrift.TBase<startServerAuthentication_result, startServerAuthentication_result._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new startServerAuthentication_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new startServerAuthentication_resultTupleSchemeFactory());
+ }
+
+ public ByteBuffer success; // required
+ public TAuthenticationException failure; // 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"),
+ FAILURE((short)1, "failure");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startServerAuthentication_result.class, metaDataMap);
+ }
+
+ public startServerAuthentication_result() {
+ }
+
+ public startServerAuthentication_result(
+ ByteBuffer success,
+ TAuthenticationException failure)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public startServerAuthentication_result(startServerAuthentication_result other) {
+ if (other.isSetSuccess()) {
+ this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
+;
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthenticationException(other.failure);
+ }
+ }
+
+ public startServerAuthentication_result deepCopy() {
+ return new startServerAuthentication_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ }
+
+ public byte[] getSuccess() {
+ setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
+ return success == null ? null : success.array();
+ }
+
+ public ByteBuffer bufferForSuccess() {
+ return success;
+ }
+
+ public startServerAuthentication_result setSuccess(byte[] success) {
+ setSuccess(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success));
+ return this;
+ }
+
+ public startServerAuthentication_result setSuccess(ByteBuffer 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 TAuthenticationException getFailure() {
+ return this.failure;
+ }
+
+ public startServerAuthentication_result setFailure(TAuthenticationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ByteBuffer)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthenticationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof startServerAuthentication_result)
+ return this.equals((startServerAuthentication_result)that);
+ return false;
+ }
+
+ public boolean equals(startServerAuthentication_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(startServerAuthentication_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ 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("startServerAuthentication_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.success, sb);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ 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 startServerAuthentication_resultStandardSchemeFactory implements SchemeFactory {
+ public startServerAuthentication_resultStandardScheme getScheme() {
+ return new startServerAuthentication_resultStandardScheme();
+ }
+ }
+
+ private static class startServerAuthentication_resultStandardScheme extends StandardScheme<startServerAuthentication_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readBinary();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthenticationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(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, startServerAuthentication_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBinary(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class startServerAuthentication_resultTupleSchemeFactory implements SchemeFactory {
+ public startServerAuthentication_resultTupleScheme getScheme() {
+ return new startServerAuthentication_resultTupleScheme();
+ }
+ }
+
+ private static class startServerAuthentication_resultTupleScheme extends TupleScheme<startServerAuthentication_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeBinary(struct.success);
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBinary();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthenticationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class serverAuthenticate_args implements org.apache.thrift.TBase<serverAuthenticate_args, serverAuthenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_args");
+
+ private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField CHALLENGE_RESPONSE_FIELD_DESC = new org.apache.thrift.protocol.TField("challengeResponse", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new serverAuthenticate_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new serverAuthenticate_argsTupleSchemeFactory());
+ }
+
+ public String organizationId; // required
+ public ByteBuffer challengeResponse; // 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 {
+ ORGANIZATION_ID((short)1, "organizationId"),
+ CHALLENGE_RESPONSE((short)2, "challengeResponse");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ORGANIZATION_ID
+ return ORGANIZATION_ID;
+ case 2: // CHALLENGE_RESPONSE
+ return CHALLENGE_RESPONSE;
+ 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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CHALLENGE_RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("challengeResponse", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(serverAuthenticate_args.class, metaDataMap);
+ }
+
+ public serverAuthenticate_args() {
+ }
+
+ public serverAuthenticate_args(
+ String organizationId,
+ ByteBuffer challengeResponse)
+ {
+ this();
+ this.organizationId = organizationId;
+ this.challengeResponse = challengeResponse;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public serverAuthenticate_args(serverAuthenticate_args other) {
+ if (other.isSetOrganizationId()) {
+ this.organizationId = other.organizationId;
+ }
+ if (other.isSetChallengeResponse()) {
+ this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(other.challengeResponse);
+;
+ }
+ }
+
+ public serverAuthenticate_args deepCopy() {
+ return new serverAuthenticate_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.organizationId = null;
+ this.challengeResponse = null;
+ }
+
+ public String getOrganizationId() {
+ return this.organizationId;
+ }
+
+ public serverAuthenticate_args setOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ public void unsetOrganizationId() {
+ this.organizationId = null;
+ }
+
+ /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOrganizationId() {
+ return this.organizationId != null;
+ }
+
+ public void setOrganizationIdIsSet(boolean value) {
+ if (!value) {
+ this.organizationId = null;
+ }
+ }
+
+ public byte[] getChallengeResponse() {
+ setChallengeResponse(org.apache.thrift.TBaseHelper.rightSize(challengeResponse));
+ return challengeResponse == null ? null : challengeResponse.array();
+ }
+
+ public ByteBuffer bufferForChallengeResponse() {
+ return challengeResponse;
+ }
+
+ public serverAuthenticate_args setChallengeResponse(byte[] challengeResponse) {
+ setChallengeResponse(challengeResponse == null ? (ByteBuffer)null : ByteBuffer.wrap(challengeResponse));
+ return this;
+ }
+
+ public serverAuthenticate_args setChallengeResponse(ByteBuffer challengeResponse) {
+ this.challengeResponse = challengeResponse;
+ return this;
+ }
+
+ public void unsetChallengeResponse() {
+ this.challengeResponse = null;
+ }
+
+ /** Returns true if field challengeResponse is set (has been assigned a value) and false otherwise */
+ public boolean isSetChallengeResponse() {
+ return this.challengeResponse != null;
+ }
+
+ public void setChallengeResponseIsSet(boolean value) {
+ if (!value) {
+ this.challengeResponse = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ if (value == null) {
+ unsetOrganizationId();
+ } else {
+ setOrganizationId((String)value);
+ }
+ break;
+
+ case CHALLENGE_RESPONSE:
+ if (value == null) {
+ unsetChallengeResponse();
+ } else {
+ setChallengeResponse((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ return getOrganizationId();
+
+ case CHALLENGE_RESPONSE:
+ return getChallengeResponse();
+
+ }
+ 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 ORGANIZATION_ID:
+ return isSetOrganizationId();
+ case CHALLENGE_RESPONSE:
+ return isSetChallengeResponse();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof serverAuthenticate_args)
+ return this.equals((serverAuthenticate_args)that);
+ return false;
+ }
+
+ public boolean equals(serverAuthenticate_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_organizationId = true && this.isSetOrganizationId();
+ boolean that_present_organizationId = true && that.isSetOrganizationId();
+ if (this_present_organizationId || that_present_organizationId) {
+ if (!(this_present_organizationId && that_present_organizationId))
+ return false;
+ if (!this.organizationId.equals(that.organizationId))
+ return false;
+ }
+
+ boolean this_present_challengeResponse = true && this.isSetChallengeResponse();
+ boolean that_present_challengeResponse = true && that.isSetChallengeResponse();
+ if (this_present_challengeResponse || that_present_challengeResponse) {
+ if (!(this_present_challengeResponse && that_present_challengeResponse))
+ return false;
+ if (!this.challengeResponse.equals(that.challengeResponse))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(serverAuthenticate_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOrganizationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetChallengeResponse()).compareTo(other.isSetChallengeResponse());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetChallengeResponse()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.challengeResponse, other.challengeResponse);
+ 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("serverAuthenticate_args(");
+ boolean first = true;
+
+ sb.append("organizationId:");
+ if (this.organizationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.organizationId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("challengeResponse:");
+ if (this.challengeResponse == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.challengeResponse, sb);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class serverAuthenticate_argsStandardSchemeFactory implements SchemeFactory {
+ public serverAuthenticate_argsStandardScheme getScheme() {
+ return new serverAuthenticate_argsStandardScheme();
+ }
+ }
+
+ private static class serverAuthenticate_argsStandardScheme extends StandardScheme<serverAuthenticate_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_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: // ORGANIZATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CHALLENGE_RESPONSE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.challengeResponse = iprot.readBinary();
+ struct.setChallengeResponseIsSet(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, serverAuthenticate_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.organizationId != null) {
+ oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
+ oprot.writeString(struct.organizationId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.challengeResponse != null) {
+ oprot.writeFieldBegin(CHALLENGE_RESPONSE_FIELD_DESC);
+ oprot.writeBinary(struct.challengeResponse);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class serverAuthenticate_argsTupleSchemeFactory implements SchemeFactory {
+ public serverAuthenticate_argsTupleScheme getScheme() {
+ return new serverAuthenticate_argsTupleScheme();
+ }
+ }
+
+ private static class serverAuthenticate_argsTupleScheme extends TupleScheme<serverAuthenticate_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOrganizationId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetChallengeResponse()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetOrganizationId()) {
+ oprot.writeString(struct.organizationId);
+ }
+ if (struct.isSetChallengeResponse()) {
+ oprot.writeBinary(struct.challengeResponse);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.challengeResponse = iprot.readBinary();
+ struct.setChallengeResponseIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class serverAuthenticate_result implements org.apache.thrift.TBase<serverAuthenticate_result, serverAuthenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new serverAuthenticate_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new serverAuthenticate_resultTupleSchemeFactory());
+ }
+
+ public ServerSessionData success; // required
+ public TAuthenticationException failure; // 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"),
+ FAILURE((short)1, "failure");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ServerSessionData.class)));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(serverAuthenticate_result.class, metaDataMap);
+ }
+
+ public serverAuthenticate_result() {
+ }
+
+ public serverAuthenticate_result(
+ ServerSessionData success,
+ TAuthenticationException failure)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public serverAuthenticate_result(serverAuthenticate_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new ServerSessionData(other.success);
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthenticationException(other.failure);
+ }
+ }
+
+ public serverAuthenticate_result deepCopy() {
+ return new serverAuthenticate_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ }
+
+ public ServerSessionData getSuccess() {
+ return this.success;
+ }
+
+ public serverAuthenticate_result setSuccess(ServerSessionData 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 TAuthenticationException getFailure() {
+ return this.failure;
+ }
+
+ public serverAuthenticate_result setFailure(TAuthenticationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ServerSessionData)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthenticationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof serverAuthenticate_result)
+ return this.equals((serverAuthenticate_result)that);
+ return false;
+ }
+
+ public boolean equals(serverAuthenticate_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(serverAuthenticate_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ 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("serverAuthenticate_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class serverAuthenticate_resultStandardSchemeFactory implements SchemeFactory {
+ public serverAuthenticate_resultStandardScheme getScheme() {
+ return new serverAuthenticate_resultStandardScheme();
+ }
+ }
+
+ private static class serverAuthenticate_resultStandardScheme extends StandardScheme<serverAuthenticate_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new ServerSessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthenticationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(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, serverAuthenticate_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.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class serverAuthenticate_resultTupleSchemeFactory implements SchemeFactory {
+ public serverAuthenticate_resultTupleScheme getScheme() {
+ return new serverAuthenticate_resultTupleScheme();
+ }
+ }
+
+ private static class serverAuthenticate_resultTupleScheme extends TupleScheme<serverAuthenticate_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = new ServerSessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthenticationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class submitImage_args implements org.apache.thrift.TBase<submitImage_args, submitImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_args");
+
+ private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField IMAGE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("imageDescription", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new submitImage_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new submitImage_argsTupleSchemeFactory());
+ }
+
+ public String serverSessionId; // required
+ public ImagePublishData imageDescription; // required
+ public List<ByteBuffer> blockHashes; // 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 {
+ SERVER_SESSION_ID((short)1, "serverSessionId"),
+ IMAGE_DESCRIPTION((short)2, "imageDescription"),
+ BLOCK_HASHES((short)3, "blockHashes");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SERVER_SESSION_ID
+ return SERVER_SESSION_ID;
+ case 2: // IMAGE_DESCRIPTION
+ return IMAGE_DESCRIPTION;
+ case 3: // BLOCK_HASHES
+ return BLOCK_HASHES;
+ 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.IMAGE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("imageDescription", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePublishData.class)));
+ tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_args.class, metaDataMap);
+ }
+
+ public submitImage_args() {
+ }
+
+ public submitImage_args(
+ String serverSessionId,
+ ImagePublishData imageDescription,
+ List<ByteBuffer> blockHashes)
+ {
+ this();
+ this.serverSessionId = serverSessionId;
+ this.imageDescription = imageDescription;
+ this.blockHashes = blockHashes;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public submitImage_args(submitImage_args other) {
+ if (other.isSetServerSessionId()) {
+ this.serverSessionId = other.serverSessionId;
+ }
+ if (other.isSetImageDescription()) {
+ this.imageDescription = new ImagePublishData(other.imageDescription);
+ }
+ if (other.isSetBlockHashes()) {
+ List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
+ this.blockHashes = __this__blockHashes;
+ }
+ }
+
+ public submitImage_args deepCopy() {
+ return new submitImage_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.serverSessionId = null;
+ this.imageDescription = null;
+ this.blockHashes = null;
+ }
+
+ public String getServerSessionId() {
+ return this.serverSessionId;
+ }
+
+ public submitImage_args setServerSessionId(String serverSessionId) {
+ this.serverSessionId = serverSessionId;
+ return this;
+ }
+
+ public void unsetServerSessionId() {
+ this.serverSessionId = null;
+ }
+
+ /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerSessionId() {
+ return this.serverSessionId != null;
+ }
+
+ public void setServerSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.serverSessionId = null;
+ }
+ }
+
+ public ImagePublishData getImageDescription() {
+ return this.imageDescription;
+ }
+
+ public submitImage_args setImageDescription(ImagePublishData imageDescription) {
+ this.imageDescription = imageDescription;
+ return this;
+ }
+
+ public void unsetImageDescription() {
+ this.imageDescription = null;
+ }
+
+ /** Returns true if field imageDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageDescription() {
+ return this.imageDescription != null;
+ }
+
+ public void setImageDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.imageDescription = null;
+ }
+ }
+
+ public int getBlockHashesSize() {
+ return (this.blockHashes == null) ? 0 : this.blockHashes.size();
+ }
+
+ public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
+ return (this.blockHashes == null) ? null : this.blockHashes.iterator();
+ }
+
+ public void addToBlockHashes(ByteBuffer elem) {
+ if (this.blockHashes == null) {
+ this.blockHashes = new ArrayList<ByteBuffer>();
+ }
+ this.blockHashes.add(elem);
+ }
+
+ public List<ByteBuffer> getBlockHashes() {
+ return this.blockHashes;
+ }
+
+ public submitImage_args setBlockHashes(List<ByteBuffer> blockHashes) {
+ this.blockHashes = blockHashes;
+ return this;
+ }
+
+ public void unsetBlockHashes() {
+ this.blockHashes = null;
+ }
+
+ /** Returns true if field blockHashes is set (has been assigned a value) and false otherwise */
+ public boolean isSetBlockHashes() {
+ return this.blockHashes != null;
+ }
+
+ public void setBlockHashesIsSet(boolean value) {
+ if (!value) {
+ this.blockHashes = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ if (value == null) {
+ unsetServerSessionId();
+ } else {
+ setServerSessionId((String)value);
+ }
+ break;
+
+ case IMAGE_DESCRIPTION:
+ if (value == null) {
+ unsetImageDescription();
+ } else {
+ setImageDescription((ImagePublishData)value);
+ }
+ break;
+
+ case BLOCK_HASHES:
+ if (value == null) {
+ unsetBlockHashes();
+ } else {
+ setBlockHashes((List<ByteBuffer>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ return getServerSessionId();
+
+ case IMAGE_DESCRIPTION:
+ return getImageDescription();
+
+ case BLOCK_HASHES:
+ return getBlockHashes();
+
+ }
+ 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 SERVER_SESSION_ID:
+ return isSetServerSessionId();
+ case IMAGE_DESCRIPTION:
+ return isSetImageDescription();
+ case BLOCK_HASHES:
+ return isSetBlockHashes();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof submitImage_args)
+ return this.equals((submitImage_args)that);
+ return false;
+ }
+
+ public boolean equals(submitImage_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_serverSessionId = true && this.isSetServerSessionId();
+ boolean that_present_serverSessionId = true && that.isSetServerSessionId();
+ if (this_present_serverSessionId || that_present_serverSessionId) {
+ if (!(this_present_serverSessionId && that_present_serverSessionId))
+ return false;
+ if (!this.serverSessionId.equals(that.serverSessionId))
+ return false;
+ }
+
+ boolean this_present_imageDescription = true && this.isSetImageDescription();
+ boolean that_present_imageDescription = true && that.isSetImageDescription();
+ if (this_present_imageDescription || that_present_imageDescription) {
+ if (!(this_present_imageDescription && that_present_imageDescription))
+ return false;
+ if (!this.imageDescription.equals(that.imageDescription))
+ return false;
+ }
+
+ boolean this_present_blockHashes = true && this.isSetBlockHashes();
+ boolean that_present_blockHashes = true && that.isSetBlockHashes();
+ if (this_present_blockHashes || that_present_blockHashes) {
+ if (!(this_present_blockHashes && that_present_blockHashes))
+ return false;
+ if (!this.blockHashes.equals(that.blockHashes))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(submitImage_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageDescription()).compareTo(other.isSetImageDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageDescription, other.imageDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBlockHashes()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockHashes, other.blockHashes);
+ 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("submitImage_args(");
+ boolean first = true;
+
+ sb.append("serverSessionId:");
+ if (this.serverSessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverSessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageDescription:");
+ if (this.imageDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageDescription);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("blockHashes:");
+ if (this.blockHashes == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.blockHashes);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (imageDescription != null) {
+ imageDescription.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class submitImage_argsStandardSchemeFactory implements SchemeFactory {
+ public submitImage_argsStandardScheme getScheme() {
+ return new submitImage_argsStandardScheme();
+ }
+ }
+
+ private static class submitImage_argsStandardScheme extends StandardScheme<submitImage_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_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: // SERVER_SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // IMAGE_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.imageDescription = new ImagePublishData();
+ struct.imageDescription.read(iprot);
+ struct.setImageDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // BLOCK_HASHES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list178 = iprot.readListBegin();
+ struct.blockHashes = new ArrayList<ByteBuffer>(_list178.size);
+ for (int _i179 = 0; _i179 < _list178.size; ++_i179)
+ {
+ ByteBuffer _elem180;
+ _elem180 = iprot.readBinary();
+ struct.blockHashes.add(_elem180);
+ }
+ iprot.readListEnd();
+ }
+ struct.setBlockHashesIsSet(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, submitImage_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.serverSessionId != null) {
+ oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.serverSessionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageDescription != null) {
+ oprot.writeFieldBegin(IMAGE_DESCRIPTION_FIELD_DESC);
+ struct.imageDescription.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.blockHashes != null) {
+ 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 _iter181 : struct.blockHashes)
+ {
+ oprot.writeBinary(_iter181);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class submitImage_argsTupleSchemeFactory implements SchemeFactory {
+ public submitImage_argsTupleScheme getScheme() {
+ return new submitImage_argsTupleScheme();
+ }
+ }
+
+ private static class submitImage_argsTupleScheme extends TupleScheme<submitImage_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetServerSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageDescription()) {
+ optionals.set(1);
+ }
+ if (struct.isSetBlockHashes()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetServerSessionId()) {
+ oprot.writeString(struct.serverSessionId);
+ }
+ if (struct.isSetImageDescription()) {
+ struct.imageDescription.write(oprot);
+ }
+ if (struct.isSetBlockHashes()) {
+ {
+ oprot.writeI32(struct.blockHashes.size());
+ for (ByteBuffer _iter182 : struct.blockHashes)
+ {
+ oprot.writeBinary(_iter182);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageDescription = new ImagePublishData();
+ struct.imageDescription.read(iprot);
+ struct.setImageDescriptionIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list183 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.blockHashes = new ArrayList<ByteBuffer>(_list183.size);
+ for (int _i184 = 0; _i184 < _list183.size; ++_i184)
+ {
+ ByteBuffer _elem185;
+ _elem185 = iprot.readBinary();
+ struct.blockHashes.add(_elem185);
+ }
+ }
+ struct.setBlockHashesIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class submitImage_result implements org.apache.thrift.TBase<submitImage_result, submitImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField FAILURE3_FIELD_DESC = new org.apache.thrift.protocol.TField("failure3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new submitImage_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new submitImage_resultTupleSchemeFactory());
+ }
+
+ public TransferInformation success; // required
+ public TAuthorizationException failure; // required
+ public TImageDataException failure2; // required
+ public TTransferRejectedException failure3; // 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"),
+ FAILURE((short)1, "failure"),
+ FAILURE2((short)2, "failure2"),
+ FAILURE3((short)3, "failure3");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ case 2: // FAILURE2
+ return FAILURE2;
+ case 3: // FAILURE3
+ return FAILURE3;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.FAILURE3, new org.apache.thrift.meta_data.FieldMetaData("failure3", 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(submitImage_result.class, metaDataMap);
+ }
+
+ public submitImage_result() {
+ }
+
+ public submitImage_result(
+ TransferInformation success,
+ TAuthorizationException failure,
+ TImageDataException failure2,
+ TTransferRejectedException failure3)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ this.failure2 = failure2;
+ this.failure3 = failure3;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public submitImage_result(submitImage_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new TransferInformation(other.success);
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthorizationException(other.failure);
+ }
+ if (other.isSetFailure2()) {
+ this.failure2 = new TImageDataException(other.failure2);
+ }
+ if (other.isSetFailure3()) {
+ this.failure3 = new TTransferRejectedException(other.failure3);
+ }
+ }
+
+ public submitImage_result deepCopy() {
+ return new submitImage_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ this.failure2 = null;
+ this.failure3 = null;
+ }
+
+ public TransferInformation getSuccess() {
+ return this.success;
+ }
+
+ public submitImage_result setSuccess(TransferInformation 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 getFailure() {
+ return this.failure;
+ }
+
+ public submitImage_result setFailure(TAuthorizationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public TImageDataException getFailure2() {
+ return this.failure2;
+ }
+
+ public submitImage_result setFailure2(TImageDataException failure2) {
+ this.failure2 = failure2;
+ return this;
+ }
+
+ public void unsetFailure2() {
+ this.failure2 = null;
+ }
+
+ /** Returns true if field failure2 is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure2() {
+ return this.failure2 != null;
+ }
+
+ public void setFailure2IsSet(boolean value) {
+ if (!value) {
+ this.failure2 = null;
+ }
+ }
+
+ public TTransferRejectedException getFailure3() {
+ return this.failure3;
+ }
+
+ public submitImage_result setFailure3(TTransferRejectedException failure3) {
+ this.failure3 = failure3;
+ return this;
+ }
+
+ public void unsetFailure3() {
+ this.failure3 = null;
+ }
+
+ /** Returns true if field failure3 is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure3() {
+ return this.failure3 != null;
+ }
+
+ public void setFailure3IsSet(boolean value) {
+ if (!value) {
+ this.failure3 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((TransferInformation)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthorizationException)value);
+ }
+ break;
+
+ case FAILURE2:
+ if (value == null) {
+ unsetFailure2();
+ } else {
+ setFailure2((TImageDataException)value);
+ }
+ break;
+
+ case FAILURE3:
+ if (value == null) {
+ unsetFailure3();
+ } else {
+ setFailure3((TTransferRejectedException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ case FAILURE2:
+ return getFailure2();
+
+ case FAILURE3:
+ return getFailure3();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ case FAILURE2:
+ return isSetFailure2();
+ case FAILURE3:
+ return isSetFailure3();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof submitImage_result)
+ return this.equals((submitImage_result)that);
+ return false;
+ }
+
+ public boolean equals(submitImage_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ boolean this_present_failure2 = true && this.isSetFailure2();
+ boolean that_present_failure2 = true && that.isSetFailure2();
+ if (this_present_failure2 || that_present_failure2) {
+ if (!(this_present_failure2 && that_present_failure2))
+ return false;
+ if (!this.failure2.equals(that.failure2))
+ return false;
+ }
+
+ boolean this_present_failure3 = true && this.isSetFailure3();
+ boolean that_present_failure3 = true && that.isSetFailure3();
+ if (this_present_failure3 || that_present_failure3) {
+ if (!(this_present_failure3 && that_present_failure3))
+ return false;
+ if (!this.failure3.equals(that.failure3))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(submitImage_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure2()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFailure3()).compareTo(other.isSetFailure3());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure3()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure3, other.failure3);
+ 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("submitImage_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("failure2:");
+ if (this.failure2 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure2);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("failure3:");
+ if (this.failure3 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure3);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class submitImage_resultStandardSchemeFactory implements SchemeFactory {
+ public submitImage_resultStandardScheme getScheme() {
+ return new submitImage_resultStandardScheme();
+ }
+ }
+
+ private static class submitImage_resultStandardScheme extends StandardScheme<submitImage_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // FAILURE2
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure2 = new TImageDataException();
+ struct.failure2.read(iprot);
+ struct.setFailure2IsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // FAILURE3
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure3 = new TTransferRejectedException();
+ struct.failure3.read(iprot);
+ struct.setFailure3IsSet(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, submitImage_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.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.failure2 != null) {
+ oprot.writeFieldBegin(FAILURE2_FIELD_DESC);
+ struct.failure2.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.failure3 != null) {
+ oprot.writeFieldBegin(FAILURE3_FIELD_DESC);
+ struct.failure3.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class submitImage_resultTupleSchemeFactory implements SchemeFactory {
+ public submitImage_resultTupleScheme getScheme() {
+ return new submitImage_resultTupleScheme();
+ }
+ }
+
+ private static class submitImage_resultTupleScheme extends TupleScheme<submitImage_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ if (struct.isSetFailure2()) {
+ optionals.set(2);
+ }
+ if (struct.isSetFailure3()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ if (struct.isSetFailure2()) {
+ struct.failure2.write(oprot);
+ }
+ if (struct.isSetFailure3()) {
+ struct.failure3.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.failure2 = new TImageDataException();
+ struct.failure2.read(iprot);
+ struct.setFailure2IsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.failure3 = new TTransferRejectedException();
+ struct.failure3.read(iprot);
+ struct.setFailure3IsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImage_args implements org.apache.thrift.TBase<getImage_args, getImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImage_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImage_args");
+
+ private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImage_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImage_argsTupleSchemeFactory());
+ }
+
+ public String serverSessionId; // required
+ public String imageVersionId; // 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 {
+ SERVER_SESSION_ID((short)2, "serverSessionId"),
+ IMAGE_VERSION_ID((short)1, "imageVersionId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 2: // SERVER_SESSION_ID
+ return SERVER_SESSION_ID;
+ case 1: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", 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(getImage_args.class, metaDataMap);
+ }
+
+ public getImage_args() {
+ }
+
+ public getImage_args(
+ String serverSessionId,
+ String imageVersionId)
+ {
+ this();
+ this.serverSessionId = serverSessionId;
+ this.imageVersionId = imageVersionId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImage_args(getImage_args other) {
+ if (other.isSetServerSessionId()) {
+ this.serverSessionId = other.serverSessionId;
+ }
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ }
+
+ public getImage_args deepCopy() {
+ return new getImage_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.serverSessionId = null;
+ this.imageVersionId = null;
+ }
+
+ public String getServerSessionId() {
+ return this.serverSessionId;
+ }
+
+ public getImage_args setServerSessionId(String serverSessionId) {
+ this.serverSessionId = serverSessionId;
+ return this;
+ }
+
+ public void unsetServerSessionId() {
+ this.serverSessionId = null;
+ }
+
+ /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerSessionId() {
+ return this.serverSessionId != null;
+ }
+
+ public void setServerSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.serverSessionId = null;
+ }
+ }
+
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public getImage_args setImageVersionId(String imageVersionId) {
+ this.imageVersionId = imageVersionId;
+ return this;
+ }
+
+ public void unsetImageVersionId() {
+ this.imageVersionId = null;
+ }
+
+ /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageVersionId() {
+ return this.imageVersionId != null;
+ }
+
+ public void setImageVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.imageVersionId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ if (value == null) {
+ unsetServerSessionId();
+ } else {
+ setServerSessionId((String)value);
+ }
+ break;
+
+ case IMAGE_VERSION_ID:
+ if (value == null) {
+ unsetImageVersionId();
+ } else {
+ setImageVersionId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ return getServerSessionId();
+
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ }
+ 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 SERVER_SESSION_ID:
+ return isSetServerSessionId();
+ case IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImage_args)
+ return this.equals((getImage_args)that);
+ return false;
+ }
+
+ public boolean equals(getImage_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_serverSessionId = true && this.isSetServerSessionId();
+ boolean that_present_serverSessionId = true && that.isSetServerSessionId();
+ if (this_present_serverSessionId || that_present_serverSessionId) {
+ if (!(this_present_serverSessionId && that_present_serverSessionId))
+ return false;
+ if (!this.serverSessionId.equals(that.serverSessionId))
+ return false;
+ }
+
+ boolean this_present_imageVersionId = true && this.isSetImageVersionId();
+ boolean that_present_imageVersionId = true && that.isSetImageVersionId();
+ if (this_present_imageVersionId || that_present_imageVersionId) {
+ if (!(this_present_imageVersionId && that_present_imageVersionId))
+ return false;
+ if (!this.imageVersionId.equals(that.imageVersionId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImage_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ 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("getImage_args(");
+ boolean first = true;
+
+ sb.append("serverSessionId:");
+ if (this.serverSessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverSessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ 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 getImage_argsStandardSchemeFactory implements SchemeFactory {
+ public getImage_argsStandardScheme getScheme() {
+ return new getImage_argsStandardScheme();
+ }
+ }
+
+ private static class getImage_argsStandardScheme extends StandardScheme<getImage_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImage_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 2: // SERVER_SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // IMAGE_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(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, getImage_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.serverSessionId != null) {
+ oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.serverSessionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImage_argsTupleSchemeFactory implements SchemeFactory {
+ public getImage_argsTupleScheme getScheme() {
+ return new getImage_argsTupleScheme();
+ }
+ }
+
+ private static class getImage_argsTupleScheme extends TupleScheme<getImage_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImage_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetServerSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageVersionId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetServerSessionId()) {
+ oprot.writeString(struct.serverSessionId);
+ }
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImage_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImage_result implements org.apache.thrift.TBase<getImage_result, getImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImage_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImage_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 FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImage_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImage_resultTupleSchemeFactory());
+ }
+
+ public TransferInformation success; // required
+ public TAuthorizationException failure; // required
+ public TImageDataException failure2; // 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"),
+ FAILURE((short)1, "failure"),
+ FAILURE2((short)2, "failure2");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // FAILURE
+ return FAILURE;
+ case 2: // FAILURE2
+ return FAILURE2;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
+ tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", 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(getImage_result.class, metaDataMap);
+ }
+
+ public getImage_result() {
+ }
+
+ public getImage_result(
+ TransferInformation success,
+ TAuthorizationException failure,
+ TImageDataException failure2)
+ {
+ this();
+ this.success = success;
+ this.failure = failure;
+ this.failure2 = failure2;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImage_result(getImage_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new TransferInformation(other.success);
+ }
+ if (other.isSetFailure()) {
+ this.failure = new TAuthorizationException(other.failure);
+ }
+ if (other.isSetFailure2()) {
+ this.failure2 = new TImageDataException(other.failure2);
+ }
+ }
+
+ public getImage_result deepCopy() {
+ return new getImage_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.failure = null;
+ this.failure2 = null;
+ }
+
+ public TransferInformation getSuccess() {
+ return this.success;
+ }
+
+ public getImage_result setSuccess(TransferInformation 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 getFailure() {
+ return this.failure;
+ }
+
+ public getImage_result setFailure(TAuthorizationException failure) {
+ this.failure = failure;
+ return this;
+ }
+
+ public void unsetFailure() {
+ this.failure = null;
+ }
+
+ /** Returns true if field failure is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure() {
+ return this.failure != null;
+ }
+
+ public void setFailureIsSet(boolean value) {
+ if (!value) {
+ this.failure = null;
+ }
+ }
+
+ public TImageDataException getFailure2() {
+ return this.failure2;
+ }
+
+ public getImage_result setFailure2(TImageDataException failure2) {
+ this.failure2 = failure2;
+ return this;
+ }
+
+ public void unsetFailure2() {
+ this.failure2 = null;
+ }
+
+ /** Returns true if field failure2 is set (has been assigned a value) and false otherwise */
+ public boolean isSetFailure2() {
+ return this.failure2 != null;
+ }
+
+ public void setFailure2IsSet(boolean value) {
+ if (!value) {
+ this.failure2 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((TransferInformation)value);
+ }
+ break;
+
+ case FAILURE:
+ if (value == null) {
+ unsetFailure();
+ } else {
+ setFailure((TAuthorizationException)value);
+ }
+ break;
+
+ case FAILURE2:
+ if (value == null) {
+ unsetFailure2();
+ } else {
+ setFailure2((TImageDataException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case FAILURE:
+ return getFailure();
+
+ case FAILURE2:
+ return getFailure2();
+
+ }
+ 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 FAILURE:
+ return isSetFailure();
+ case FAILURE2:
+ return isSetFailure2();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImage_result)
+ return this.equals((getImage_result)that);
+ return false;
+ }
+
+ public boolean equals(getImage_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_failure = true && this.isSetFailure();
+ boolean that_present_failure = true && that.isSetFailure();
+ if (this_present_failure || that_present_failure) {
+ if (!(this_present_failure && that_present_failure))
+ return false;
+ if (!this.failure.equals(that.failure))
+ return false;
+ }
+
+ boolean this_present_failure2 = true && this.isSetFailure2();
+ boolean that_present_failure2 = true && that.isSetFailure2();
+ if (this_present_failure2 || that_present_failure2) {
+ if (!(this_present_failure2 && that_present_failure2))
+ return false;
+ if (!this.failure2.equals(that.failure2))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImage_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(isSetFailure()).compareTo(other.isSetFailure());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFailure2()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2);
+ 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("getImage_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("failure:");
+ if (this.failure == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("failure2:");
+ if (this.failure2 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.failure2);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getImage_resultStandardSchemeFactory implements SchemeFactory {
+ public getImage_resultStandardScheme getScheme() {
+ return new getImage_resultStandardScheme();
+ }
+ }
+
+ private static class getImage_resultStandardScheme extends StandardScheme<getImage_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImage_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // FAILURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // FAILURE2
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.failure2 = new TImageDataException();
+ struct.failure2.read(iprot);
+ struct.setFailure2IsSet(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, getImage_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.failure != null) {
+ oprot.writeFieldBegin(FAILURE_FIELD_DESC);
+ struct.failure.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.failure2 != null) {
+ oprot.writeFieldBegin(FAILURE2_FIELD_DESC);
+ struct.failure2.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImage_resultTupleSchemeFactory implements SchemeFactory {
+ public getImage_resultTupleScheme getScheme() {
+ return new getImage_resultTupleScheme();
+ }
+ }
+
+ private static class getImage_resultTupleScheme extends TupleScheme<getImage_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImage_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFailure()) {
+ optionals.set(1);
+ }
+ if (struct.isSetFailure2()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetFailure()) {
+ struct.failure.write(oprot);
+ }
+ if (struct.isSetFailure2()) {
+ struct.failure2.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImage_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.failure = new TAuthorizationException();
+ struct.failure.read(iprot);
+ struct.setFailureIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.failure2 = new TImageDataException();
+ struct.failure2.read(iprot);
+ struct.setFailure2IsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class registerSatellite_args implements org.apache.thrift.TBase<registerSatellite_args, registerSatellite_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_args");
+
+ private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField MODULUS_FIELD_DESC = new org.apache.thrift.protocol.TField("modulus", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField EXPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("exponent", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new registerSatellite_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new registerSatellite_argsTupleSchemeFactory());
+ }
+
+ public String organizationId; // required
+ public String address; // required
+ public String modulus; // required
+ public String exponent; // 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 {
+ ORGANIZATION_ID((short)1, "organizationId"),
+ ADDRESS((short)2, "address"),
+ MODULUS((short)3, "modulus"),
+ EXPONENT((short)4, "exponent");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ORGANIZATION_ID
+ return ORGANIZATION_ID;
+ case 2: // ADDRESS
+ return ADDRESS;
+ case 3: // MODULUS
+ return MODULUS;
+ case 4: // EXPONENT
+ return EXPONENT;
+ 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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MODULUS, new org.apache.thrift.meta_data.FieldMetaData("modulus", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPONENT, new org.apache.thrift.meta_data.FieldMetaData("exponent", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerSatellite_args.class, metaDataMap);
+ }
+
+ public registerSatellite_args() {
+ }
+
+ public registerSatellite_args(
+ String organizationId,
+ String address,
+ String modulus,
+ String exponent)
+ {
+ this();
+ this.organizationId = organizationId;
+ this.address = address;
+ this.modulus = modulus;
+ this.exponent = exponent;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public registerSatellite_args(registerSatellite_args other) {
+ if (other.isSetOrganizationId()) {
+ this.organizationId = other.organizationId;
+ }
+ if (other.isSetAddress()) {
+ this.address = other.address;
+ }
+ if (other.isSetModulus()) {
+ this.modulus = other.modulus;
+ }
+ if (other.isSetExponent()) {
+ this.exponent = other.exponent;
+ }
+ }
+
+ public registerSatellite_args deepCopy() {
+ return new registerSatellite_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.organizationId = null;
+ this.address = null;
+ this.modulus = null;
+ this.exponent = null;
+ }
+
+ public String getOrganizationId() {
+ return this.organizationId;
+ }
+
+ public registerSatellite_args setOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ public void unsetOrganizationId() {
+ this.organizationId = null;
+ }
+
+ /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOrganizationId() {
+ return this.organizationId != null;
+ }
+
+ public void setOrganizationIdIsSet(boolean value) {
+ if (!value) {
+ this.organizationId = null;
+ }
+ }
+
+ public String getAddress() {
+ return this.address;
+ }
+
+ public registerSatellite_args setAddress(String address) {
+ this.address = address;
+ return this;
+ }
+
+ public void unsetAddress() {
+ this.address = null;
+ }
+
+ /** Returns true if field address is set (has been assigned a value) and false otherwise */
+ public boolean isSetAddress() {
+ return this.address != null;
+ }
+
+ public void setAddressIsSet(boolean value) {
+ if (!value) {
+ this.address = null;
+ }
+ }
+
+ public String getModulus() {
+ return this.modulus;
+ }
+
+ public registerSatellite_args setModulus(String modulus) {
+ this.modulus = modulus;
+ return this;
+ }
+
+ public void unsetModulus() {
+ this.modulus = null;
+ }
+
+ /** Returns true if field modulus is set (has been assigned a value) and false otherwise */
+ public boolean isSetModulus() {
+ return this.modulus != null;
+ }
+
+ public void setModulusIsSet(boolean value) {
+ if (!value) {
+ this.modulus = null;
+ }
+ }
+
+ public String getExponent() {
+ return this.exponent;
+ }
+
+ public registerSatellite_args setExponent(String exponent) {
+ this.exponent = exponent;
+ return this;
+ }
+
+ public void unsetExponent() {
+ this.exponent = null;
+ }
+
+ /** Returns true if field exponent is set (has been assigned a value) and false otherwise */
+ public boolean isSetExponent() {
+ return this.exponent != null;
+ }
+
+ public void setExponentIsSet(boolean value) {
+ if (!value) {
+ this.exponent = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ if (value == null) {
+ unsetOrganizationId();
+ } else {
+ setOrganizationId((String)value);
+ }
+ break;
+
+ case ADDRESS:
+ if (value == null) {
+ unsetAddress();
+ } else {
+ setAddress((String)value);
+ }
+ break;
+
+ case MODULUS:
+ if (value == null) {
+ unsetModulus();
+ } else {
+ setModulus((String)value);
+ }
+ break;
+
+ case EXPONENT:
+ if (value == null) {
+ unsetExponent();
+ } else {
+ setExponent((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ return getOrganizationId();
+
+ case ADDRESS:
+ return getAddress();
+
+ case MODULUS:
+ return getModulus();
+
+ case EXPONENT:
+ return getExponent();
+
+ }
+ 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 ORGANIZATION_ID:
+ return isSetOrganizationId();
+ case ADDRESS:
+ return isSetAddress();
+ case MODULUS:
+ return isSetModulus();
+ case EXPONENT:
+ return isSetExponent();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof registerSatellite_args)
+ return this.equals((registerSatellite_args)that);
+ return false;
+ }
+
+ public boolean equals(registerSatellite_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_organizationId = true && this.isSetOrganizationId();
+ boolean that_present_organizationId = true && that.isSetOrganizationId();
+ if (this_present_organizationId || that_present_organizationId) {
+ if (!(this_present_organizationId && that_present_organizationId))
+ return false;
+ if (!this.organizationId.equals(that.organizationId))
+ return false;
+ }
+
+ boolean this_present_address = true && this.isSetAddress();
+ boolean that_present_address = true && that.isSetAddress();
+ if (this_present_address || that_present_address) {
+ if (!(this_present_address && that_present_address))
+ return false;
+ if (!this.address.equals(that.address))
+ return false;
+ }
+
+ boolean this_present_modulus = true && this.isSetModulus();
+ boolean that_present_modulus = true && that.isSetModulus();
+ if (this_present_modulus || that_present_modulus) {
+ if (!(this_present_modulus && that_present_modulus))
+ return false;
+ if (!this.modulus.equals(that.modulus))
+ return false;
+ }
+
+ boolean this_present_exponent = true && this.isSetExponent();
+ boolean that_present_exponent = true && that.isSetExponent();
+ if (this_present_exponent || that_present_exponent) {
+ if (!(this_present_exponent && that_present_exponent))
+ return false;
+ if (!this.exponent.equals(that.exponent))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(registerSatellite_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOrganizationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAddress()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetModulus()).compareTo(other.isSetModulus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetModulus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modulus, other.modulus);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExponent()).compareTo(other.isSetExponent());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExponent()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exponent, other.exponent);
+ 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("registerSatellite_args(");
+ boolean first = true;
+
+ sb.append("organizationId:");
+ if (this.organizationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.organizationId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("address:");
+ if (this.address == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.address);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("modulus:");
+ if (this.modulus == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.modulus);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("exponent:");
+ if (this.exponent == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.exponent);
+ }
+ 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 registerSatellite_argsStandardSchemeFactory implements SchemeFactory {
+ public registerSatellite_argsStandardScheme getScheme() {
+ return new registerSatellite_argsStandardScheme();
+ }
+ }
+
+ private static class registerSatellite_argsStandardScheme extends StandardScheme<registerSatellite_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_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: // ORGANIZATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ADDRESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.address = iprot.readString();
+ struct.setAddressIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // MODULUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.modulus = iprot.readString();
+ struct.setModulusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // EXPONENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.exponent = iprot.readString();
+ struct.setExponentIsSet(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, registerSatellite_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.organizationId != null) {
+ oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
+ oprot.writeString(struct.organizationId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.address != null) {
+ oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
+ oprot.writeString(struct.address);
+ oprot.writeFieldEnd();
+ }
+ if (struct.modulus != null) {
+ oprot.writeFieldBegin(MODULUS_FIELD_DESC);
+ oprot.writeString(struct.modulus);
+ oprot.writeFieldEnd();
+ }
+ if (struct.exponent != null) {
+ oprot.writeFieldBegin(EXPONENT_FIELD_DESC);
+ oprot.writeString(struct.exponent);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class registerSatellite_argsTupleSchemeFactory implements SchemeFactory {
+ public registerSatellite_argsTupleScheme getScheme() {
+ return new registerSatellite_argsTupleScheme();
+ }
+ }
+
+ private static class registerSatellite_argsTupleScheme extends TupleScheme<registerSatellite_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOrganizationId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAddress()) {
+ optionals.set(1);
+ }
+ if (struct.isSetModulus()) {
+ optionals.set(2);
+ }
+ if (struct.isSetExponent()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetOrganizationId()) {
+ oprot.writeString(struct.organizationId);
+ }
+ if (struct.isSetAddress()) {
+ oprot.writeString(struct.address);
+ }
+ if (struct.isSetModulus()) {
+ oprot.writeString(struct.modulus);
+ }
+ if (struct.isSetExponent()) {
+ oprot.writeString(struct.exponent);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.address = iprot.readString();
+ struct.setAddressIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.modulus = iprot.readString();
+ struct.setModulusIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.exponent = iprot.readString();
+ struct.setExponentIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class registerSatellite_result implements org.apache.thrift.TBase<registerSatellite_result, registerSatellite_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new registerSatellite_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new registerSatellite_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerSatellite_result.class, metaDataMap);
+ }
+
+ public registerSatellite_result() {
+ }
+
+ public registerSatellite_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public registerSatellite_result(registerSatellite_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public registerSatellite_result deepCopy() {
+ return new registerSatellite_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public registerSatellite_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof registerSatellite_result)
+ return this.equals((registerSatellite_result)that);
+ return false;
+ }
+
+ public boolean equals(registerSatellite_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(registerSatellite_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("registerSatellite_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class registerSatellite_resultStandardSchemeFactory implements SchemeFactory {
+ public registerSatellite_resultStandardScheme getScheme() {
+ return new registerSatellite_resultStandardScheme();
+ }
+ }
+
+ private static class registerSatellite_resultStandardScheme extends StandardScheme<registerSatellite_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, registerSatellite_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class registerSatellite_resultTupleSchemeFactory implements SchemeFactory {
+ public registerSatellite_resultTupleScheme getScheme() {
+ return new registerSatellite_resultTupleScheme();
+ }
+ }
+
+ private static class registerSatellite_resultTupleScheme extends TupleScheme<registerSatellite_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateSatelliteAddress_args implements org.apache.thrift.TBase<updateSatelliteAddress_args, updateSatelliteAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatelliteAddress_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatelliteAddress_args");
+
+ private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateSatelliteAddress_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateSatelliteAddress_argsTupleSchemeFactory());
+ }
+
+ public String serverSessionId; // required
+ public String address; // 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 {
+ SERVER_SESSION_ID((short)1, "serverSessionId"),
+ ADDRESS((short)2, "address");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SERVER_SESSION_ID
+ return SERVER_SESSION_ID;
+ case 2: // ADDRESS
+ return ADDRESS;
+ 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSatelliteAddress_args.class, metaDataMap);
+ }
+
+ public updateSatelliteAddress_args() {
+ }
+
+ public updateSatelliteAddress_args(
+ String serverSessionId,
+ String address)
+ {
+ this();
+ this.serverSessionId = serverSessionId;
+ this.address = address;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateSatelliteAddress_args(updateSatelliteAddress_args other) {
+ if (other.isSetServerSessionId()) {
+ this.serverSessionId = other.serverSessionId;
+ }
+ if (other.isSetAddress()) {
+ this.address = other.address;
+ }
+ }
+
+ public updateSatelliteAddress_args deepCopy() {
+ return new updateSatelliteAddress_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.serverSessionId = null;
+ this.address = null;
+ }
+
+ public String getServerSessionId() {
+ return this.serverSessionId;
+ }
+
+ public updateSatelliteAddress_args setServerSessionId(String serverSessionId) {
+ this.serverSessionId = serverSessionId;
+ return this;
+ }
+
+ public void unsetServerSessionId() {
+ this.serverSessionId = null;
+ }
+
+ /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerSessionId() {
+ return this.serverSessionId != null;
+ }
+
+ public void setServerSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.serverSessionId = null;
+ }
+ }
+
+ public String getAddress() {
+ return this.address;
+ }
+
+ public updateSatelliteAddress_args setAddress(String address) {
+ this.address = address;
+ return this;
+ }
+
+ public void unsetAddress() {
+ this.address = null;
+ }
+
+ /** Returns true if field address is set (has been assigned a value) and false otherwise */
+ public boolean isSetAddress() {
+ return this.address != null;
+ }
+
+ public void setAddressIsSet(boolean value) {
+ if (!value) {
+ this.address = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ if (value == null) {
+ unsetServerSessionId();
+ } else {
+ setServerSessionId((String)value);
+ }
+ break;
+
+ case ADDRESS:
+ if (value == null) {
+ unsetAddress();
+ } else {
+ setAddress((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SERVER_SESSION_ID:
+ return getServerSessionId();
+
+ case ADDRESS:
+ return getAddress();
+
+ }
+ 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 SERVER_SESSION_ID:
+ return isSetServerSessionId();
+ case ADDRESS:
+ return isSetAddress();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateSatelliteAddress_args)
+ return this.equals((updateSatelliteAddress_args)that);
+ return false;
+ }
+
+ public boolean equals(updateSatelliteAddress_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_serverSessionId = true && this.isSetServerSessionId();
+ boolean that_present_serverSessionId = true && that.isSetServerSessionId();
+ if (this_present_serverSessionId || that_present_serverSessionId) {
+ if (!(this_present_serverSessionId && that_present_serverSessionId))
+ return false;
+ if (!this.serverSessionId.equals(that.serverSessionId))
+ return false;
+ }
+
+ boolean this_present_address = true && this.isSetAddress();
+ boolean that_present_address = true && that.isSetAddress();
+ if (this_present_address || that_present_address) {
+ if (!(this_present_address && that_present_address))
+ return false;
+ if (!this.address.equals(that.address))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateSatelliteAddress_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAddress()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address);
+ 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("updateSatelliteAddress_args(");
+ boolean first = true;
+
+ sb.append("serverSessionId:");
+ if (this.serverSessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverSessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("address:");
+ if (this.address == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.address);
+ }
+ 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 updateSatelliteAddress_argsStandardSchemeFactory implements SchemeFactory {
+ public updateSatelliteAddress_argsStandardScheme getScheme() {
+ return new updateSatelliteAddress_argsStandardScheme();
+ }
+ }
+
+ private static class updateSatelliteAddress_argsStandardScheme extends StandardScheme<updateSatelliteAddress_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatelliteAddress_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: // SERVER_SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ADDRESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.address = iprot.readString();
+ struct.setAddressIsSet(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, updateSatelliteAddress_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.serverSessionId != null) {
+ oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.serverSessionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.address != null) {
+ oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
+ oprot.writeString(struct.address);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateSatelliteAddress_argsTupleSchemeFactory implements SchemeFactory {
+ public updateSatelliteAddress_argsTupleScheme getScheme() {
+ return new updateSatelliteAddress_argsTupleScheme();
+ }
+ }
+
+ private static class updateSatelliteAddress_argsTupleScheme extends TupleScheme<updateSatelliteAddress_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateSatelliteAddress_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetServerSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAddress()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetServerSessionId()) {
+ oprot.writeString(struct.serverSessionId);
+ }
+ if (struct.isSetAddress()) {
+ oprot.writeString(struct.address);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateSatelliteAddress_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.serverSessionId = iprot.readString();
+ struct.setServerSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.address = iprot.readString();
+ struct.setAddressIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateSatelliteAddress_result implements org.apache.thrift.TBase<updateSatelliteAddress_result, updateSatelliteAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatelliteAddress_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatelliteAddress_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateSatelliteAddress_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateSatelliteAddress_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSatelliteAddress_result.class, metaDataMap);
+ }
+
+ public updateSatelliteAddress_result() {
+ }
+
+ public updateSatelliteAddress_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateSatelliteAddress_result(updateSatelliteAddress_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public updateSatelliteAddress_result deepCopy() {
+ return new updateSatelliteAddress_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updateSatelliteAddress_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateSatelliteAddress_result)
+ return this.equals((updateSatelliteAddress_result)that);
+ return false;
+ }
+
+ public boolean equals(updateSatelliteAddress_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateSatelliteAddress_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("updateSatelliteAddress_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class updateSatelliteAddress_resultStandardSchemeFactory implements SchemeFactory {
+ public updateSatelliteAddress_resultStandardScheme getScheme() {
+ return new updateSatelliteAddress_resultStandardScheme();
+ }
+ }
+
+ private static class updateSatelliteAddress_resultStandardScheme extends StandardScheme<updateSatelliteAddress_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatelliteAddress_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, updateSatelliteAddress_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateSatelliteAddress_resultTupleSchemeFactory implements SchemeFactory {
+ public updateSatelliteAddress_resultTupleScheme getScheme() {
+ return new updateSatelliteAddress_resultTupleScheme();
+ }
+ }
+
+ private static class updateSatelliteAddress_resultTupleScheme extends TupleScheme<updateSatelliteAddress_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateSatelliteAddress_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateSatelliteAddress_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getOrganizations_args implements org.apache.thrift.TBase<getOrganizations_args, getOrganizations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getOrganizations_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getOrganizations_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_args.class, metaDataMap);
+ }
+
+ public getOrganizations_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getOrganizations_args(getOrganizations_args other) {
+ }
+
+ public getOrganizations_args deepCopy() {
+ return new getOrganizations_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getOrganizations_args)
+ return this.equals((getOrganizations_args)that);
+ return false;
+ }
+
+ public boolean equals(getOrganizations_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getOrganizations_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getOrganizations_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getOrganizations_argsStandardSchemeFactory implements SchemeFactory {
+ public getOrganizations_argsStandardScheme getScheme() {
+ return new getOrganizations_argsStandardScheme();
+ }
+ }
+
+ private static class getOrganizations_argsStandardScheme extends StandardScheme<getOrganizations_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_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) {
+ 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, getOrganizations_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getOrganizations_argsTupleSchemeFactory implements SchemeFactory {
+ public getOrganizations_argsTupleScheme getScheme() {
+ return new getOrganizations_argsTupleScheme();
+ }
+ }
+
+ private static class getOrganizations_argsTupleScheme extends TupleScheme<getOrganizations_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getOrganizations_result implements org.apache.thrift.TBase<getOrganizations_result, getOrganizations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getOrganizations_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getOrganizations_resultTupleSchemeFactory());
+ }
+
+ public List<Organization> success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Organization.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_result.class, metaDataMap);
+ }
+
+ public getOrganizations_result() {
+ }
+
+ public getOrganizations_result(
+ List<Organization> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getOrganizations_result(getOrganizations_result other) {
+ if (other.isSetSuccess()) {
+ List<Organization> __this__success = new ArrayList<Organization>(other.success.size());
+ for (Organization other_element : other.success) {
+ __this__success.add(new Organization(other_element));
+ }
+ this.success = __this__success;
+ }
+ }
+
+ public getOrganizations_result deepCopy() {
+ return new getOrganizations_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<Organization> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(Organization elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<Organization>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<Organization> getSuccess() {
+ return this.success;
+ }
+
+ public getOrganizations_result setSuccess(List<Organization> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<Organization>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getOrganizations_result)
+ return this.equals((getOrganizations_result)that);
+ return false;
+ }
+
+ public boolean equals(getOrganizations_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getOrganizations_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getOrganizations_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getOrganizations_resultStandardSchemeFactory implements SchemeFactory {
+ public getOrganizations_resultStandardScheme getScheme() {
+ return new getOrganizations_resultStandardScheme();
+ }
+ }
+
+ private static class getOrganizations_resultStandardScheme extends StandardScheme<getOrganizations_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_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 _list186 = iprot.readListBegin();
+ struct.success = new ArrayList<Organization>(_list186.size);
+ for (int _i187 = 0; _i187 < _list186.size; ++_i187)
+ {
+ Organization _elem188;
+ _elem188 = new Organization();
+ _elem188.read(iprot);
+ struct.success.add(_elem188);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getOrganizations_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 (Organization _iter189 : struct.success)
+ {
+ _iter189.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getOrganizations_resultTupleSchemeFactory implements SchemeFactory {
+ public getOrganizations_resultTupleScheme getScheme() {
+ return new getOrganizations_resultTupleScheme();
+ }
+ }
+
+ private static class getOrganizations_resultTupleScheme extends TupleScheme<getOrganizations_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (Organization _iter190 : struct.success)
+ {
+ _iter190.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list191 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<Organization>(_list191.size);
+ for (int _i192 = 0; _i192 < _list191.size; ++_i192)
+ {
+ Organization _elem193;
+ _elem193 = new Organization();
+ _elem193.read(iprot);
+ struct.success.add(_elem193);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getOperatingSystems_args implements org.apache.thrift.TBase<getOperatingSystems_args, getOperatingSystems_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getOperatingSystems_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getOperatingSystems_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_args.class, metaDataMap);
+ }
+
+ public getOperatingSystems_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getOperatingSystems_args(getOperatingSystems_args other) {
+ }
+
+ public getOperatingSystems_args deepCopy() {
+ return new getOperatingSystems_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getOperatingSystems_args)
+ return this.equals((getOperatingSystems_args)that);
+ return false;
+ }
+
+ public boolean equals(getOperatingSystems_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getOperatingSystems_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getOperatingSystems_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getOperatingSystems_argsStandardSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_argsStandardScheme getScheme() {
+ return new getOperatingSystems_argsStandardScheme();
+ }
+ }
+
+ private static class getOperatingSystems_argsStandardScheme extends StandardScheme<getOperatingSystems_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_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) {
+ 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, getOperatingSystems_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getOperatingSystems_argsTupleSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_argsTupleScheme getScheme() {
+ return new getOperatingSystems_argsTupleScheme();
+ }
+ }
+
+ private static class getOperatingSystems_argsTupleScheme extends TupleScheme<getOperatingSystems_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getOperatingSystems_result implements org.apache.thrift.TBase<getOperatingSystems_result, getOperatingSystems_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getOperatingSystems_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getOperatingSystems_resultTupleSchemeFactory());
+ }
+
+ public List<OperatingSystem> success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OperatingSystem.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap);
+ }
+
+ public getOperatingSystems_result() {
+ }
+
+ public getOperatingSystems_result(
+ List<OperatingSystem> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getOperatingSystems_result(getOperatingSystems_result other) {
+ if (other.isSetSuccess()) {
+ List<OperatingSystem> __this__success = new ArrayList<OperatingSystem>(other.success.size());
+ for (OperatingSystem other_element : other.success) {
+ __this__success.add(new OperatingSystem(other_element));
+ }
+ this.success = __this__success;
+ }
+ }
+
+ public getOperatingSystems_result deepCopy() {
+ return new getOperatingSystems_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<OperatingSystem> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(OperatingSystem elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<OperatingSystem>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<OperatingSystem> getSuccess() {
+ return this.success;
+ }
+
+ public getOperatingSystems_result setSuccess(List<OperatingSystem> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<OperatingSystem>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getOperatingSystems_result)
+ return this.equals((getOperatingSystems_result)that);
+ return false;
+ }
+
+ public boolean equals(getOperatingSystems_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getOperatingSystems_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getOperatingSystems_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getOperatingSystems_resultStandardSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_resultStandardScheme getScheme() {
+ return new getOperatingSystems_resultStandardScheme();
+ }
+ }
+
+ private static class getOperatingSystems_resultStandardScheme extends StandardScheme<getOperatingSystems_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_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 _list194 = iprot.readListBegin();
+ struct.success = new ArrayList<OperatingSystem>(_list194.size);
+ for (int _i195 = 0; _i195 < _list194.size; ++_i195)
+ {
+ OperatingSystem _elem196;
+ _elem196 = new OperatingSystem();
+ _elem196.read(iprot);
+ struct.success.add(_elem196);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getOperatingSystems_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 (OperatingSystem _iter197 : struct.success)
+ {
+ _iter197.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getOperatingSystems_resultTupleSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_resultTupleScheme getScheme() {
+ return new getOperatingSystems_resultTupleScheme();
+ }
+ }
+
+ private static class getOperatingSystems_resultTupleScheme extends TupleScheme<getOperatingSystems_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (OperatingSystem _iter198 : struct.success)
+ {
+ _iter198.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<OperatingSystem>(_list199.size);
+ for (int _i200 = 0; _i200 < _list199.size; ++_i200)
+ {
+ OperatingSystem _elem201;
+ _elem201 = new OperatingSystem();
+ _elem201.read(iprot);
+ struct.success.add(_elem201);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getVirtualizers_args implements org.apache.thrift.TBase<getVirtualizers_args, getVirtualizers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getVirtualizers_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getVirtualizers_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_args.class, metaDataMap);
+ }
+
+ public getVirtualizers_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getVirtualizers_args(getVirtualizers_args other) {
+ }
+
+ public getVirtualizers_args deepCopy() {
+ return new getVirtualizers_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getVirtualizers_args)
+ return this.equals((getVirtualizers_args)that);
+ return false;
+ }
+
+ public boolean equals(getVirtualizers_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getVirtualizers_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getVirtualizers_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getVirtualizers_argsStandardSchemeFactory implements SchemeFactory {
+ public getVirtualizers_argsStandardScheme getScheme() {
+ return new getVirtualizers_argsStandardScheme();
+ }
+ }
+
+ private static class getVirtualizers_argsStandardScheme extends StandardScheme<getVirtualizers_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_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) {
+ 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, getVirtualizers_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getVirtualizers_argsTupleSchemeFactory implements SchemeFactory {
+ public getVirtualizers_argsTupleScheme getScheme() {
+ return new getVirtualizers_argsTupleScheme();
+ }
+ }
+
+ private static class getVirtualizers_argsTupleScheme extends TupleScheme<getVirtualizers_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getVirtualizers_result implements org.apache.thrift.TBase<getVirtualizers_result, getVirtualizers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getVirtualizers_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getVirtualizers_resultTupleSchemeFactory());
+ }
+
+ public List<Virtualizer> success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Virtualizer.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap);
+ }
+
+ public getVirtualizers_result() {
+ }
+
+ public getVirtualizers_result(
+ List<Virtualizer> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getVirtualizers_result(getVirtualizers_result other) {
+ if (other.isSetSuccess()) {
+ List<Virtualizer> __this__success = new ArrayList<Virtualizer>(other.success.size());
+ for (Virtualizer other_element : other.success) {
+ __this__success.add(new Virtualizer(other_element));
+ }
+ this.success = __this__success;
+ }
+ }
+
+ public getVirtualizers_result deepCopy() {
+ return new getVirtualizers_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<Virtualizer> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(Virtualizer elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<Virtualizer>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<Virtualizer> getSuccess() {
+ return this.success;
+ }
+
+ public getVirtualizers_result setSuccess(List<Virtualizer> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<Virtualizer>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getVirtualizers_result)
+ return this.equals((getVirtualizers_result)that);
+ return false;
+ }
+
+ public boolean equals(getVirtualizers_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getVirtualizers_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getVirtualizers_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getVirtualizers_resultStandardSchemeFactory implements SchemeFactory {
+ public getVirtualizers_resultStandardScheme getScheme() {
+ return new getVirtualizers_resultStandardScheme();
+ }
+ }
+
+ private static class getVirtualizers_resultStandardScheme extends StandardScheme<getVirtualizers_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_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 _list202 = iprot.readListBegin();
+ struct.success = new ArrayList<Virtualizer>(_list202.size);
+ for (int _i203 = 0; _i203 < _list202.size; ++_i203)
+ {
+ Virtualizer _elem204;
+ _elem204 = new Virtualizer();
+ _elem204.read(iprot);
+ struct.success.add(_elem204);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getVirtualizers_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 (Virtualizer _iter205 : struct.success)
+ {
+ _iter205.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getVirtualizers_resultTupleSchemeFactory implements SchemeFactory {
+ public getVirtualizers_resultTupleScheme getScheme() {
+ return new getVirtualizers_resultTupleScheme();
+ }
+ }
+
+ private static class getVirtualizers_resultTupleScheme extends TupleScheme<getVirtualizers_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (Virtualizer _iter206 : struct.success)
+ {
+ _iter206.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list207 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<Virtualizer>(_list207.size);
+ for (int _i208 = 0; _i208 < _list207.size; ++_i208)
+ {
+ Virtualizer _elem209;
+ _elem209 = new Virtualizer();
+ _elem209.read(iprot);
+ struct.success.add(_elem209);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java b/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java
new file mode 100644
index 0000000..1111ecf
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java
@@ -0,0 +1,738 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem, OperatingSystem._Fields>, java.io.Serializable, Cloneable, Comparable<OperatingSystem> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OperatingSystem");
+
+ private static final org.apache.thrift.protocol.TField OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("osId", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField OS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("osName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField VIRTUALIZER_OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtualizerOsId", org.apache.thrift.protocol.TType.MAP, (short)3);
+ private static final org.apache.thrift.protocol.TField ARCHITECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("architecture", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new OperatingSystemStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new OperatingSystemTupleSchemeFactory());
+ }
+
+ public int osId; // required
+ public String osName; // required
+ public Map<String,String> virtualizerOsId; // required
+ public String architecture; // 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 {
+ OS_ID((short)1, "osId"),
+ OS_NAME((short)2, "osName"),
+ VIRTUALIZER_OS_ID((short)3, "virtualizerOsId"),
+ ARCHITECTURE((short)4, "architecture");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // OS_ID
+ return OS_ID;
+ case 2: // OS_NAME
+ return OS_NAME;
+ case 3: // VIRTUALIZER_OS_ID
+ return VIRTUALIZER_OS_ID;
+ case 4: // ARCHITECTURE
+ return ARCHITECTURE;
+ 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 __OSID_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.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.OS_NAME, new org.apache.thrift.meta_data.FieldMetaData("osName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.VIRTUALIZER_OS_ID, new org.apache.thrift.meta_data.FieldMetaData("virtualizerOsId", 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),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.ARCHITECTURE, new org.apache.thrift.meta_data.FieldMetaData("architecture", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OperatingSystem.class, metaDataMap);
+ }
+
+ public OperatingSystem() {
+ }
+
+ public OperatingSystem(
+ int osId,
+ String osName,
+ Map<String,String> virtualizerOsId,
+ String architecture)
+ {
+ this();
+ this.osId = osId;
+ setOsIdIsSet(true);
+ this.osName = osName;
+ this.virtualizerOsId = virtualizerOsId;
+ this.architecture = architecture;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public OperatingSystem(OperatingSystem other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.osId = other.osId;
+ if (other.isSetOsName()) {
+ this.osName = other.osName;
+ }
+ if (other.isSetVirtualizerOsId()) {
+ Map<String,String> __this__virtualizerOsId = new HashMap<String,String>(other.virtualizerOsId);
+ this.virtualizerOsId = __this__virtualizerOsId;
+ }
+ if (other.isSetArchitecture()) {
+ this.architecture = other.architecture;
+ }
+ }
+
+ public OperatingSystem deepCopy() {
+ return new OperatingSystem(this);
+ }
+
+ @Override
+ public void clear() {
+ setOsIdIsSet(false);
+ this.osId = 0;
+ this.osName = null;
+ this.virtualizerOsId = null;
+ this.architecture = null;
+ }
+
+ public int getOsId() {
+ return this.osId;
+ }
+
+ public OperatingSystem setOsId(int osId) {
+ this.osId = osId;
+ setOsIdIsSet(true);
+ return this;
+ }
+
+ public void unsetOsId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ /** Returns true if field osId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOsId() {
+ return EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ }
+
+ public void setOsIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ }
+
+ public String getOsName() {
+ return this.osName;
+ }
+
+ public OperatingSystem setOsName(String osName) {
+ this.osName = osName;
+ return this;
+ }
+
+ public void unsetOsName() {
+ this.osName = null;
+ }
+
+ /** Returns true if field osName is set (has been assigned a value) and false otherwise */
+ public boolean isSetOsName() {
+ return this.osName != null;
+ }
+
+ public void setOsNameIsSet(boolean value) {
+ if (!value) {
+ this.osName = null;
+ }
+ }
+
+ public int getVirtualizerOsIdSize() {
+ return (this.virtualizerOsId == null) ? 0 : this.virtualizerOsId.size();
+ }
+
+ public void putToVirtualizerOsId(String key, String val) {
+ if (this.virtualizerOsId == null) {
+ this.virtualizerOsId = new HashMap<String,String>();
+ }
+ this.virtualizerOsId.put(key, val);
+ }
+
+ public Map<String,String> getVirtualizerOsId() {
+ return this.virtualizerOsId;
+ }
+
+ public OperatingSystem setVirtualizerOsId(Map<String,String> virtualizerOsId) {
+ this.virtualizerOsId = virtualizerOsId;
+ return this;
+ }
+
+ public void unsetVirtualizerOsId() {
+ this.virtualizerOsId = null;
+ }
+
+ /** Returns true if field virtualizerOsId is set (has been assigned a value) and false otherwise */
+ public boolean isSetVirtualizerOsId() {
+ return this.virtualizerOsId != null;
+ }
+
+ public void setVirtualizerOsIdIsSet(boolean value) {
+ if (!value) {
+ this.virtualizerOsId = null;
+ }
+ }
+
+ public String getArchitecture() {
+ return this.architecture;
+ }
+
+ public OperatingSystem setArchitecture(String architecture) {
+ this.architecture = architecture;
+ return this;
+ }
+
+ public void unsetArchitecture() {
+ this.architecture = null;
+ }
+
+ /** Returns true if field architecture is set (has been assigned a value) and false otherwise */
+ public boolean isSetArchitecture() {
+ return this.architecture != null;
+ }
+
+ public void setArchitectureIsSet(boolean value) {
+ if (!value) {
+ this.architecture = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case OS_ID:
+ if (value == null) {
+ unsetOsId();
+ } else {
+ setOsId((Integer)value);
+ }
+ break;
+
+ case OS_NAME:
+ if (value == null) {
+ unsetOsName();
+ } else {
+ setOsName((String)value);
+ }
+ break;
+
+ case VIRTUALIZER_OS_ID:
+ if (value == null) {
+ unsetVirtualizerOsId();
+ } else {
+ setVirtualizerOsId((Map<String,String>)value);
+ }
+ break;
+
+ case ARCHITECTURE:
+ if (value == null) {
+ unsetArchitecture();
+ } else {
+ setArchitecture((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case OS_ID:
+ return Integer.valueOf(getOsId());
+
+ case OS_NAME:
+ return getOsName();
+
+ case VIRTUALIZER_OS_ID:
+ return getVirtualizerOsId();
+
+ case ARCHITECTURE:
+ return getArchitecture();
+
+ }
+ 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 OS_ID:
+ return isSetOsId();
+ case OS_NAME:
+ return isSetOsName();
+ case VIRTUALIZER_OS_ID:
+ return isSetVirtualizerOsId();
+ case ARCHITECTURE:
+ return isSetArchitecture();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof OperatingSystem)
+ return this.equals((OperatingSystem)that);
+ return false;
+ }
+
+ public boolean equals(OperatingSystem that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_osId = true;
+ boolean that_present_osId = true;
+ if (this_present_osId || that_present_osId) {
+ if (!(this_present_osId && that_present_osId))
+ return false;
+ if (this.osId != that.osId)
+ return false;
+ }
+
+ boolean this_present_osName = true && this.isSetOsName();
+ boolean that_present_osName = true && that.isSetOsName();
+ if (this_present_osName || that_present_osName) {
+ if (!(this_present_osName && that_present_osName))
+ return false;
+ if (!this.osName.equals(that.osName))
+ return false;
+ }
+
+ boolean this_present_virtualizerOsId = true && this.isSetVirtualizerOsId();
+ boolean that_present_virtualizerOsId = true && that.isSetVirtualizerOsId();
+ if (this_present_virtualizerOsId || that_present_virtualizerOsId) {
+ if (!(this_present_virtualizerOsId && that_present_virtualizerOsId))
+ return false;
+ if (!this.virtualizerOsId.equals(that.virtualizerOsId))
+ return false;
+ }
+
+ boolean this_present_architecture = true && this.isSetArchitecture();
+ boolean that_present_architecture = true && that.isSetArchitecture();
+ if (this_present_architecture || that_present_architecture) {
+ if (!(this_present_architecture && that_present_architecture))
+ return false;
+ if (!this.architecture.equals(that.architecture))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(OperatingSystem other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOsId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osId, other.osId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOsName()).compareTo(other.isSetOsName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOsName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osName, other.osName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetVirtualizerOsId()).compareTo(other.isSetVirtualizerOsId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVirtualizerOsId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtualizerOsId, other.virtualizerOsId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetArchitecture()).compareTo(other.isSetArchitecture());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetArchitecture()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.architecture, other.architecture);
+ 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("OperatingSystem(");
+ boolean first = true;
+
+ sb.append("osId:");
+ sb.append(this.osId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("osName:");
+ if (this.osName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.osName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("virtualizerOsId:");
+ if (this.virtualizerOsId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.virtualizerOsId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("architecture:");
+ if (this.architecture == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.architecture);
+ }
+ 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 OperatingSystemStandardSchemeFactory implements SchemeFactory {
+ public OperatingSystemStandardScheme getScheme() {
+ return new OperatingSystemStandardScheme();
+ }
+ }
+
+ private static class OperatingSystemStandardScheme extends StandardScheme<OperatingSystem> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, OperatingSystem 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: // OS_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // OS_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.osName = iprot.readString();
+ struct.setOsNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // VIRTUALIZER_OS_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin();
+ struct.virtualizerOsId = new HashMap<String,String>(2*_map24.size);
+ for (int _i25 = 0; _i25 < _map24.size; ++_i25)
+ {
+ String _key26;
+ String _val27;
+ _key26 = iprot.readString();
+ _val27 = iprot.readString();
+ struct.virtualizerOsId.put(_key26, _val27);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setVirtualizerOsIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // ARCHITECTURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.architecture = iprot.readString();
+ struct.setArchitectureIsSet(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, OperatingSystem struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(OS_ID_FIELD_DESC);
+ oprot.writeI32(struct.osId);
+ oprot.writeFieldEnd();
+ if (struct.osName != null) {
+ oprot.writeFieldBegin(OS_NAME_FIELD_DESC);
+ oprot.writeString(struct.osName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.virtualizerOsId != null) {
+ oprot.writeFieldBegin(VIRTUALIZER_OS_ID_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.virtualizerOsId.size()));
+ for (Map.Entry<String, String> _iter28 : struct.virtualizerOsId.entrySet())
+ {
+ oprot.writeString(_iter28.getKey());
+ oprot.writeString(_iter28.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.architecture != null) {
+ oprot.writeFieldBegin(ARCHITECTURE_FIELD_DESC);
+ oprot.writeString(struct.architecture);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class OperatingSystemTupleSchemeFactory implements SchemeFactory {
+ public OperatingSystemTupleScheme getScheme() {
+ return new OperatingSystemTupleScheme();
+ }
+ }
+
+ private static class OperatingSystemTupleScheme extends TupleScheme<OperatingSystem> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, OperatingSystem struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOsId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetOsName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetVirtualizerOsId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetArchitecture()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetOsId()) {
+ oprot.writeI32(struct.osId);
+ }
+ if (struct.isSetOsName()) {
+ oprot.writeString(struct.osName);
+ }
+ if (struct.isSetVirtualizerOsId()) {
+ {
+ oprot.writeI32(struct.virtualizerOsId.size());
+ for (Map.Entry<String, String> _iter29 : struct.virtualizerOsId.entrySet())
+ {
+ oprot.writeString(_iter29.getKey());
+ oprot.writeString(_iter29.getValue());
+ }
+ }
+ }
+ if (struct.isSetArchitecture()) {
+ oprot.writeString(struct.architecture);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, OperatingSystem struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.osId = iprot.readI32();
+ struct.setOsIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.osName = iprot.readString();
+ struct.setOsNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TMap _map30 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.virtualizerOsId = new HashMap<String,String>(2*_map30.size);
+ for (int _i31 = 0; _i31 < _map30.size; ++_i31)
+ {
+ String _key32;
+ String _val33;
+ _key32 = iprot.readString();
+ _val33 = iprot.readString();
+ struct.virtualizerOsId.put(_key32, _val33);
+ }
+ }
+ struct.setVirtualizerOsIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.architecture = iprot.readString();
+ struct.setArchitectureIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Organization.java b/src/main/java/org/openslx/bwlp/thrift/iface/Organization.java
new file mode 100644
index 0000000..deffe29
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Organization.java
@@ -0,0 +1,737 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Organization implements org.apache.thrift.TBase<Organization, Organization._Fields>, java.io.Serializable, Cloneable, Comparable<Organization> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Organization");
+
+ private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField ECP_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("ecpUrl", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField SUFFIX_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("suffixList", org.apache.thrift.protocol.TType.LIST, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new OrganizationStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new OrganizationTupleSchemeFactory());
+ }
+
+ public String organizationId; // required
+ public String displayName; // required
+ public String ecpUrl; // required
+ public List<String> suffixList; // 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 {
+ ORGANIZATION_ID((short)1, "organizationId"),
+ DISPLAY_NAME((short)2, "displayName"),
+ ECP_URL((short)3, "ecpUrl"),
+ SUFFIX_LIST((short)4, "suffixList");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ORGANIZATION_ID
+ return ORGANIZATION_ID;
+ case 2: // DISPLAY_NAME
+ return DISPLAY_NAME;
+ case 3: // ECP_URL
+ return ECP_URL;
+ case 4: // SUFFIX_LIST
+ return SUFFIX_LIST;
+ 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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ECP_URL, new org.apache.thrift.meta_data.FieldMetaData("ecpUrl", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SUFFIX_LIST, new org.apache.thrift.meta_data.FieldMetaData("suffixList", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Organization.class, metaDataMap);
+ }
+
+ public Organization() {
+ }
+
+ public Organization(
+ String organizationId,
+ String displayName,
+ String ecpUrl,
+ List<String> suffixList)
+ {
+ this();
+ this.organizationId = organizationId;
+ this.displayName = displayName;
+ this.ecpUrl = ecpUrl;
+ this.suffixList = suffixList;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Organization(Organization other) {
+ if (other.isSetOrganizationId()) {
+ this.organizationId = other.organizationId;
+ }
+ if (other.isSetDisplayName()) {
+ this.displayName = other.displayName;
+ }
+ if (other.isSetEcpUrl()) {
+ this.ecpUrl = other.ecpUrl;
+ }
+ if (other.isSetSuffixList()) {
+ List<String> __this__suffixList = new ArrayList<String>(other.suffixList);
+ this.suffixList = __this__suffixList;
+ }
+ }
+
+ public Organization deepCopy() {
+ return new Organization(this);
+ }
+
+ @Override
+ public void clear() {
+ this.organizationId = null;
+ this.displayName = null;
+ this.ecpUrl = null;
+ this.suffixList = null;
+ }
+
+ public String getOrganizationId() {
+ return this.organizationId;
+ }
+
+ public Organization setOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ public void unsetOrganizationId() {
+ this.organizationId = null;
+ }
+
+ /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOrganizationId() {
+ return this.organizationId != null;
+ }
+
+ public void setOrganizationIdIsSet(boolean value) {
+ if (!value) {
+ this.organizationId = null;
+ }
+ }
+
+ public String getDisplayName() {
+ return this.displayName;
+ }
+
+ public Organization setDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ public void unsetDisplayName() {
+ this.displayName = null;
+ }
+
+ /** Returns true if field displayName is set (has been assigned a value) and false otherwise */
+ public boolean isSetDisplayName() {
+ return this.displayName != null;
+ }
+
+ public void setDisplayNameIsSet(boolean value) {
+ if (!value) {
+ this.displayName = null;
+ }
+ }
+
+ public String getEcpUrl() {
+ return this.ecpUrl;
+ }
+
+ public Organization setEcpUrl(String ecpUrl) {
+ this.ecpUrl = ecpUrl;
+ return this;
+ }
+
+ public void unsetEcpUrl() {
+ this.ecpUrl = null;
+ }
+
+ /** Returns true if field ecpUrl is set (has been assigned a value) and false otherwise */
+ public boolean isSetEcpUrl() {
+ return this.ecpUrl != null;
+ }
+
+ public void setEcpUrlIsSet(boolean value) {
+ if (!value) {
+ this.ecpUrl = null;
+ }
+ }
+
+ public int getSuffixListSize() {
+ return (this.suffixList == null) ? 0 : this.suffixList.size();
+ }
+
+ public java.util.Iterator<String> getSuffixListIterator() {
+ return (this.suffixList == null) ? null : this.suffixList.iterator();
+ }
+
+ public void addToSuffixList(String elem) {
+ if (this.suffixList == null) {
+ this.suffixList = new ArrayList<String>();
+ }
+ this.suffixList.add(elem);
+ }
+
+ public List<String> getSuffixList() {
+ return this.suffixList;
+ }
+
+ public Organization setSuffixList(List<String> suffixList) {
+ this.suffixList = suffixList;
+ return this;
+ }
+
+ public void unsetSuffixList() {
+ this.suffixList = null;
+ }
+
+ /** Returns true if field suffixList is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuffixList() {
+ return this.suffixList != null;
+ }
+
+ public void setSuffixListIsSet(boolean value) {
+ if (!value) {
+ this.suffixList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ if (value == null) {
+ unsetOrganizationId();
+ } else {
+ setOrganizationId((String)value);
+ }
+ break;
+
+ case DISPLAY_NAME:
+ if (value == null) {
+ unsetDisplayName();
+ } else {
+ setDisplayName((String)value);
+ }
+ break;
+
+ case ECP_URL:
+ if (value == null) {
+ unsetEcpUrl();
+ } else {
+ setEcpUrl((String)value);
+ }
+ break;
+
+ case SUFFIX_LIST:
+ if (value == null) {
+ unsetSuffixList();
+ } else {
+ setSuffixList((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ORGANIZATION_ID:
+ return getOrganizationId();
+
+ case DISPLAY_NAME:
+ return getDisplayName();
+
+ case ECP_URL:
+ return getEcpUrl();
+
+ case SUFFIX_LIST:
+ return getSuffixList();
+
+ }
+ 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 ORGANIZATION_ID:
+ return isSetOrganizationId();
+ case DISPLAY_NAME:
+ return isSetDisplayName();
+ case ECP_URL:
+ return isSetEcpUrl();
+ case SUFFIX_LIST:
+ return isSetSuffixList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Organization)
+ return this.equals((Organization)that);
+ return false;
+ }
+
+ public boolean equals(Organization that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_organizationId = true && this.isSetOrganizationId();
+ boolean that_present_organizationId = true && that.isSetOrganizationId();
+ if (this_present_organizationId || that_present_organizationId) {
+ if (!(this_present_organizationId && that_present_organizationId))
+ return false;
+ if (!this.organizationId.equals(that.organizationId))
+ return false;
+ }
+
+ boolean this_present_displayName = true && this.isSetDisplayName();
+ boolean that_present_displayName = true && that.isSetDisplayName();
+ if (this_present_displayName || that_present_displayName) {
+ if (!(this_present_displayName && that_present_displayName))
+ return false;
+ if (!this.displayName.equals(that.displayName))
+ return false;
+ }
+
+ boolean this_present_ecpUrl = true && this.isSetEcpUrl();
+ boolean that_present_ecpUrl = true && that.isSetEcpUrl();
+ if (this_present_ecpUrl || that_present_ecpUrl) {
+ if (!(this_present_ecpUrl && that_present_ecpUrl))
+ return false;
+ if (!this.ecpUrl.equals(that.ecpUrl))
+ return false;
+ }
+
+ boolean this_present_suffixList = true && this.isSetSuffixList();
+ boolean that_present_suffixList = true && that.isSetSuffixList();
+ if (this_present_suffixList || that_present_suffixList) {
+ if (!(this_present_suffixList && that_present_suffixList))
+ return false;
+ if (!this.suffixList.equals(that.suffixList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Organization other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOrganizationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDisplayName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEcpUrl()).compareTo(other.isSetEcpUrl());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEcpUrl()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ecpUrl, other.ecpUrl);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSuffixList()).compareTo(other.isSetSuffixList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuffixList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.suffixList, other.suffixList);
+ 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("Organization(");
+ boolean first = true;
+
+ sb.append("organizationId:");
+ if (this.organizationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.organizationId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("displayName:");
+ if (this.displayName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.displayName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("ecpUrl:");
+ if (this.ecpUrl == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ecpUrl);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("suffixList:");
+ if (this.suffixList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.suffixList);
+ }
+ 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 OrganizationStandardSchemeFactory implements SchemeFactory {
+ public OrganizationStandardScheme getScheme() {
+ return new OrganizationStandardScheme();
+ }
+ }
+
+ private static class OrganizationStandardScheme extends StandardScheme<Organization> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Organization 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: // ORGANIZATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DISPLAY_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.displayName = iprot.readString();
+ struct.setDisplayNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ECP_URL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.ecpUrl = iprot.readString();
+ struct.setEcpUrlIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // SUFFIX_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.suffixList = new ArrayList<String>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ String _elem2;
+ _elem2 = iprot.readString();
+ struct.suffixList.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuffixListIsSet(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, Organization struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.organizationId != null) {
+ oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
+ oprot.writeString(struct.organizationId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.displayName != null) {
+ oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC);
+ oprot.writeString(struct.displayName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.ecpUrl != null) {
+ oprot.writeFieldBegin(ECP_URL_FIELD_DESC);
+ oprot.writeString(struct.ecpUrl);
+ oprot.writeFieldEnd();
+ }
+ if (struct.suffixList != null) {
+ oprot.writeFieldBegin(SUFFIX_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.suffixList.size()));
+ for (String _iter3 : struct.suffixList)
+ {
+ oprot.writeString(_iter3);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class OrganizationTupleSchemeFactory implements SchemeFactory {
+ public OrganizationTupleScheme getScheme() {
+ return new OrganizationTupleScheme();
+ }
+ }
+
+ private static class OrganizationTupleScheme extends TupleScheme<Organization> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Organization struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetOrganizationId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDisplayName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetEcpUrl()) {
+ optionals.set(2);
+ }
+ if (struct.isSetSuffixList()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetOrganizationId()) {
+ oprot.writeString(struct.organizationId);
+ }
+ if (struct.isSetDisplayName()) {
+ oprot.writeString(struct.displayName);
+ }
+ if (struct.isSetEcpUrl()) {
+ oprot.writeString(struct.ecpUrl);
+ }
+ if (struct.isSetSuffixList()) {
+ {
+ oprot.writeI32(struct.suffixList.size());
+ for (String _iter4 : struct.suffixList)
+ {
+ oprot.writeString(_iter4);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Organization struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.displayName = iprot.readString();
+ struct.setDisplayNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.ecpUrl = iprot.readString();
+ struct.setEcpUrlIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.suffixList = new ArrayList<String>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ String _elem7;
+ _elem7 = iprot.readString();
+ struct.suffixList.add(_elem7);
+ }
+ }
+ struct.setSuffixListIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java b/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java
new file mode 100644
index 0000000..81365b7
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java
@@ -0,0 +1,537 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._Fields>, java.io.Serializable, Cloneable, Comparable<Satellite> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Satellite");
+
+ private static final org.apache.thrift.protocol.TField ADDRESS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("addressList", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SatelliteStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SatelliteTupleSchemeFactory());
+ }
+
+ public List<String> addressList; // required
+ public String displayName; // 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 {
+ ADDRESS_LIST((short)1, "addressList"),
+ DISPLAY_NAME((short)2, "displayName");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ADDRESS_LIST
+ return ADDRESS_LIST;
+ case 2: // DISPLAY_NAME
+ return DISPLAY_NAME;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.ADDRESS_LIST, new org.apache.thrift.meta_data.FieldMetaData("addressList", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Satellite.class, metaDataMap);
+ }
+
+ public Satellite() {
+ }
+
+ public Satellite(
+ List<String> addressList,
+ String displayName)
+ {
+ this();
+ this.addressList = addressList;
+ this.displayName = displayName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Satellite(Satellite other) {
+ if (other.isSetAddressList()) {
+ List<String> __this__addressList = new ArrayList<String>(other.addressList);
+ this.addressList = __this__addressList;
+ }
+ if (other.isSetDisplayName()) {
+ this.displayName = other.displayName;
+ }
+ }
+
+ public Satellite deepCopy() {
+ return new Satellite(this);
+ }
+
+ @Override
+ public void clear() {
+ this.addressList = null;
+ this.displayName = null;
+ }
+
+ public int getAddressListSize() {
+ return (this.addressList == null) ? 0 : this.addressList.size();
+ }
+
+ public java.util.Iterator<String> getAddressListIterator() {
+ return (this.addressList == null) ? null : this.addressList.iterator();
+ }
+
+ public void addToAddressList(String elem) {
+ if (this.addressList == null) {
+ this.addressList = new ArrayList<String>();
+ }
+ this.addressList.add(elem);
+ }
+
+ public List<String> getAddressList() {
+ return this.addressList;
+ }
+
+ public Satellite setAddressList(List<String> addressList) {
+ this.addressList = addressList;
+ return this;
+ }
+
+ public void unsetAddressList() {
+ this.addressList = null;
+ }
+
+ /** Returns true if field addressList is set (has been assigned a value) and false otherwise */
+ public boolean isSetAddressList() {
+ return this.addressList != null;
+ }
+
+ public void setAddressListIsSet(boolean value) {
+ if (!value) {
+ this.addressList = null;
+ }
+ }
+
+ public String getDisplayName() {
+ return this.displayName;
+ }
+
+ public Satellite setDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ public void unsetDisplayName() {
+ this.displayName = null;
+ }
+
+ /** Returns true if field displayName is set (has been assigned a value) and false otherwise */
+ public boolean isSetDisplayName() {
+ return this.displayName != null;
+ }
+
+ public void setDisplayNameIsSet(boolean value) {
+ if (!value) {
+ this.displayName = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ADDRESS_LIST:
+ if (value == null) {
+ unsetAddressList();
+ } else {
+ setAddressList((List<String>)value);
+ }
+ break;
+
+ case DISPLAY_NAME:
+ if (value == null) {
+ unsetDisplayName();
+ } else {
+ setDisplayName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ADDRESS_LIST:
+ return getAddressList();
+
+ case DISPLAY_NAME:
+ return getDisplayName();
+
+ }
+ 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 ADDRESS_LIST:
+ return isSetAddressList();
+ case DISPLAY_NAME:
+ return isSetDisplayName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Satellite)
+ return this.equals((Satellite)that);
+ return false;
+ }
+
+ public boolean equals(Satellite that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_addressList = true && this.isSetAddressList();
+ boolean that_present_addressList = true && that.isSetAddressList();
+ if (this_present_addressList || that_present_addressList) {
+ if (!(this_present_addressList && that_present_addressList))
+ return false;
+ if (!this.addressList.equals(that.addressList))
+ return false;
+ }
+
+ boolean this_present_displayName = true && this.isSetDisplayName();
+ boolean that_present_displayName = true && that.isSetDisplayName();
+ if (this_present_displayName || that_present_displayName) {
+ if (!(this_present_displayName && that_present_displayName))
+ return false;
+ if (!this.displayName.equals(that.displayName))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Satellite other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetAddressList()).compareTo(other.isSetAddressList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAddressList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressList, other.addressList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDisplayName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName);
+ 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("Satellite(");
+ boolean first = true;
+
+ sb.append("addressList:");
+ if (this.addressList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.addressList);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("displayName:");
+ if (this.displayName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.displayName);
+ }
+ 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 SatelliteStandardSchemeFactory implements SchemeFactory {
+ public SatelliteStandardScheme getScheme() {
+ return new SatelliteStandardScheme();
+ }
+ }
+
+ private static class SatelliteStandardScheme extends StandardScheme<Satellite> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Satellite 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: // ADDRESS_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+ struct.addressList = new ArrayList<String>(_list8.size);
+ for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+ {
+ String _elem10;
+ _elem10 = iprot.readString();
+ struct.addressList.add(_elem10);
+ }
+ iprot.readListEnd();
+ }
+ struct.setAddressListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DISPLAY_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.displayName = iprot.readString();
+ struct.setDisplayNameIsSet(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, Satellite struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.addressList != null) {
+ oprot.writeFieldBegin(ADDRESS_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addressList.size()));
+ for (String _iter11 : struct.addressList)
+ {
+ oprot.writeString(_iter11);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.displayName != null) {
+ oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC);
+ oprot.writeString(struct.displayName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SatelliteTupleSchemeFactory implements SchemeFactory {
+ public SatelliteTupleScheme getScheme() {
+ return new SatelliteTupleScheme();
+ }
+ }
+
+ private static class SatelliteTupleScheme extends TupleScheme<Satellite> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Satellite struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetAddressList()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDisplayName()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetAddressList()) {
+ {
+ oprot.writeI32(struct.addressList.size());
+ for (String _iter12 : struct.addressList)
+ {
+ oprot.writeString(_iter12);
+ }
+ }
+ }
+ if (struct.isSetDisplayName()) {
+ oprot.writeString(struct.displayName);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Satellite struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.addressList = new ArrayList<String>(_list13.size);
+ for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ {
+ String _elem15;
+ _elem15 = iprot.readString();
+ struct.addressList.add(_elem15);
+ }
+ }
+ struct.setAddressListIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.displayName = iprot.readString();
+ struct.setDisplayNameIsSet(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
new file mode 100644
index 0000000..64578d6
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
@@ -0,0 +1,27610 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SatelliteServer {
+
+ public interface Iface {
+
+ public long getVersion() throws org.apache.thrift.TException;
+
+ public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes) throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException;
+
+ public void cancelUpload(String uploadToken) throws org.apache.thrift.TException;
+
+ public UploadStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
+
+ public TransferInformation requestDownload(String userToken, String imageVersionId) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public void cancelDownload(String downloadToken) throws org.apache.thrift.TException;
+
+ public boolean isAuthenticated(String userToken) throws org.apache.thrift.TException;
+
+ public void invalidateSession(String userToken) throws org.apache.thrift.TException;
+
+ public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException;
+
+ public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException;
+
+ public List<Organization> getAllOrganizations() throws org.apache.thrift.TException;
+
+ public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public boolean updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public boolean updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public boolean deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public boolean writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public Map<String,ImagePermissions> getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public boolean updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public List<LectureSummary> getLectureList(String userToken) throws TAuthorizationException, org.apache.thrift.TException;
+
+ public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public List<LectureSummary> getLecturesByImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public boolean deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public boolean writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ public Map<String,LecturePermissions> getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void getVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getImageList(String userToken, List<String> tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getLectureList(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getLecturesByImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public long getVersion() throws org.apache.thrift.TException
+ {
+ send_getVersion();
+ return recv_getVersion();
+ }
+
+ public void send_getVersion() throws org.apache.thrift.TException
+ {
+ getVersion_args args = new getVersion_args();
+ sendBase("getVersion", args);
+ }
+
+ public long recv_getVersion() throws org.apache.thrift.TException
+ {
+ getVersion_result result = new getVersion_result();
+ receiveBase(result, "getVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result");
+ }
+
+ public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes) throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException
+ {
+ send_requestImageVersionUpload(userToken, imageBaseId, fileSize, blockHashes);
+ return recv_requestImageVersionUpload();
+ }
+
+ public void send_requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes) throws org.apache.thrift.TException
+ {
+ requestImageVersionUpload_args args = new requestImageVersionUpload_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.setFileSize(fileSize);
+ args.setBlockHashes(blockHashes);
+ sendBase("requestImageVersionUpload", args);
+ }
+
+ public TransferInformation recv_requestImageVersionUpload() throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException
+ {
+ requestImageVersionUpload_result result = new requestImageVersionUpload_result();
+ receiveBase(result, "requestImageVersionUpload");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.rejection != null) {
+ throw result.rejection;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageVersionUpload failed: unknown result");
+ }
+
+ public void cancelUpload(String uploadToken) throws org.apache.thrift.TException
+ {
+ send_cancelUpload(uploadToken);
+ recv_cancelUpload();
+ }
+
+ public void send_cancelUpload(String uploadToken) throws org.apache.thrift.TException
+ {
+ cancelUpload_args args = new cancelUpload_args();
+ args.setUploadToken(uploadToken);
+ sendBase("cancelUpload", args);
+ }
+
+ public void recv_cancelUpload() throws org.apache.thrift.TException
+ {
+ cancelUpload_result result = new cancelUpload_result();
+ receiveBase(result, "cancelUpload");
+ return;
+ }
+
+ public UploadStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
+ {
+ send_queryUploadStatus(uploadToken);
+ return recv_queryUploadStatus();
+ }
+
+ public void send_queryUploadStatus(String uploadToken) throws org.apache.thrift.TException
+ {
+ queryUploadStatus_args args = new queryUploadStatus_args();
+ args.setUploadToken(uploadToken);
+ sendBase("queryUploadStatus", args);
+ }
+
+ public UploadStatus recv_queryUploadStatus() throws TInvalidTokenException, org.apache.thrift.TException
+ {
+ queryUploadStatus_result result = new queryUploadStatus_result();
+ receiveBase(result, "queryUploadStatus");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.ex1 != null) {
+ throw result.ex1;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryUploadStatus failed: unknown result");
+ }
+
+ public TransferInformation requestDownload(String userToken, String imageVersionId) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_requestDownload(userToken, imageVersionId);
+ return recv_requestDownload();
+ }
+
+ public void send_requestDownload(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ {
+ requestDownload_args args = new requestDownload_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ sendBase("requestDownload", args);
+ }
+
+ public TransferInformation recv_requestDownload() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ requestDownload_result result = new requestDownload_result();
+ receiveBase(result, "requestDownload");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestDownload failed: unknown result");
+ }
+
+ public void cancelDownload(String downloadToken) throws org.apache.thrift.TException
+ {
+ send_cancelDownload(downloadToken);
+ recv_cancelDownload();
+ }
+
+ public void send_cancelDownload(String downloadToken) throws org.apache.thrift.TException
+ {
+ cancelDownload_args args = new cancelDownload_args();
+ args.setDownloadToken(downloadToken);
+ sendBase("cancelDownload", args);
+ }
+
+ public void recv_cancelDownload() throws org.apache.thrift.TException
+ {
+ cancelDownload_result result = new cancelDownload_result();
+ receiveBase(result, "cancelDownload");
+ return;
+ }
+
+ public boolean isAuthenticated(String userToken) throws org.apache.thrift.TException
+ {
+ send_isAuthenticated(userToken);
+ return recv_isAuthenticated();
+ }
+
+ public void send_isAuthenticated(String userToken) throws org.apache.thrift.TException
+ {
+ isAuthenticated_args args = new isAuthenticated_args();
+ args.setUserToken(userToken);
+ sendBase("isAuthenticated", args);
+ }
+
+ public boolean recv_isAuthenticated() throws org.apache.thrift.TException
+ {
+ isAuthenticated_result result = new isAuthenticated_result();
+ receiveBase(result, "isAuthenticated");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isAuthenticated failed: unknown result");
+ }
+
+ public void invalidateSession(String userToken) throws org.apache.thrift.TException
+ {
+ send_invalidateSession(userToken);
+ recv_invalidateSession();
+ }
+
+ public void send_invalidateSession(String userToken) throws org.apache.thrift.TException
+ {
+ invalidateSession_args args = new invalidateSession_args();
+ args.setUserToken(userToken);
+ sendBase("invalidateSession", args);
+ }
+
+ public void recv_invalidateSession() throws org.apache.thrift.TException
+ {
+ invalidateSession_result result = new invalidateSession_result();
+ receiveBase(result, "invalidateSession");
+ return;
+ }
+
+ public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException
+ {
+ send_getOperatingSystems();
+ return recv_getOperatingSystems();
+ }
+
+ public void send_getOperatingSystems() throws org.apache.thrift.TException
+ {
+ getOperatingSystems_args args = new getOperatingSystems_args();
+ sendBase("getOperatingSystems", args);
+ }
+
+ public List<OperatingSystem> recv_getOperatingSystems() throws org.apache.thrift.TException
+ {
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ receiveBase(result, "getOperatingSystems");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result");
+ }
+
+ public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException
+ {
+ send_getVirtualizers();
+ return recv_getVirtualizers();
+ }
+
+ public void send_getVirtualizers() throws org.apache.thrift.TException
+ {
+ getVirtualizers_args args = new getVirtualizers_args();
+ sendBase("getVirtualizers", args);
+ }
+
+ public List<Virtualizer> recv_getVirtualizers() throws org.apache.thrift.TException
+ {
+ getVirtualizers_result result = new getVirtualizers_result();
+ receiveBase(result, "getVirtualizers");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result");
+ }
+
+ public List<Organization> getAllOrganizations() throws org.apache.thrift.TException
+ {
+ send_getAllOrganizations();
+ return recv_getAllOrganizations();
+ }
+
+ public void send_getAllOrganizations() throws org.apache.thrift.TException
+ {
+ getAllOrganizations_args args = new getAllOrganizations_args();
+ sendBase("getAllOrganizations", args);
+ }
+
+ public List<Organization> recv_getAllOrganizations() throws org.apache.thrift.TException
+ {
+ getAllOrganizations_result result = new getAllOrganizations_result();
+ receiveBase(result, "getAllOrganizations");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOrganizations failed: unknown result");
+ }
+
+ public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_getImageList(userToken, tagSearch);
+ return recv_getImageList();
+ }
+
+ public void send_getImageList(String userToken, List<String> tagSearch) throws org.apache.thrift.TException
+ {
+ getImageList_args args = new getImageList_args();
+ args.setUserToken(userToken);
+ args.setTagSearch(tagSearch);
+ sendBase("getImageList", args);
+ }
+
+ public List<ImageSummaryRead> recv_getImageList() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ getImageList_result result = new getImageList_result();
+ receiveBase(result, "getImageList");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageList failed: unknown result");
+ }
+
+ public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_getImageDetails(userToken, imageBaseId);
+ return recv_getImageDetails();
+ }
+
+ public void send_getImageDetails(String userToken, String imageBaseId) throws org.apache.thrift.TException
+ {
+ getImageDetails_args args = new getImageDetails_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ sendBase("getImageDetails", args);
+ }
+
+ public ImageDetailsRead recv_getImageDetails() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ getImageDetails_result result = new getImageDetails_result();
+ receiveBase(result, "getImageDetails");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result");
+ }
+
+ public boolean updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_updateImageBase(userToken, imageBaseId, image);
+ return recv_updateImageBase();
+ }
+
+ public void send_updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws org.apache.thrift.TException
+ {
+ updateImageBase_args args = new updateImageBase_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.setImage(image);
+ sendBase("updateImageBase", args);
+ }
+
+ public boolean recv_updateImageBase() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ updateImageBase_result result = new updateImageBase_result();
+ receiveBase(result, "updateImageBase");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageBase failed: unknown result");
+ }
+
+ public boolean updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_updateImageVersion(userToken, imageVersionId, image);
+ return recv_updateImageVersion();
+ }
+
+ public void send_updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws org.apache.thrift.TException
+ {
+ updateImageVersion_args args = new updateImageVersion_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ args.setImage(image);
+ sendBase("updateImageVersion", args);
+ }
+
+ public boolean recv_updateImageVersion() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ updateImageVersion_result result = new updateImageVersion_result();
+ receiveBase(result, "updateImageVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageVersion failed: unknown result");
+ }
+
+ public boolean deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_deleteImageVersion(userToken, imageVersionId);
+ return recv_deleteImageVersion();
+ }
+
+ public void send_deleteImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ {
+ deleteImageVersion_args args = new deleteImageVersion_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ sendBase("deleteImageVersion", args);
+ }
+
+ public boolean recv_deleteImageVersion() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ deleteImageVersion_result result = new deleteImageVersion_result();
+ receiveBase(result, "deleteImageVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteImageVersion failed: unknown result");
+ }
+
+ public boolean writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_writeImagePermissions(userToken, imageId, permissions);
+ return recv_writeImagePermissions();
+ }
+
+ public void send_writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions) throws org.apache.thrift.TException
+ {
+ writeImagePermissions_args args = new writeImagePermissions_args();
+ args.setUserToken(userToken);
+ args.setImageId(imageId);
+ args.setPermissions(permissions);
+ sendBase("writeImagePermissions", args);
+ }
+
+ public boolean recv_writeImagePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ writeImagePermissions_result result = new writeImagePermissions_result();
+ receiveBase(result, "writeImagePermissions");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeImagePermissions failed: unknown result");
+ }
+
+ public Map<String,ImagePermissions> getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_getImagePermissions(userToken, imageBaseId);
+ return recv_getImagePermissions();
+ }
+
+ public void send_getImagePermissions(String userToken, String imageBaseId) throws org.apache.thrift.TException
+ {
+ getImagePermissions_args args = new getImagePermissions_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ sendBase("getImagePermissions", args);
+ }
+
+ public Map<String,ImagePermissions> recv_getImagePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ getImagePermissions_result result = new getImagePermissions_result();
+ receiveBase(result, "getImagePermissions");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImagePermissions failed: unknown result");
+ }
+
+ public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_createLecture(userToken, lecture);
+ return recv_createLecture();
+ }
+
+ public void send_createLecture(String userToken, LectureWrite lecture) throws org.apache.thrift.TException
+ {
+ createLecture_args args = new createLecture_args();
+ args.setUserToken(userToken);
+ args.setLecture(lecture);
+ sendBase("createLecture", args);
+ }
+
+ public String recv_createLecture() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ createLecture_result result = new createLecture_result();
+ receiveBase(result, "createLecture");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLecture failed: unknown result");
+ }
+
+ public boolean updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_updateLecture(userToken, lectureId, lecture);
+ return recv_updateLecture();
+ }
+
+ public void send_updateLecture(String userToken, String lectureId, LectureWrite lecture) throws org.apache.thrift.TException
+ {
+ updateLecture_args args = new updateLecture_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ args.setLecture(lecture);
+ sendBase("updateLecture", args);
+ }
+
+ public boolean recv_updateLecture() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ updateLecture_result result = new updateLecture_result();
+ receiveBase(result, "updateLecture");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateLecture failed: unknown result");
+ }
+
+ public List<LectureSummary> getLectureList(String userToken) throws TAuthorizationException, org.apache.thrift.TException
+ {
+ send_getLectureList(userToken);
+ return recv_getLectureList();
+ }
+
+ public void send_getLectureList(String userToken) throws org.apache.thrift.TException
+ {
+ getLectureList_args args = new getLectureList_args();
+ args.setUserToken(userToken);
+ sendBase("getLectureList", args);
+ }
+
+ public List<LectureSummary> recv_getLectureList() throws TAuthorizationException, org.apache.thrift.TException
+ {
+ getLectureList_result result = new getLectureList_result();
+ receiveBase(result, "getLectureList");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureList failed: unknown result");
+ }
+
+ public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_getLectureDetails(userToken, lectureId);
+ return recv_getLectureDetails();
+ }
+
+ public void send_getLectureDetails(String userToken, String lectureId) throws org.apache.thrift.TException
+ {
+ getLectureDetails_args args = new getLectureDetails_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ sendBase("getLectureDetails", args);
+ }
+
+ public LectureRead recv_getLectureDetails() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ getLectureDetails_result result = new getLectureDetails_result();
+ receiveBase(result, "getLectureDetails");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureDetails failed: unknown result");
+ }
+
+ public List<LectureSummary> getLecturesByImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_getLecturesByImageVersion(userToken, imageVersionId);
+ return recv_getLecturesByImageVersion();
+ }
+
+ public void send_getLecturesByImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ {
+ getLecturesByImageVersion_args args = new getLecturesByImageVersion_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ sendBase("getLecturesByImageVersion", args);
+ }
+
+ public List<LectureSummary> recv_getLecturesByImageVersion() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ getLecturesByImageVersion_result result = new getLecturesByImageVersion_result();
+ receiveBase(result, "getLecturesByImageVersion");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturesByImageVersion failed: unknown result");
+ }
+
+ public boolean deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_deleteLecture(userToken, lectureId);
+ return recv_deleteLecture();
+ }
+
+ public void send_deleteLecture(String userToken, String lectureId) throws org.apache.thrift.TException
+ {
+ deleteLecture_args args = new deleteLecture_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ sendBase("deleteLecture", args);
+ }
+
+ public boolean recv_deleteLecture() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ deleteLecture_result result = new deleteLecture_result();
+ receiveBase(result, "deleteLecture");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteLecture failed: unknown result");
+ }
+
+ public boolean writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_writeLecturePermissions(userToken, lectureId, permissions);
+ return recv_writeLecturePermissions();
+ }
+
+ public void send_writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws org.apache.thrift.TException
+ {
+ writeLecturePermissions_args args = new writeLecturePermissions_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ args.setPermissions(permissions);
+ sendBase("writeLecturePermissions", args);
+ }
+
+ public boolean recv_writeLecturePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ writeLecturePermissions_result result = new writeLecturePermissions_result();
+ receiveBase(result, "writeLecturePermissions");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeLecturePermissions failed: unknown result");
+ }
+
+ public Map<String,LecturePermissions> getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ send_getLecturePermissions(userToken, lectureId);
+ return recv_getLecturePermissions();
+ }
+
+ public void send_getLecturePermissions(String userToken, String lectureId) throws org.apache.thrift.TException
+ {
+ getLecturePermissions_args args = new getLecturePermissions_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ sendBase("getLecturePermissions", args);
+ }
+
+ public Map<String,LecturePermissions> recv_getLecturePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException
+ {
+ getLecturePermissions_result result = new getLecturePermissions_result();
+ receiveBase(result, "getLecturePermissions");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.authError != null) {
+ throw result.authError;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturePermissions failed: unknown result");
+ }
+
+ }
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void getVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getVersion_call method_call = new getVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getVersion_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getVersion_args args = new getVersion_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public long getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getVersion();
+ }
+ }
+
+ public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ requestImageVersionUpload_call method_call = new requestImageVersionUpload_call(userToken, imageBaseId, fileSize, blockHashes, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class requestImageVersionUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageBaseId;
+ private long fileSize;
+ private List<ByteBuffer> blockHashes;
+ public requestImageVersionUpload_call(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ this.fileSize = fileSize;
+ this.blockHashes = blockHashes;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestImageVersionUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ requestImageVersionUpload_args args = new requestImageVersionUpload_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.setFileSize(fileSize);
+ args.setBlockHashes(blockHashes);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, 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_requestImageVersionUpload();
+ }
+ }
+
+ public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ cancelUpload_call method_call = new cancelUpload_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class cancelUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String uploadToken;
+ public cancelUpload_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.uploadToken = uploadToken;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ cancelUpload_args args = new cancelUpload_args();
+ args.setUploadToken(uploadToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_cancelUpload();
+ }
+ }
+
+ public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ queryUploadStatus_call method_call = new queryUploadStatus_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class queryUploadStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String uploadToken;
+ public queryUploadStatus_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.uploadToken = uploadToken;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryUploadStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ queryUploadStatus_args args = new queryUploadStatus_args();
+ args.setUploadToken(uploadToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public UploadStatus getResult() throws TInvalidTokenException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_queryUploadStatus();
+ }
+ }
+
+ public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ requestDownload_call method_call = new requestDownload_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class requestDownload_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageVersionId;
+ public requestDownload_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestDownload", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ requestDownload_args args = new requestDownload_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public TransferInformation getResult() throws TAuthorizationException, 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_requestDownload();
+ }
+ }
+
+ public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ cancelDownload_call method_call = new cancelDownload_call(downloadToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class cancelDownload_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String downloadToken;
+ public cancelDownload_call(String downloadToken, 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.downloadToken = downloadToken;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelDownload", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ cancelDownload_args args = new cancelDownload_args();
+ args.setDownloadToken(downloadToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_cancelDownload();
+ }
+ }
+
+ public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ isAuthenticated_call method_call = new isAuthenticated_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class isAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ public isAuthenticated_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("isAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ isAuthenticated_args args = new isAuthenticated_args();
+ args.setUserToken(userToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_isAuthenticated();
+ }
+ }
+
+ public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ invalidateSession_call method_call = new invalidateSession_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ public invalidateSession_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("invalidateSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ invalidateSession_args args = new invalidateSession_args();
+ args.setUserToken(userToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_invalidateSession();
+ }
+ }
+
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getOperatingSystems_call method_call = new getOperatingSystems_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getOperatingSystems_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getOperatingSystems_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOperatingSystems", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getOperatingSystems_args args = new getOperatingSystems_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<OperatingSystem> getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getOperatingSystems();
+ }
+ }
+
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getVirtualizers_call method_call = new getVirtualizers_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getVirtualizers_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVirtualizers", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getVirtualizers_args args = new getVirtualizers_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<Virtualizer> getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getVirtualizers();
+ }
+ }
+
+ public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getAllOrganizations_call method_call = new getAllOrganizations_call(resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getAllOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public getAllOrganizations_call(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);
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getAllOrganizations_args args = new getAllOrganizations_args();
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<Organization> getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getAllOrganizations();
+ }
+ }
+
+ public void getImageList(String userToken, List<String> tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getImageList_call method_call = new getImageList_call(userToken, tagSearch, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private List<String> tagSearch;
+ public getImageList_call(String userToken, List<String> tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.tagSearch = tagSearch;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageList", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getImageList_args args = new getImageList_args();
+ args.setUserToken(userToken);
+ args.setTagSearch(tagSearch);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<ImageSummaryRead> getResult() throws TAuthorizationException, 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_getImageList();
+ }
+ }
+
+ public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getImageDetails_call method_call = new getImageDetails_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageBaseId;
+ public getImageDetails_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getImageDetails_args args = new getImageDetails_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public ImageDetailsRead getResult() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getImageDetails();
+ }
+ }
+
+ public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateImageBase_call method_call = new updateImageBase_call(userToken, imageBaseId, image, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateImageBase_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageBaseId;
+ private ImageBaseWrite image;
+ public updateImageBase_call(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ this.image = image;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageBase", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateImageBase_args args = new updateImageBase_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.setImage(image);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws TAuthorizationException, 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_updateImageBase();
+ }
+ }
+
+ public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateImageVersion_call method_call = new updateImageVersion_call(userToken, imageVersionId, image, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageVersionId;
+ private ImageVersionWrite image;
+ public updateImageVersion_call(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ this.image = image;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateImageVersion_args args = new updateImageVersion_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ args.setImage(image);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws TAuthorizationException, 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_updateImageVersion();
+ }
+ }
+
+ public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteImageVersion_call method_call = new deleteImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageVersionId;
+ public deleteImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteImageVersion_args args = new deleteImageVersion_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws TAuthorizationException, TNotFoundException, 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_deleteImageVersion();
+ }
+ }
+
+ public void writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ writeImagePermissions_call method_call = new writeImagePermissions_call(userToken, imageId, permissions, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class writeImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageId;
+ private Map<String,ImagePermissions> permissions;
+ public writeImagePermissions_call(String userToken, String imageId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageId = imageId;
+ this.permissions = permissions;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ writeImagePermissions_args args = new writeImagePermissions_args();
+ args.setUserToken(userToken);
+ args.setImageId(imageId);
+ args.setPermissions(permissions);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws TAuthorizationException, TNotFoundException, 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_writeImagePermissions();
+ }
+ }
+
+ public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getImagePermissions_call method_call = new getImagePermissions_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageBaseId;
+ public getImagePermissions_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getImagePermissions_args args = new getImagePermissions_args();
+ args.setUserToken(userToken);
+ args.setImageBaseId(imageBaseId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<String,ImagePermissions> getResult() throws TAuthorizationException, TNotFoundException, 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_getImagePermissions();
+ }
+ }
+
+ public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createLecture_call method_call = new createLecture_call(userToken, lecture, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private LectureWrite lecture;
+ public createLecture_call(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.lecture = lecture;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createLecture_args args = new createLecture_args();
+ args.setUserToken(userToken);
+ args.setLecture(lecture);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws TAuthorizationException, 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_createLecture();
+ }
+ }
+
+ public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ updateLecture_call method_call = new updateLecture_call(userToken, lectureId, lecture, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class updateLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String lectureId;
+ private LectureWrite lecture;
+ public updateLecture_call(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ this.lecture = lecture;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ updateLecture_args args = new updateLecture_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ args.setLecture(lecture);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws TAuthorizationException, TNotFoundException, 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_updateLecture();
+ }
+ }
+
+ public void getLectureList(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getLectureList_call method_call = new getLectureList_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ public getLectureList_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("getLectureList", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getLectureList_args args = new getLectureList_args();
+ args.setUserToken(userToken);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<LectureSummary> getResult() throws TAuthorizationException, 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_getLectureList();
+ }
+ }
+
+ public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getLectureDetails_call method_call = new getLectureDetails_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getLectureDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String lectureId;
+ public getLectureDetails_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getLectureDetails_args args = new getLectureDetails_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public LectureRead getResult() throws TAuthorizationException, TNotFoundException, 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_getLectureDetails();
+ }
+ }
+
+ public void getLecturesByImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getLecturesByImageVersion_call method_call = new getLecturesByImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getLecturesByImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String imageVersionId;
+ public getLecturesByImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLecturesByImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getLecturesByImageVersion_args args = new getLecturesByImageVersion_args();
+ args.setUserToken(userToken);
+ args.setImageVersionId(imageVersionId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public List<LectureSummary> getResult() throws TAuthorizationException, TNotFoundException, 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_getLecturesByImageVersion();
+ }
+ }
+
+ public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteLecture_call method_call = new deleteLecture_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String lectureId;
+ public deleteLecture_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteLecture_args args = new deleteLecture_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws TAuthorizationException, TNotFoundException, 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_deleteLecture();
+ }
+ }
+
+ public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ writeLecturePermissions_call method_call = new writeLecturePermissions_call(userToken, lectureId, permissions, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class writeLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String lectureId;
+ private Map<String,LecturePermissions> permissions;
+ public writeLecturePermissions_call(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ this.permissions = permissions;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ writeLecturePermissions_args args = new writeLecturePermissions_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ args.setPermissions(permissions);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws TAuthorizationException, TNotFoundException, 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_writeLecturePermissions();
+ }
+ }
+
+ public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getLecturePermissions_call method_call = new getLecturePermissions_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private String userToken;
+ private String lectureId;
+ public getLecturePermissions_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getLecturePermissions_args args = new getLecturePermissions_args();
+ args.setUserToken(userToken);
+ args.setLectureId(lectureId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public Map<String,LecturePermissions> getResult() throws TAuthorizationException, TNotFoundException, 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_getLecturePermissions();
+ }
+ }
+
+ }
+
+ public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ processMap.put("getVersion", new getVersion());
+ processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
+ processMap.put("cancelUpload", new cancelUpload());
+ processMap.put("queryUploadStatus", new queryUploadStatus());
+ processMap.put("requestDownload", new requestDownload());
+ processMap.put("cancelDownload", new cancelDownload());
+ processMap.put("isAuthenticated", new isAuthenticated());
+ processMap.put("invalidateSession", new invalidateSession());
+ processMap.put("getOperatingSystems", new getOperatingSystems());
+ processMap.put("getVirtualizers", new getVirtualizers());
+ processMap.put("getAllOrganizations", new getAllOrganizations());
+ processMap.put("getImageList", new getImageList());
+ processMap.put("getImageDetails", new getImageDetails());
+ processMap.put("updateImageBase", new updateImageBase());
+ processMap.put("updateImageVersion", new updateImageVersion());
+ processMap.put("deleteImageVersion", new deleteImageVersion());
+ processMap.put("writeImagePermissions", new writeImagePermissions());
+ processMap.put("getImagePermissions", new getImagePermissions());
+ processMap.put("createLecture", new createLecture());
+ processMap.put("updateLecture", new updateLecture());
+ processMap.put("getLectureList", new getLectureList());
+ processMap.put("getLectureDetails", new getLectureDetails());
+ processMap.put("getLecturesByImageVersion", new getLecturesByImageVersion());
+ processMap.put("deleteLecture", new deleteLecture());
+ processMap.put("writeLecturePermissions", new writeLecturePermissions());
+ processMap.put("getLecturePermissions", new getLecturePermissions());
+ return processMap;
+ }
+
+ public static class getVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVersion_args> {
+ public getVersion() {
+ super("getVersion");
+ }
+
+ public getVersion_args getEmptyArgsInstance() {
+ return new getVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getVersion_result getResult(I iface, getVersion_args args) throws org.apache.thrift.TException {
+ getVersion_result result = new getVersion_result();
+ result.success = iface.getVersion();
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class requestImageVersionUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestImageVersionUpload_args> {
+ public requestImageVersionUpload() {
+ super("requestImageVersionUpload");
+ }
+
+ public requestImageVersionUpload_args getEmptyArgsInstance() {
+ return new requestImageVersionUpload_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public requestImageVersionUpload_result getResult(I iface, requestImageVersionUpload_args args) throws org.apache.thrift.TException {
+ requestImageVersionUpload_result result = new requestImageVersionUpload_result();
+ try {
+ result.success = iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes);
+ } catch (TTransferRejectedException rejection) {
+ result.rejection = rejection;
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ }
+ return result;
+ }
+ }
+
+ public static class cancelUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelUpload_args> {
+ public cancelUpload() {
+ super("cancelUpload");
+ }
+
+ public cancelUpload_args getEmptyArgsInstance() {
+ return new cancelUpload_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public cancelUpload_result getResult(I iface, cancelUpload_args args) throws org.apache.thrift.TException {
+ cancelUpload_result result = new cancelUpload_result();
+ iface.cancelUpload(args.uploadToken);
+ return result;
+ }
+ }
+
+ public static class queryUploadStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, queryUploadStatus_args> {
+ public queryUploadStatus() {
+ super("queryUploadStatus");
+ }
+
+ public queryUploadStatus_args getEmptyArgsInstance() {
+ return new queryUploadStatus_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public queryUploadStatus_result getResult(I iface, queryUploadStatus_args args) throws org.apache.thrift.TException {
+ queryUploadStatus_result result = new queryUploadStatus_result();
+ try {
+ result.success = iface.queryUploadStatus(args.uploadToken);
+ } catch (TInvalidTokenException ex1) {
+ result.ex1 = ex1;
+ }
+ return result;
+ }
+ }
+
+ public static class requestDownload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestDownload_args> {
+ public requestDownload() {
+ super("requestDownload");
+ }
+
+ public requestDownload_args getEmptyArgsInstance() {
+ return new requestDownload_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public requestDownload_result getResult(I iface, requestDownload_args args) throws org.apache.thrift.TException {
+ requestDownload_result result = new requestDownload_result();
+ try {
+ result.success = iface.requestDownload(args.userToken, args.imageVersionId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ }
+ return result;
+ }
+ }
+
+ public static class cancelDownload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelDownload_args> {
+ public cancelDownload() {
+ super("cancelDownload");
+ }
+
+ public cancelDownload_args getEmptyArgsInstance() {
+ return new cancelDownload_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public cancelDownload_result getResult(I iface, cancelDownload_args args) throws org.apache.thrift.TException {
+ cancelDownload_result result = new cancelDownload_result();
+ iface.cancelDownload(args.downloadToken);
+ return result;
+ }
+ }
+
+ public static class isAuthenticated<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isAuthenticated_args> {
+ public isAuthenticated() {
+ super("isAuthenticated");
+ }
+
+ public isAuthenticated_args getEmptyArgsInstance() {
+ return new isAuthenticated_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public isAuthenticated_result getResult(I iface, isAuthenticated_args args) throws org.apache.thrift.TException {
+ isAuthenticated_result result = new isAuthenticated_result();
+ result.success = iface.isAuthenticated(args.userToken);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class invalidateSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, invalidateSession_args> {
+ public invalidateSession() {
+ super("invalidateSession");
+ }
+
+ public invalidateSession_args getEmptyArgsInstance() {
+ return new invalidateSession_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public invalidateSession_result getResult(I iface, invalidateSession_args args) throws org.apache.thrift.TException {
+ invalidateSession_result result = new invalidateSession_result();
+ iface.invalidateSession(args.userToken);
+ return result;
+ }
+ }
+
+ public static class getOperatingSystems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOperatingSystems_args> {
+ public getOperatingSystems() {
+ super("getOperatingSystems");
+ }
+
+ public getOperatingSystems_args getEmptyArgsInstance() {
+ return new getOperatingSystems_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getOperatingSystems_result getResult(I iface, getOperatingSystems_args args) throws org.apache.thrift.TException {
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ result.success = iface.getOperatingSystems();
+ return result;
+ }
+ }
+
+ public static class getVirtualizers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVirtualizers_args> {
+ public getVirtualizers() {
+ super("getVirtualizers");
+ }
+
+ public getVirtualizers_args getEmptyArgsInstance() {
+ return new getVirtualizers_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getVirtualizers_result getResult(I iface, getVirtualizers_args args) throws org.apache.thrift.TException {
+ getVirtualizers_result result = new getVirtualizers_result();
+ result.success = iface.getVirtualizers();
+ return result;
+ }
+ }
+
+ public static class getAllOrganizations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllOrganizations_args> {
+ public getAllOrganizations() {
+ super("getAllOrganizations");
+ }
+
+ public getAllOrganizations_args getEmptyArgsInstance() {
+ return new getAllOrganizations_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getAllOrganizations_result getResult(I iface, getAllOrganizations_args args) throws org.apache.thrift.TException {
+ getAllOrganizations_result result = new getAllOrganizations_result();
+ result.success = iface.getAllOrganizations();
+ return result;
+ }
+ }
+
+ public static class getImageList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageList_args> {
+ public getImageList() {
+ super("getImageList");
+ }
+
+ public getImageList_args getEmptyArgsInstance() {
+ return new getImageList_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getImageList_result getResult(I iface, getImageList_args args) throws org.apache.thrift.TException {
+ getImageList_result result = new getImageList_result();
+ try {
+ result.success = iface.getImageList(args.userToken, args.tagSearch);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ }
+ return result;
+ }
+ }
+
+ public static class getImageDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageDetails_args> {
+ public getImageDetails() {
+ super("getImageDetails");
+ }
+
+ public getImageDetails_args getEmptyArgsInstance() {
+ return new getImageDetails_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getImageDetails_result getResult(I iface, getImageDetails_args args) throws org.apache.thrift.TException {
+ getImageDetails_result result = new getImageDetails_result();
+ try {
+ result.success = iface.getImageDetails(args.userToken, args.imageBaseId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class updateImageBase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageBase_args> {
+ public updateImageBase() {
+ super("updateImageBase");
+ }
+
+ public updateImageBase_args getEmptyArgsInstance() {
+ return new updateImageBase_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public updateImageBase_result getResult(I iface, updateImageBase_args args) throws org.apache.thrift.TException {
+ updateImageBase_result result = new updateImageBase_result();
+ try {
+ result.success = iface.updateImageBase(args.userToken, args.imageBaseId, args.image);
+ result.setSuccessIsSet(true);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ }
+ return result;
+ }
+ }
+
+ public static class updateImageVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageVersion_args> {
+ public updateImageVersion() {
+ super("updateImageVersion");
+ }
+
+ public updateImageVersion_args getEmptyArgsInstance() {
+ return new updateImageVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public updateImageVersion_result getResult(I iface, updateImageVersion_args args) throws org.apache.thrift.TException {
+ updateImageVersion_result result = new updateImageVersion_result();
+ try {
+ result.success = iface.updateImageVersion(args.userToken, args.imageVersionId, args.image);
+ result.setSuccessIsSet(true);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ }
+ return result;
+ }
+ }
+
+ public static class deleteImageVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteImageVersion_args> {
+ public deleteImageVersion() {
+ super("deleteImageVersion");
+ }
+
+ public deleteImageVersion_args getEmptyArgsInstance() {
+ return new deleteImageVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public deleteImageVersion_result getResult(I iface, deleteImageVersion_args args) throws org.apache.thrift.TException {
+ deleteImageVersion_result result = new deleteImageVersion_result();
+ try {
+ result.success = iface.deleteImageVersion(args.userToken, args.imageVersionId);
+ result.setSuccessIsSet(true);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class writeImagePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeImagePermissions_args> {
+ public writeImagePermissions() {
+ super("writeImagePermissions");
+ }
+
+ public writeImagePermissions_args getEmptyArgsInstance() {
+ return new writeImagePermissions_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public writeImagePermissions_result getResult(I iface, writeImagePermissions_args args) throws org.apache.thrift.TException {
+ writeImagePermissions_result result = new writeImagePermissions_result();
+ try {
+ result.success = iface.writeImagePermissions(args.userToken, args.imageId, args.permissions);
+ result.setSuccessIsSet(true);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class getImagePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImagePermissions_args> {
+ public getImagePermissions() {
+ super("getImagePermissions");
+ }
+
+ public getImagePermissions_args getEmptyArgsInstance() {
+ return new getImagePermissions_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getImagePermissions_result getResult(I iface, getImagePermissions_args args) throws org.apache.thrift.TException {
+ getImagePermissions_result result = new getImagePermissions_result();
+ try {
+ result.success = iface.getImagePermissions(args.userToken, args.imageBaseId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class createLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createLecture_args> {
+ public createLecture() {
+ super("createLecture");
+ }
+
+ public createLecture_args getEmptyArgsInstance() {
+ return new createLecture_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public createLecture_result getResult(I iface, createLecture_args args) throws org.apache.thrift.TException {
+ createLecture_result result = new createLecture_result();
+ try {
+ result.success = iface.createLecture(args.userToken, args.lecture);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ }
+ return result;
+ }
+ }
+
+ public static class updateLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateLecture_args> {
+ public updateLecture() {
+ super("updateLecture");
+ }
+
+ public updateLecture_args getEmptyArgsInstance() {
+ return new updateLecture_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public updateLecture_result getResult(I iface, updateLecture_args args) throws org.apache.thrift.TException {
+ updateLecture_result result = new updateLecture_result();
+ try {
+ result.success = iface.updateLecture(args.userToken, args.lectureId, args.lecture);
+ result.setSuccessIsSet(true);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class getLectureList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureList_args> {
+ public getLectureList() {
+ super("getLectureList");
+ }
+
+ public getLectureList_args getEmptyArgsInstance() {
+ return new getLectureList_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException {
+ getLectureList_result result = new getLectureList_result();
+ try {
+ result.success = iface.getLectureList(args.userToken);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ }
+ return result;
+ }
+ }
+
+ public static class getLectureDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureDetails_args> {
+ public getLectureDetails() {
+ super("getLectureDetails");
+ }
+
+ public getLectureDetails_args getEmptyArgsInstance() {
+ return new getLectureDetails_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getLectureDetails_result getResult(I iface, getLectureDetails_args args) throws org.apache.thrift.TException {
+ getLectureDetails_result result = new getLectureDetails_result();
+ try {
+ result.success = iface.getLectureDetails(args.userToken, args.lectureId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class getLecturesByImageVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLecturesByImageVersion_args> {
+ public getLecturesByImageVersion() {
+ super("getLecturesByImageVersion");
+ }
+
+ public getLecturesByImageVersion_args getEmptyArgsInstance() {
+ return new getLecturesByImageVersion_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getLecturesByImageVersion_result getResult(I iface, getLecturesByImageVersion_args args) throws org.apache.thrift.TException {
+ getLecturesByImageVersion_result result = new getLecturesByImageVersion_result();
+ try {
+ result.success = iface.getLecturesByImageVersion(args.userToken, args.imageVersionId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class deleteLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteLecture_args> {
+ public deleteLecture() {
+ super("deleteLecture");
+ }
+
+ public deleteLecture_args getEmptyArgsInstance() {
+ return new deleteLecture_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public deleteLecture_result getResult(I iface, deleteLecture_args args) throws org.apache.thrift.TException {
+ deleteLecture_result result = new deleteLecture_result();
+ try {
+ result.success = iface.deleteLecture(args.userToken, args.lectureId);
+ result.setSuccessIsSet(true);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class writeLecturePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeLecturePermissions_args> {
+ public writeLecturePermissions() {
+ super("writeLecturePermissions");
+ }
+
+ public writeLecturePermissions_args getEmptyArgsInstance() {
+ return new writeLecturePermissions_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public writeLecturePermissions_result getResult(I iface, writeLecturePermissions_args args) throws org.apache.thrift.TException {
+ writeLecturePermissions_result result = new writeLecturePermissions_result();
+ try {
+ result.success = iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions);
+ result.setSuccessIsSet(true);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ public static class getLecturePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLecturePermissions_args> {
+ public getLecturePermissions() {
+ super("getLecturePermissions");
+ }
+
+ public getLecturePermissions_args getEmptyArgsInstance() {
+ return new getLecturePermissions_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public getLecturePermissions_result getResult(I iface, getLecturePermissions_args args) throws org.apache.thrift.TException {
+ getLecturePermissions_result result = new getLecturePermissions_result();
+ try {
+ result.success = iface.getLecturePermissions(args.userToken, args.lectureId);
+ } catch (TAuthorizationException authError) {
+ result.authError = authError;
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ }
+ return result;
+ }
+ }
+
+ }
+
+ public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ processMap.put("getVersion", new getVersion());
+ processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
+ processMap.put("cancelUpload", new cancelUpload());
+ processMap.put("queryUploadStatus", new queryUploadStatus());
+ processMap.put("requestDownload", new requestDownload());
+ processMap.put("cancelDownload", new cancelDownload());
+ processMap.put("isAuthenticated", new isAuthenticated());
+ processMap.put("invalidateSession", new invalidateSession());
+ processMap.put("getOperatingSystems", new getOperatingSystems());
+ processMap.put("getVirtualizers", new getVirtualizers());
+ processMap.put("getAllOrganizations", new getAllOrganizations());
+ processMap.put("getImageList", new getImageList());
+ processMap.put("getImageDetails", new getImageDetails());
+ processMap.put("updateImageBase", new updateImageBase());
+ processMap.put("updateImageVersion", new updateImageVersion());
+ processMap.put("deleteImageVersion", new deleteImageVersion());
+ processMap.put("writeImagePermissions", new writeImagePermissions());
+ processMap.put("getImagePermissions", new getImagePermissions());
+ processMap.put("createLecture", new createLecture());
+ processMap.put("updateLecture", new updateLecture());
+ processMap.put("getLectureList", new getLectureList());
+ processMap.put("getLectureDetails", new getLectureDetails());
+ processMap.put("getLecturesByImageVersion", new getLecturesByImageVersion());
+ processMap.put("deleteLecture", new deleteLecture());
+ processMap.put("writeLecturePermissions", new writeLecturePermissions());
+ processMap.put("getLecturePermissions", new getLecturePermissions());
+ return processMap;
+ }
+
+ public static class getVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVersion_args, Long> {
+ public getVersion() {
+ super("getVersion");
+ }
+
+ public getVersion_args getEmptyArgsInstance() {
+ return new getVersion_args();
+ }
+
+ public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Long>() {
+ public void onComplete(Long o) {
+ getVersion_result result = new getVersion_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getVersion_result result = new getVersion_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
+ iface.getVersion(resultHandler);
+ }
+ }
+
+ public static class requestImageVersionUpload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestImageVersionUpload_args, TransferInformation> {
+ public requestImageVersionUpload() {
+ super("requestImageVersionUpload");
+ }
+
+ public requestImageVersionUpload_args getEmptyArgsInstance() {
+ return new requestImageVersionUpload_args();
+ }
+
+ public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<TransferInformation>() {
+ public void onComplete(TransferInformation o) {
+ requestImageVersionUpload_result result = new requestImageVersionUpload_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ requestImageVersionUpload_result result = new requestImageVersionUpload_result();
+ if (e instanceof TTransferRejectedException) {
+ result.rejection = (TTransferRejectedException) e;
+ result.setRejectionIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, requestImageVersionUpload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes,resultHandler);
+ }
+ }
+
+ public static class cancelUpload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelUpload_args, Void> {
+ public cancelUpload() {
+ super("cancelUpload");
+ }
+
+ public cancelUpload_args getEmptyArgsInstance() {
+ return new cancelUpload_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ cancelUpload_result result = new cancelUpload_result();
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ cancelUpload_result result = new cancelUpload_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, cancelUpload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.cancelUpload(args.uploadToken,resultHandler);
+ }
+ }
+
+ public static class queryUploadStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, queryUploadStatus_args, UploadStatus> {
+ public queryUploadStatus() {
+ super("queryUploadStatus");
+ }
+
+ public queryUploadStatus_args getEmptyArgsInstance() {
+ return new queryUploadStatus_args();
+ }
+
+ public AsyncMethodCallback<UploadStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<UploadStatus>() {
+ public void onComplete(UploadStatus o) {
+ queryUploadStatus_result result = new queryUploadStatus_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ queryUploadStatus_result result = new queryUploadStatus_result();
+ if (e instanceof TInvalidTokenException) {
+ result.ex1 = (TInvalidTokenException) e;
+ result.setEx1IsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, queryUploadStatus_args args, org.apache.thrift.async.AsyncMethodCallback<UploadStatus> resultHandler) throws TException {
+ iface.queryUploadStatus(args.uploadToken,resultHandler);
+ }
+ }
+
+ public static class requestDownload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestDownload_args, TransferInformation> {
+ public requestDownload() {
+ super("requestDownload");
+ }
+
+ public requestDownload_args getEmptyArgsInstance() {
+ return new requestDownload_args();
+ }
+
+ public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<TransferInformation>() {
+ public void onComplete(TransferInformation o) {
+ requestDownload_result result = new requestDownload_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ requestDownload_result result = new requestDownload_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, requestDownload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ iface.requestDownload(args.userToken, args.imageVersionId,resultHandler);
+ }
+ }
+
+ public static class cancelDownload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelDownload_args, Void> {
+ public cancelDownload() {
+ super("cancelDownload");
+ }
+
+ public cancelDownload_args getEmptyArgsInstance() {
+ return new cancelDownload_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ cancelDownload_result result = new cancelDownload_result();
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ cancelDownload_result result = new cancelDownload_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, cancelDownload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.cancelDownload(args.downloadToken,resultHandler);
+ }
+ }
+
+ public static class isAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isAuthenticated_args, Boolean> {
+ public isAuthenticated() {
+ super("isAuthenticated");
+ }
+
+ public isAuthenticated_args getEmptyArgsInstance() {
+ return new isAuthenticated_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ isAuthenticated_result result = new isAuthenticated_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ isAuthenticated_result result = new isAuthenticated_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, isAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.isAuthenticated(args.userToken,resultHandler);
+ }
+ }
+
+ public static class invalidateSession<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, invalidateSession_args, Void> {
+ public invalidateSession() {
+ super("invalidateSession");
+ }
+
+ public invalidateSession_args getEmptyArgsInstance() {
+ return new invalidateSession_args();
+ }
+
+ public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Void>() {
+ public void onComplete(Void o) {
+ invalidateSession_result result = new invalidateSession_result();
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ invalidateSession_result result = new invalidateSession_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, invalidateSession_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ iface.invalidateSession(args.userToken,resultHandler);
+ }
+ }
+
+ public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, List<OperatingSystem>> {
+ public getOperatingSystems() {
+ super("getOperatingSystems");
+ }
+
+ public getOperatingSystems_args getEmptyArgsInstance() {
+ return new getOperatingSystems_args();
+ }
+
+ public AsyncMethodCallback<List<OperatingSystem>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<OperatingSystem>>() {
+ public void onComplete(List<OperatingSystem> o) {
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getOperatingSystems_result result = new getOperatingSystems_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback<List<OperatingSystem>> resultHandler) throws TException {
+ iface.getOperatingSystems(resultHandler);
+ }
+ }
+
+ public static class getVirtualizers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVirtualizers_args, List<Virtualizer>> {
+ public getVirtualizers() {
+ super("getVirtualizers");
+ }
+
+ public getVirtualizers_args getEmptyArgsInstance() {
+ return new getVirtualizers_args();
+ }
+
+ public AsyncMethodCallback<List<Virtualizer>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<Virtualizer>>() {
+ public void onComplete(List<Virtualizer> o) {
+ getVirtualizers_result result = new getVirtualizers_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getVirtualizers_result result = new getVirtualizers_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Virtualizer>> resultHandler) throws TException {
+ iface.getVirtualizers(resultHandler);
+ }
+ }
+
+ public static class getAllOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllOrganizations_args, List<Organization>> {
+ public getAllOrganizations() {
+ super("getAllOrganizations");
+ }
+
+ public getAllOrganizations_args getEmptyArgsInstance() {
+ return new getAllOrganizations_args();
+ }
+
+ public AsyncMethodCallback<List<Organization>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<Organization>>() {
+ public void onComplete(List<Organization> o) {
+ getAllOrganizations_result result = new getAllOrganizations_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getAllOrganizations_result result = new getAllOrganizations_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getAllOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Organization>> resultHandler) throws TException {
+ iface.getAllOrganizations(resultHandler);
+ }
+ }
+
+ public static class getImageList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageList_args, List<ImageSummaryRead>> {
+ public getImageList() {
+ super("getImageList");
+ }
+
+ public getImageList_args getEmptyArgsInstance() {
+ return new getImageList_args();
+ }
+
+ public AsyncMethodCallback<List<ImageSummaryRead>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<ImageSummaryRead>>() {
+ public void onComplete(List<ImageSummaryRead> o) {
+ getImageList_result result = new getImageList_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getImageList_result result = new getImageList_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageSummaryRead>> resultHandler) throws TException {
+ iface.getImageList(args.userToken, args.tagSearch,resultHandler);
+ }
+ }
+
+ public static class getImageDetails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageDetails_args, ImageDetailsRead> {
+ public getImageDetails() {
+ super("getImageDetails");
+ }
+
+ public getImageDetails_args getEmptyArgsInstance() {
+ return new getImageDetails_args();
+ }
+
+ public AsyncMethodCallback<ImageDetailsRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<ImageDetailsRead>() {
+ public void onComplete(ImageDetailsRead o) {
+ getImageDetails_result result = new getImageDetails_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getImageDetails_result result = new getImageDetails_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws TException {
+ iface.getImageDetails(args.userToken, args.imageBaseId,resultHandler);
+ }
+ }
+
+ public static class updateImageBase<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageBase_args, Boolean> {
+ public updateImageBase() {
+ super("updateImageBase");
+ }
+
+ public updateImageBase_args getEmptyArgsInstance() {
+ return new updateImageBase_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateImageBase_result result = new updateImageBase_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ updateImageBase_result result = new updateImageBase_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, updateImageBase_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateImageBase(args.userToken, args.imageBaseId, args.image,resultHandler);
+ }
+ }
+
+ public static class updateImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageVersion_args, Boolean> {
+ public updateImageVersion() {
+ super("updateImageVersion");
+ }
+
+ public updateImageVersion_args getEmptyArgsInstance() {
+ return new updateImageVersion_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateImageVersion_result result = new updateImageVersion_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ updateImageVersion_result result = new updateImageVersion_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, updateImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateImageVersion(args.userToken, args.imageVersionId, args.image,resultHandler);
+ }
+ }
+
+ public static class deleteImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteImageVersion_args, Boolean> {
+ public deleteImageVersion() {
+ super("deleteImageVersion");
+ }
+
+ public deleteImageVersion_args getEmptyArgsInstance() {
+ return new deleteImageVersion_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteImageVersion_result result = new deleteImageVersion_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ deleteImageVersion_result result = new deleteImageVersion_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, deleteImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteImageVersion(args.userToken, args.imageVersionId,resultHandler);
+ }
+ }
+
+ public static class writeImagePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeImagePermissions_args, Boolean> {
+ public writeImagePermissions() {
+ super("writeImagePermissions");
+ }
+
+ public writeImagePermissions_args getEmptyArgsInstance() {
+ return new writeImagePermissions_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ writeImagePermissions_result result = new writeImagePermissions_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ writeImagePermissions_result result = new writeImagePermissions_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, writeImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.writeImagePermissions(args.userToken, args.imageId, args.permissions,resultHandler);
+ }
+ }
+
+ public static class getImagePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImagePermissions_args, Map<String,ImagePermissions>> {
+ public getImagePermissions() {
+ super("getImagePermissions");
+ }
+
+ public getImagePermissions_args getEmptyArgsInstance() {
+ return new getImagePermissions_args();
+ }
+
+ public AsyncMethodCallback<Map<String,ImagePermissions>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Map<String,ImagePermissions>>() {
+ public void onComplete(Map<String,ImagePermissions> o) {
+ getImagePermissions_result result = new getImagePermissions_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getImagePermissions_result result = new getImagePermissions_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,ImagePermissions>> resultHandler) throws TException {
+ iface.getImagePermissions(args.userToken, args.imageBaseId,resultHandler);
+ }
+ }
+
+ public static class createLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createLecture_args, String> {
+ public createLecture() {
+ super("createLecture");
+ }
+
+ public createLecture_args getEmptyArgsInstance() {
+ return new createLecture_args();
+ }
+
+ public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<String>() {
+ public void onComplete(String o) {
+ createLecture_result result = new createLecture_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ createLecture_result result = new createLecture_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, createLecture_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ iface.createLecture(args.userToken, args.lecture,resultHandler);
+ }
+ }
+
+ public static class updateLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateLecture_args, Boolean> {
+ public updateLecture() {
+ super("updateLecture");
+ }
+
+ public updateLecture_args getEmptyArgsInstance() {
+ return new updateLecture_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ updateLecture_result result = new updateLecture_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ updateLecture_result result = new updateLecture_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, updateLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.updateLecture(args.userToken, args.lectureId, args.lecture,resultHandler);
+ }
+ }
+
+ public static class getLectureList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureList_args, List<LectureSummary>> {
+ public getLectureList() {
+ super("getLectureList");
+ }
+
+ public getLectureList_args getEmptyArgsInstance() {
+ return new getLectureList_args();
+ }
+
+ public AsyncMethodCallback<List<LectureSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<LectureSummary>>() {
+ public void onComplete(List<LectureSummary> o) {
+ getLectureList_result result = new getLectureList_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getLectureList_result result = new getLectureList_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback<List<LectureSummary>> resultHandler) throws TException {
+ iface.getLectureList(args.userToken,resultHandler);
+ }
+ }
+
+ public static class getLectureDetails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureDetails_args, LectureRead> {
+ public getLectureDetails() {
+ super("getLectureDetails");
+ }
+
+ public getLectureDetails_args getEmptyArgsInstance() {
+ return new getLectureDetails_args();
+ }
+
+ public AsyncMethodCallback<LectureRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<LectureRead>() {
+ public void onComplete(LectureRead o) {
+ getLectureDetails_result result = new getLectureDetails_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getLectureDetails_result result = new getLectureDetails_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getLectureDetails_args args, org.apache.thrift.async.AsyncMethodCallback<LectureRead> resultHandler) throws TException {
+ iface.getLectureDetails(args.userToken, args.lectureId,resultHandler);
+ }
+ }
+
+ public static class getLecturesByImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLecturesByImageVersion_args, List<LectureSummary>> {
+ public getLecturesByImageVersion() {
+ super("getLecturesByImageVersion");
+ }
+
+ public getLecturesByImageVersion_args getEmptyArgsInstance() {
+ return new getLecturesByImageVersion_args();
+ }
+
+ public AsyncMethodCallback<List<LectureSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<List<LectureSummary>>() {
+ public void onComplete(List<LectureSummary> o) {
+ getLecturesByImageVersion_result result = new getLecturesByImageVersion_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getLecturesByImageVersion_result result = new getLecturesByImageVersion_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getLecturesByImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<List<LectureSummary>> resultHandler) throws TException {
+ iface.getLecturesByImageVersion(args.userToken, args.imageVersionId,resultHandler);
+ }
+ }
+
+ public static class deleteLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteLecture_args, Boolean> {
+ public deleteLecture() {
+ super("deleteLecture");
+ }
+
+ public deleteLecture_args getEmptyArgsInstance() {
+ return new deleteLecture_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ deleteLecture_result result = new deleteLecture_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ deleteLecture_result result = new deleteLecture_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, deleteLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.deleteLecture(args.userToken, args.lectureId,resultHandler);
+ }
+ }
+
+ public static class writeLecturePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeLecturePermissions_args, Boolean> {
+ public writeLecturePermissions() {
+ super("writeLecturePermissions");
+ }
+
+ public writeLecturePermissions_args getEmptyArgsInstance() {
+ return new writeLecturePermissions_args();
+ }
+
+ public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Boolean>() {
+ public void onComplete(Boolean o) {
+ writeLecturePermissions_result result = new writeLecturePermissions_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ writeLecturePermissions_result result = new writeLecturePermissions_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, writeLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions,resultHandler);
+ }
+ }
+
+ public static class getLecturePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLecturePermissions_args, Map<String,LecturePermissions>> {
+ public getLecturePermissions() {
+ super("getLecturePermissions");
+ }
+
+ public getLecturePermissions_args getEmptyArgsInstance() {
+ return new getLecturePermissions_args();
+ }
+
+ public AsyncMethodCallback<Map<String,LecturePermissions>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback<Map<String,LecturePermissions>>() {
+ public void onComplete(Map<String,LecturePermissions> o) {
+ getLecturePermissions_result result = new getLecturePermissions_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ getLecturePermissions_result result = new getLecturePermissions_result();
+ if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ }
+ else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ }
+ else
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, getLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,LecturePermissions>> resultHandler) throws TException {
+ iface.getLecturePermissions(args.userToken, args.lectureId,resultHandler);
+ }
+ }
+
+ }
+
+ public static class getVersion_args implements org.apache.thrift.TBase<getVersion_args, getVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getVersion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getVersion_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getVersion_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_args.class, metaDataMap);
+ }
+
+ public getVersion_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getVersion_args(getVersion_args other) {
+ }
+
+ public getVersion_args deepCopy() {
+ return new getVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getVersion_args)
+ return this.equals((getVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getVersion_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getVersion_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getVersion_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public getVersion_argsStandardScheme getScheme() {
+ return new getVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getVersion_argsStandardScheme extends StandardScheme<getVersion_args> {
+
+ 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) {
+ 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.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<getVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getVersion_result implements org.apache.thrift.TBase<getVersion_result, getVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getVersion_result> {
+ 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_result.class, metaDataMap);
+ }
+
+ public getVersion_result() {
+ }
+
+ public getVersion_result(
+ long success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getVersion_result(getVersion_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public getVersion_result deepCopy() {
+ return new getVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = 0;
+ }
+
+ public long getSuccess() {
+ return this.success;
+ }
+
+ public getVersion_result setSuccess(long success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Long.valueOf(getSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getVersion_result)
+ return this.equals((getVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(getVersion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getVersion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getVersion_resultStandardSchemeFactory implements SchemeFactory {
+ public getVersion_resultStandardScheme getScheme() {
+ return new getVersion_resultStandardScheme();
+ }
+ }
+
+ private static class getVersion_resultStandardScheme extends StandardScheme<getVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_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.I64) {
+ struct.success = iprot.readI64();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeI64(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getVersion_resultTupleSchemeFactory implements SchemeFactory {
+ public getVersion_resultTupleScheme getScheme() {
+ return new getVersion_resultTupleScheme();
+ }
+ }
+
+ private static class getVersion_resultTupleScheme extends TupleScheme<getVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeI64(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readI64();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class requestImageVersionUpload_args implements org.apache.thrift.TBase<requestImageVersionUpload_args, requestImageVersionUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestImageVersionUpload_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageVersionUpload_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 IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)3);
+ private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new requestImageVersionUpload_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new requestImageVersionUpload_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageBaseId; // required
+ public long fileSize; // required
+ public List<ByteBuffer> blockHashes; // 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"),
+ IMAGE_BASE_ID((short)2, "imageBaseId"),
+ FILE_SIZE((short)3, "fileSize"),
+ BLOCK_HASHES((short)4, "blockHashes");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ case 3: // FILE_SIZE
+ return FILE_SIZE;
+ case 4: // BLOCK_HASHES
+ return BLOCK_HASHES;
+ 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 __FILESIZE_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.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_args.class, metaDataMap);
+ }
+
+ public requestImageVersionUpload_args() {
+ }
+
+ public requestImageVersionUpload_args(
+ String userToken,
+ String imageBaseId,
+ long fileSize,
+ List<ByteBuffer> blockHashes)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ this.blockHashes = blockHashes;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public requestImageVersionUpload_args(requestImageVersionUpload_args other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ this.fileSize = other.fileSize;
+ if (other.isSetBlockHashes()) {
+ List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
+ this.blockHashes = __this__blockHashes;
+ }
+ }
+
+ public requestImageVersionUpload_args deepCopy() {
+ return new requestImageVersionUpload_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageBaseId = null;
+ setFileSizeIsSet(false);
+ this.fileSize = 0;
+ this.blockHashes = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public requestImageVersionUpload_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public requestImageVersionUpload_args setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public long getFileSize() {
+ return this.fileSize;
+ }
+
+ public requestImageVersionUpload_args setFileSize(long fileSize) {
+ this.fileSize = fileSize;
+ setFileSizeIsSet(true);
+ return this;
+ }
+
+ public void unsetFileSize() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
+ public boolean isSetFileSize() {
+ return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ }
+
+ public void setFileSizeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ }
+
+ public int getBlockHashesSize() {
+ return (this.blockHashes == null) ? 0 : this.blockHashes.size();
+ }
+
+ public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
+ return (this.blockHashes == null) ? null : this.blockHashes.iterator();
+ }
+
+ public void addToBlockHashes(ByteBuffer elem) {
+ if (this.blockHashes == null) {
+ this.blockHashes = new ArrayList<ByteBuffer>();
+ }
+ this.blockHashes.add(elem);
+ }
+
+ public List<ByteBuffer> getBlockHashes() {
+ return this.blockHashes;
+ }
+
+ public requestImageVersionUpload_args setBlockHashes(List<ByteBuffer> blockHashes) {
+ this.blockHashes = blockHashes;
+ return this;
+ }
+
+ public void unsetBlockHashes() {
+ this.blockHashes = null;
+ }
+
+ /** Returns true if field blockHashes is set (has been assigned a value) and false otherwise */
+ public boolean isSetBlockHashes() {
+ return this.blockHashes != null;
+ }
+
+ public void setBlockHashesIsSet(boolean value) {
+ if (!value) {
+ this.blockHashes = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ case FILE_SIZE:
+ if (value == null) {
+ unsetFileSize();
+ } else {
+ setFileSize((Long)value);
+ }
+ break;
+
+ case BLOCK_HASHES:
+ if (value == null) {
+ unsetBlockHashes();
+ } else {
+ setBlockHashes((List<ByteBuffer>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ case FILE_SIZE:
+ return Long.valueOf(getFileSize());
+
+ case BLOCK_HASHES:
+ return getBlockHashes();
+
+ }
+ 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 IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ case FILE_SIZE:
+ return isSetFileSize();
+ case BLOCK_HASHES:
+ return isSetBlockHashes();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof requestImageVersionUpload_args)
+ return this.equals((requestImageVersionUpload_args)that);
+ return false;
+ }
+
+ public boolean equals(requestImageVersionUpload_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_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ boolean this_present_fileSize = true;
+ boolean that_present_fileSize = true;
+ if (this_present_fileSize || that_present_fileSize) {
+ if (!(this_present_fileSize && that_present_fileSize))
+ return false;
+ if (this.fileSize != that.fileSize)
+ return false;
+ }
+
+ boolean this_present_blockHashes = true && this.isSetBlockHashes();
+ boolean that_present_blockHashes = true && that.isSetBlockHashes();
+ if (this_present_blockHashes || that_present_blockHashes) {
+ if (!(this_present_blockHashes && that_present_blockHashes))
+ return false;
+ if (!this.blockHashes.equals(that.blockHashes))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(requestImageVersionUpload_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(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFileSize()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBlockHashes()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockHashes, other.blockHashes);
+ 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("requestImageVersionUpload_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("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("fileSize:");
+ sb.append(this.fileSize);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("blockHashes:");
+ if (this.blockHashes == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.blockHashes);
+ }
+ 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 requestImageVersionUpload_argsStandardSchemeFactory implements SchemeFactory {
+ public requestImageVersionUpload_argsStandardScheme getScheme() {
+ return new requestImageVersionUpload_argsStandardScheme();
+ }
+ }
+
+ private static class requestImageVersionUpload_argsStandardScheme extends StandardScheme<requestImageVersionUpload_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_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: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // FILE_SIZE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // BLOCK_HASHES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list58 = iprot.readListBegin();
+ struct.blockHashes = new ArrayList<ByteBuffer>(_list58.size);
+ for (int _i59 = 0; _i59 < _list58.size; ++_i59)
+ {
+ ByteBuffer _elem60;
+ _elem60 = iprot.readBinary();
+ struct.blockHashes.add(_elem60);
+ }
+ iprot.readListEnd();
+ }
+ struct.setBlockHashesIsSet(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, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
+ oprot.writeI64(struct.fileSize);
+ oprot.writeFieldEnd();
+ if (struct.blockHashes != null) {
+ 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 _iter61 : struct.blockHashes)
+ {
+ oprot.writeBinary(_iter61);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class requestImageVersionUpload_argsTupleSchemeFactory implements SchemeFactory {
+ public requestImageVersionUpload_argsTupleScheme getScheme() {
+ return new requestImageVersionUpload_argsTupleScheme();
+ }
+ }
+
+ private static class requestImageVersionUpload_argsTupleScheme extends TupleScheme<requestImageVersionUpload_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageBaseId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetFileSize()) {
+ optionals.set(2);
+ }
+ if (struct.isSetBlockHashes()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ if (struct.isSetFileSize()) {
+ oprot.writeI64(struct.fileSize);
+ }
+ if (struct.isSetBlockHashes()) {
+ {
+ oprot.writeI32(struct.blockHashes.size());
+ for (ByteBuffer _iter62 : struct.blockHashes)
+ {
+ oprot.writeBinary(_iter62);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.fileSize = iprot.readI64();
+ struct.setFileSizeIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.blockHashes = new ArrayList<ByteBuffer>(_list63.size);
+ for (int _i64 = 0; _i64 < _list63.size; ++_i64)
+ {
+ ByteBuffer _elem65;
+ _elem65 = iprot.readBinary();
+ struct.blockHashes.add(_elem65);
+ }
+ }
+ struct.setBlockHashesIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class requestImageVersionUpload_result implements org.apache.thrift.TBase<requestImageVersionUpload_result, requestImageVersionUpload_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestImageVersionUpload_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageVersionUpload_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 REJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("rejection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ 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)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new requestImageVersionUpload_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new requestImageVersionUpload_resultTupleSchemeFactory());
+ }
+
+ public TransferInformation success; // required
+ public TTransferRejectedException rejection; // required
+ public TAuthorizationException authError; // 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"),
+ REJECTION((short)1, "rejection"),
+ AUTH_ERROR((short)2, "authError");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // REJECTION
+ return REJECTION;
+ case 2: // AUTH_ERROR
+ return AUTH_ERROR;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
+ tmpMap.put(_Fields.REJECTION, new org.apache.thrift.meta_data.FieldMetaData("rejection", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_result.class, metaDataMap);
+ }
+
+ public requestImageVersionUpload_result() {
+ }
+
+ public requestImageVersionUpload_result(
+ TransferInformation success,
+ TTransferRejectedException rejection,
+ TAuthorizationException authError)
+ {
+ this();
+ this.success = success;
+ this.rejection = rejection;
+ this.authError = authError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public requestImageVersionUpload_result(requestImageVersionUpload_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new TransferInformation(other.success);
+ }
+ if (other.isSetRejection()) {
+ this.rejection = new TTransferRejectedException(other.rejection);
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ }
+
+ public requestImageVersionUpload_result deepCopy() {
+ return new requestImageVersionUpload_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.rejection = null;
+ this.authError = null;
+ }
+
+ public TransferInformation getSuccess() {
+ return this.success;
+ }
+
+ public requestImageVersionUpload_result setSuccess(TransferInformation 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 TTransferRejectedException getRejection() {
+ return this.rejection;
+ }
+
+ public requestImageVersionUpload_result setRejection(TTransferRejectedException rejection) {
+ this.rejection = rejection;
+ return this;
+ }
+
+ public void unsetRejection() {
+ this.rejection = null;
+ }
+
+ /** Returns true if field rejection is set (has been assigned a value) and false otherwise */
+ public boolean isSetRejection() {
+ return this.rejection != null;
+ }
+
+ public void setRejectionIsSet(boolean value) {
+ if (!value) {
+ this.rejection = null;
+ }
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public requestImageVersionUpload_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((TransferInformation)value);
+ }
+ break;
+
+ case REJECTION:
+ if (value == null) {
+ unsetRejection();
+ } else {
+ setRejection((TTransferRejectedException)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case REJECTION:
+ return getRejection();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ }
+ 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 REJECTION:
+ return isSetRejection();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof requestImageVersionUpload_result)
+ return this.equals((requestImageVersionUpload_result)that);
+ return false;
+ }
+
+ public boolean equals(requestImageVersionUpload_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_rejection = true && this.isSetRejection();
+ boolean that_present_rejection = true && that.isSetRejection();
+ if (this_present_rejection || that_present_rejection) {
+ if (!(this_present_rejection && that_present_rejection))
+ return false;
+ if (!this.rejection.equals(that.rejection))
+ 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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(requestImageVersionUpload_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(isSetRejection()).compareTo(other.isSetRejection());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRejection()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rejection, other.rejection);
+ 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;
+ }
+ }
+ 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("requestImageVersionUpload_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("rejection:");
+ if (this.rejection == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.rejection);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class requestImageVersionUpload_resultStandardSchemeFactory implements SchemeFactory {
+ public requestImageVersionUpload_resultStandardScheme getScheme() {
+ return new requestImageVersionUpload_resultStandardScheme();
+ }
+ }
+
+ private static class requestImageVersionUpload_resultStandardScheme extends StandardScheme<requestImageVersionUpload_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // REJECTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.rejection = new TTransferRejectedException();
+ struct.rejection.read(iprot);
+ struct.setRejectionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // 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;
+ 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, requestImageVersionUpload_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.rejection != null) {
+ oprot.writeFieldBegin(REJECTION_FIELD_DESC);
+ struct.rejection.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class requestImageVersionUpload_resultTupleSchemeFactory implements SchemeFactory {
+ public requestImageVersionUpload_resultTupleScheme getScheme() {
+ return new requestImageVersionUpload_resultTupleScheme();
+ }
+ }
+
+ private static class requestImageVersionUpload_resultTupleScheme extends TupleScheme<requestImageVersionUpload_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetRejection()) {
+ optionals.set(1);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetRejection()) {
+ struct.rejection.write(oprot);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.rejection = new TTransferRejectedException();
+ struct.rejection.read(iprot);
+ struct.setRejectionIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class cancelUpload_args implements org.apache.thrift.TBase<cancelUpload_args, cancelUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelUpload_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelUpload_args");
+
+ private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new cancelUpload_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new cancelUpload_argsTupleSchemeFactory());
+ }
+
+ public String uploadToken; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ UPLOAD_TOKEN((short)1, "uploadToken");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // UPLOAD_TOKEN
+ return UPLOAD_TOKEN;
+ 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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_args.class, metaDataMap);
+ }
+
+ public cancelUpload_args() {
+ }
+
+ public cancelUpload_args(
+ String uploadToken)
+ {
+ this();
+ this.uploadToken = uploadToken;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public cancelUpload_args(cancelUpload_args other) {
+ if (other.isSetUploadToken()) {
+ this.uploadToken = other.uploadToken;
+ }
+ }
+
+ public cancelUpload_args deepCopy() {
+ return new cancelUpload_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.uploadToken = null;
+ }
+
+ public String getUploadToken() {
+ return this.uploadToken;
+ }
+
+ public cancelUpload_args setUploadToken(String uploadToken) {
+ this.uploadToken = uploadToken;
+ return this;
+ }
+
+ public void unsetUploadToken() {
+ this.uploadToken = null;
+ }
+
+ /** Returns true if field uploadToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUploadToken() {
+ return this.uploadToken != null;
+ }
+
+ public void setUploadTokenIsSet(boolean value) {
+ if (!value) {
+ this.uploadToken = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case UPLOAD_TOKEN:
+ if (value == null) {
+ unsetUploadToken();
+ } else {
+ setUploadToken((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case UPLOAD_TOKEN:
+ return getUploadToken();
+
+ }
+ 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 UPLOAD_TOKEN:
+ return isSetUploadToken();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof cancelUpload_args)
+ return this.equals((cancelUpload_args)that);
+ return false;
+ }
+
+ public boolean equals(cancelUpload_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_uploadToken = true && this.isSetUploadToken();
+ boolean that_present_uploadToken = true && that.isSetUploadToken();
+ if (this_present_uploadToken || that_present_uploadToken) {
+ if (!(this_present_uploadToken && that_present_uploadToken))
+ return false;
+ if (!this.uploadToken.equals(that.uploadToken))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(cancelUpload_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUploadToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("cancelUpload_args(");
+ boolean first = true;
+
+ sb.append("uploadToken:");
+ if (this.uploadToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uploadToken);
+ }
+ 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 cancelUpload_argsStandardSchemeFactory implements SchemeFactory {
+ public cancelUpload_argsStandardScheme getScheme() {
+ return new cancelUpload_argsStandardScheme();
+ }
+ }
+
+ private static class cancelUpload_argsStandardScheme extends StandardScheme<cancelUpload_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_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: // UPLOAD_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uploadToken = iprot.readString();
+ struct.setUploadTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, cancelUpload_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.uploadToken != null) {
+ oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.uploadToken);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class cancelUpload_argsTupleSchemeFactory implements SchemeFactory {
+ public cancelUpload_argsTupleScheme getScheme() {
+ return new cancelUpload_argsTupleScheme();
+ }
+ }
+
+ private static class cancelUpload_argsTupleScheme extends TupleScheme<cancelUpload_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUploadToken()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetUploadToken()) {
+ oprot.writeString(struct.uploadToken);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.uploadToken = iprot.readString();
+ struct.setUploadTokenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class cancelUpload_result implements org.apache.thrift.TBase<cancelUpload_result, cancelUpload_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancelUpload_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelUpload_result");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new cancelUpload_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new cancelUpload_resultTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_result.class, metaDataMap);
+ }
+
+ public cancelUpload_result() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public cancelUpload_result(cancelUpload_result other) {
+ }
+
+ public cancelUpload_result deepCopy() {
+ return new cancelUpload_result(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof cancelUpload_result)
+ return this.equals((cancelUpload_result)that);
+ return false;
+ }
+
+ public boolean equals(cancelUpload_result that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(cancelUpload_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("cancelUpload_result(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class cancelUpload_resultStandardSchemeFactory implements SchemeFactory {
+ public cancelUpload_resultStandardScheme getScheme() {
+ return new cancelUpload_resultStandardScheme();
+ }
+ }
+
+ private static class cancelUpload_resultStandardScheme extends StandardScheme<cancelUpload_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // 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, cancelUpload_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class cancelUpload_resultTupleSchemeFactory implements SchemeFactory {
+ public cancelUpload_resultTupleScheme getScheme() {
+ return new cancelUpload_resultTupleScheme();
+ }
+ }
+
+ private static class cancelUpload_resultTupleScheme extends TupleScheme<cancelUpload_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class queryUploadStatus_args implements org.apache.thrift.TBase<queryUploadStatus_args, queryUploadStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryUploadStatus_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryUploadStatus_args");
+
+ private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new queryUploadStatus_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new queryUploadStatus_argsTupleSchemeFactory());
+ }
+
+ public String uploadToken; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ UPLOAD_TOKEN((short)1, "uploadToken");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // UPLOAD_TOKEN
+ return UPLOAD_TOKEN;
+ 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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_args.class, metaDataMap);
+ }
+
+ public queryUploadStatus_args() {
+ }
+
+ public queryUploadStatus_args(
+ String uploadToken)
+ {
+ this();
+ this.uploadToken = uploadToken;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public queryUploadStatus_args(queryUploadStatus_args other) {
+ if (other.isSetUploadToken()) {
+ this.uploadToken = other.uploadToken;
+ }
+ }
+
+ public queryUploadStatus_args deepCopy() {
+ return new queryUploadStatus_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.uploadToken = null;
+ }
+
+ public String getUploadToken() {
+ return this.uploadToken;
+ }
+
+ public queryUploadStatus_args setUploadToken(String uploadToken) {
+ this.uploadToken = uploadToken;
+ return this;
+ }
+
+ public void unsetUploadToken() {
+ this.uploadToken = null;
+ }
+
+ /** Returns true if field uploadToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUploadToken() {
+ return this.uploadToken != null;
+ }
+
+ public void setUploadTokenIsSet(boolean value) {
+ if (!value) {
+ this.uploadToken = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case UPLOAD_TOKEN:
+ if (value == null) {
+ unsetUploadToken();
+ } else {
+ setUploadToken((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case UPLOAD_TOKEN:
+ return getUploadToken();
+
+ }
+ 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 UPLOAD_TOKEN:
+ return isSetUploadToken();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof queryUploadStatus_args)
+ return this.equals((queryUploadStatus_args)that);
+ return false;
+ }
+
+ public boolean equals(queryUploadStatus_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_uploadToken = true && this.isSetUploadToken();
+ boolean that_present_uploadToken = true && that.isSetUploadToken();
+ if (this_present_uploadToken || that_present_uploadToken) {
+ if (!(this_present_uploadToken && that_present_uploadToken))
+ return false;
+ if (!this.uploadToken.equals(that.uploadToken))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(queryUploadStatus_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUploadToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("queryUploadStatus_args(");
+ boolean first = true;
+
+ sb.append("uploadToken:");
+ if (this.uploadToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.uploadToken);
+ }
+ 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 queryUploadStatus_argsStandardSchemeFactory implements SchemeFactory {
+ public queryUploadStatus_argsStandardScheme getScheme() {
+ return new queryUploadStatus_argsStandardScheme();
+ }
+ }
+
+ private static class queryUploadStatus_argsStandardScheme extends StandardScheme<queryUploadStatus_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_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: // UPLOAD_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.uploadToken = iprot.readString();
+ struct.setUploadTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, queryUploadStatus_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.uploadToken != null) {
+ oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.uploadToken);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class queryUploadStatus_argsTupleSchemeFactory implements SchemeFactory {
+ public queryUploadStatus_argsTupleScheme getScheme() {
+ return new queryUploadStatus_argsTupleScheme();
+ }
+ }
+
+ private static class queryUploadStatus_argsTupleScheme extends TupleScheme<queryUploadStatus_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUploadToken()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetUploadToken()) {
+ oprot.writeString(struct.uploadToken);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.uploadToken = iprot.readString();
+ struct.setUploadTokenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class queryUploadStatus_result implements org.apache.thrift.TBase<queryUploadStatus_result, queryUploadStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<queryUploadStatus_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryUploadStatus_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 EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new queryUploadStatus_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new queryUploadStatus_resultTupleSchemeFactory());
+ }
+
+ public UploadStatus success; // required
+ public TInvalidTokenException ex1; // 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"),
+ EX1((short)1, "ex1");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // EX1
+ return EX1;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadStatus.class)));
+ tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", 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(queryUploadStatus_result.class, metaDataMap);
+ }
+
+ public queryUploadStatus_result() {
+ }
+
+ public queryUploadStatus_result(
+ UploadStatus success,
+ TInvalidTokenException ex1)
+ {
+ this();
+ this.success = success;
+ this.ex1 = ex1;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public queryUploadStatus_result(queryUploadStatus_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new UploadStatus(other.success);
+ }
+ if (other.isSetEx1()) {
+ this.ex1 = new TInvalidTokenException(other.ex1);
+ }
+ }
+
+ public queryUploadStatus_result deepCopy() {
+ return new queryUploadStatus_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.ex1 = null;
+ }
+
+ public UploadStatus getSuccess() {
+ return this.success;
+ }
+
+ public queryUploadStatus_result setSuccess(UploadStatus 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 TInvalidTokenException getEx1() {
+ return this.ex1;
+ }
+
+ public queryUploadStatus_result setEx1(TInvalidTokenException ex1) {
+ this.ex1 = ex1;
+ return this;
+ }
+
+ public void unsetEx1() {
+ this.ex1 = null;
+ }
+
+ /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
+ public boolean isSetEx1() {
+ return this.ex1 != null;
+ }
+
+ public void setEx1IsSet(boolean value) {
+ if (!value) {
+ this.ex1 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((UploadStatus)value);
+ }
+ break;
+
+ case EX1:
+ if (value == null) {
+ unsetEx1();
+ } else {
+ setEx1((TInvalidTokenException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case EX1:
+ return getEx1();
+
+ }
+ 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 EX1:
+ return isSetEx1();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof queryUploadStatus_result)
+ return this.equals((queryUploadStatus_result)that);
+ return false;
+ }
+
+ public boolean equals(queryUploadStatus_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_ex1 = true && this.isSetEx1();
+ boolean that_present_ex1 = true && that.isSetEx1();
+ if (this_present_ex1 || that_present_ex1) {
+ if (!(this_present_ex1 && that_present_ex1))
+ return false;
+ if (!this.ex1.equals(that.ex1))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(queryUploadStatus_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(isSetEx1()).compareTo(other.isSetEx1());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEx1()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
+ 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("queryUploadStatus_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("ex1:");
+ if (this.ex1 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ex1);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class queryUploadStatus_resultStandardSchemeFactory implements SchemeFactory {
+ public queryUploadStatus_resultStandardScheme getScheme() {
+ return new queryUploadStatus_resultStandardScheme();
+ }
+ }
+
+ private static class queryUploadStatus_resultStandardScheme extends StandardScheme<queryUploadStatus_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new UploadStatus();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // EX1
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.ex1 = new TInvalidTokenException();
+ struct.ex1.read(iprot);
+ struct.setEx1IsSet(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, queryUploadStatus_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.ex1 != null) {
+ oprot.writeFieldBegin(EX1_FIELD_DESC);
+ struct.ex1.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class queryUploadStatus_resultTupleSchemeFactory implements SchemeFactory {
+ public queryUploadStatus_resultTupleScheme getScheme() {
+ return new queryUploadStatus_resultTupleScheme();
+ }
+ }
+
+ private static class queryUploadStatus_resultTupleScheme extends TupleScheme<queryUploadStatus_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetEx1()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetEx1()) {
+ struct.ex1.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = new UploadStatus();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.ex1 = new TInvalidTokenException();
+ struct.ex1.read(iprot);
+ struct.setEx1IsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class requestDownload_args implements org.apache.thrift.TBase<requestDownload_args, requestDownload_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestDownload_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestDownload_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 IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new requestDownload_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new requestDownload_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageVersionId; // 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"),
+ IMAGE_VERSION_ID((short)2, "imageVersionId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_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.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", 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(requestDownload_args.class, metaDataMap);
+ }
+
+ public requestDownload_args() {
+ }
+
+ public requestDownload_args(
+ String userToken,
+ String imageVersionId)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public requestDownload_args(requestDownload_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ }
+
+ public requestDownload_args deepCopy() {
+ return new requestDownload_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageVersionId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public requestDownload_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public requestDownload_args setImageVersionId(String imageVersionId) {
+ this.imageVersionId = imageVersionId;
+ return this;
+ }
+
+ public void unsetImageVersionId() {
+ this.imageVersionId = null;
+ }
+
+ /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageVersionId() {
+ return this.imageVersionId != null;
+ }
+
+ public void setImageVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.imageVersionId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_VERSION_ID:
+ if (value == null) {
+ unsetImageVersionId();
+ } else {
+ setImageVersionId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ }
+ 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 IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof requestDownload_args)
+ return this.equals((requestDownload_args)that);
+ return false;
+ }
+
+ public boolean equals(requestDownload_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_imageVersionId = true && this.isSetImageVersionId();
+ boolean that_present_imageVersionId = true && that.isSetImageVersionId();
+ if (this_present_imageVersionId || that_present_imageVersionId) {
+ if (!(this_present_imageVersionId && that_present_imageVersionId))
+ return false;
+ if (!this.imageVersionId.equals(that.imageVersionId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(requestDownload_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(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ 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("requestDownload_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("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ 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 requestDownload_argsStandardSchemeFactory implements SchemeFactory {
+ public requestDownload_argsStandardScheme getScheme() {
+ return new requestDownload_argsStandardScheme();
+ }
+ }
+
+ private static class requestDownload_argsStandardScheme extends StandardScheme<requestDownload_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_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: // IMAGE_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(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, requestDownload_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class requestDownload_argsTupleSchemeFactory implements SchemeFactory {
+ public requestDownload_argsTupleScheme getScheme() {
+ return new requestDownload_argsTupleScheme();
+ }
+ }
+
+ private static class requestDownload_argsTupleScheme extends TupleScheme<requestDownload_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageVersionId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_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.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class requestDownload_result implements org.apache.thrift.TBase<requestDownload_result, requestDownload_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestDownload_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestDownload_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new requestDownload_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new requestDownload_resultTupleSchemeFactory());
+ }
+
+ public TransferInformation success; // required
+ public TAuthorizationException authError; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_result.class, metaDataMap);
+ }
+
+ public requestDownload_result() {
+ }
+
+ public requestDownload_result(
+ TransferInformation success,
+ TAuthorizationException authError)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public requestDownload_result(requestDownload_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new TransferInformation(other.success);
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ }
+
+ public requestDownload_result deepCopy() {
+ return new requestDownload_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ }
+
+ public TransferInformation getSuccess() {
+ return this.success;
+ }
+
+ public requestDownload_result setSuccess(TransferInformation 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 requestDownload_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((TransferInformation)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ }
+ 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();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof requestDownload_result)
+ return this.equals((requestDownload_result)that);
+ return false;
+ }
+
+ public boolean equals(requestDownload_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(requestDownload_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;
+ }
+ }
+ 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("requestDownload_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;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class requestDownload_resultStandardSchemeFactory implements SchemeFactory {
+ public requestDownload_resultStandardScheme getScheme() {
+ return new requestDownload_resultStandardScheme();
+ }
+ }
+
+ private static class requestDownload_resultStandardScheme extends StandardScheme<requestDownload_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, requestDownload_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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class requestDownload_resultTupleSchemeFactory implements SchemeFactory {
+ public requestDownload_resultTupleScheme getScheme() {
+ return new requestDownload_resultTupleScheme();
+ }
+ }
+
+ private static class requestDownload_resultTupleScheme extends TupleScheme<requestDownload_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_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);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = new TransferInformation();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class cancelDownload_args implements org.apache.thrift.TBase<cancelDownload_args, cancelDownload_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelDownload_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelDownload_args");
+
+ private static final org.apache.thrift.protocol.TField DOWNLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("downloadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new cancelDownload_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new cancelDownload_argsTupleSchemeFactory());
+ }
+
+ public String downloadToken; // 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 {
+ DOWNLOAD_TOKEN((short)1, "downloadToken");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // DOWNLOAD_TOKEN
+ return DOWNLOAD_TOKEN;
+ 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.DOWNLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("downloadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_args.class, metaDataMap);
+ }
+
+ public cancelDownload_args() {
+ }
+
+ public cancelDownload_args(
+ String downloadToken)
+ {
+ this();
+ this.downloadToken = downloadToken;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public cancelDownload_args(cancelDownload_args other) {
+ if (other.isSetDownloadToken()) {
+ this.downloadToken = other.downloadToken;
+ }
+ }
+
+ public cancelDownload_args deepCopy() {
+ return new cancelDownload_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.downloadToken = null;
+ }
+
+ public String getDownloadToken() {
+ return this.downloadToken;
+ }
+
+ public cancelDownload_args setDownloadToken(String downloadToken) {
+ this.downloadToken = downloadToken;
+ return this;
+ }
+
+ public void unsetDownloadToken() {
+ this.downloadToken = null;
+ }
+
+ /** Returns true if field downloadToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetDownloadToken() {
+ return this.downloadToken != null;
+ }
+
+ public void setDownloadTokenIsSet(boolean value) {
+ if (!value) {
+ this.downloadToken = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DOWNLOAD_TOKEN:
+ if (value == null) {
+ unsetDownloadToken();
+ } else {
+ setDownloadToken((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DOWNLOAD_TOKEN:
+ return getDownloadToken();
+
+ }
+ 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 DOWNLOAD_TOKEN:
+ return isSetDownloadToken();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof cancelDownload_args)
+ return this.equals((cancelDownload_args)that);
+ return false;
+ }
+
+ public boolean equals(cancelDownload_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_downloadToken = true && this.isSetDownloadToken();
+ boolean that_present_downloadToken = true && that.isSetDownloadToken();
+ if (this_present_downloadToken || that_present_downloadToken) {
+ if (!(this_present_downloadToken && that_present_downloadToken))
+ return false;
+ if (!this.downloadToken.equals(that.downloadToken))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(cancelDownload_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDownloadToken()).compareTo(other.isSetDownloadToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDownloadToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.downloadToken, other.downloadToken);
+ 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("cancelDownload_args(");
+ boolean first = true;
+
+ sb.append("downloadToken:");
+ if (this.downloadToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.downloadToken);
+ }
+ 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 cancelDownload_argsStandardSchemeFactory implements SchemeFactory {
+ public cancelDownload_argsStandardScheme getScheme() {
+ return new cancelDownload_argsStandardScheme();
+ }
+ }
+
+ private static class cancelDownload_argsStandardScheme extends StandardScheme<cancelDownload_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_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: // DOWNLOAD_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.downloadToken = iprot.readString();
+ struct.setDownloadTokenIsSet(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, cancelDownload_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.downloadToken != null) {
+ oprot.writeFieldBegin(DOWNLOAD_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.downloadToken);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class cancelDownload_argsTupleSchemeFactory implements SchemeFactory {
+ public cancelDownload_argsTupleScheme getScheme() {
+ return new cancelDownload_argsTupleScheme();
+ }
+ }
+
+ private static class cancelDownload_argsTupleScheme extends TupleScheme<cancelDownload_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetDownloadToken()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetDownloadToken()) {
+ oprot.writeString(struct.downloadToken);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.downloadToken = iprot.readString();
+ struct.setDownloadTokenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class cancelDownload_result implements org.apache.thrift.TBase<cancelDownload_result, cancelDownload_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancelDownload_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelDownload_result");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new cancelDownload_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new cancelDownload_resultTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_result.class, metaDataMap);
+ }
+
+ public cancelDownload_result() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public cancelDownload_result(cancelDownload_result other) {
+ }
+
+ public cancelDownload_result deepCopy() {
+ return new cancelDownload_result(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof cancelDownload_result)
+ return this.equals((cancelDownload_result)that);
+ return false;
+ }
+
+ public boolean equals(cancelDownload_result that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(cancelDownload_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("cancelDownload_result(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class cancelDownload_resultStandardSchemeFactory implements SchemeFactory {
+ public cancelDownload_resultStandardScheme getScheme() {
+ return new cancelDownload_resultStandardScheme();
+ }
+ }
+
+ private static class cancelDownload_resultStandardScheme extends StandardScheme<cancelDownload_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // 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, cancelDownload_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class cancelDownload_resultTupleSchemeFactory implements SchemeFactory {
+ public cancelDownload_resultTupleScheme getScheme() {
+ return new cancelDownload_resultTupleScheme();
+ }
+ }
+
+ private static class cancelDownload_resultTupleScheme extends TupleScheme<cancelDownload_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class isAuthenticated_args implements org.apache.thrift.TBase<isAuthenticated_args, isAuthenticated_args._Fields>, java.io.Serializable, Cloneable, Comparable<isAuthenticated_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAuthenticated_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new isAuthenticated_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new isAuthenticated_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_TOKEN((short)1, "userToken");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ 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")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_args.class, metaDataMap);
+ }
+
+ public isAuthenticated_args() {
+ }
+
+ public isAuthenticated_args(
+ String userToken)
+ {
+ this();
+ this.userToken = userToken;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public isAuthenticated_args(isAuthenticated_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ }
+
+ public isAuthenticated_args deepCopy() {
+ return new isAuthenticated_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public isAuthenticated_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ }
+ 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();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof isAuthenticated_args)
+ return this.equals((isAuthenticated_args)that);
+ return false;
+ }
+
+ public boolean equals(isAuthenticated_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(isAuthenticated_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;
+ }
+ }
+ 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("isAuthenticated_args(");
+ boolean first = true;
+
+ sb.append("userToken:");
+ if (this.userToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userToken);
+ }
+ 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 isAuthenticated_argsStandardSchemeFactory implements SchemeFactory {
+ public isAuthenticated_argsStandardScheme getScheme() {
+ return new isAuthenticated_argsStandardScheme();
+ }
+ }
+
+ private static class isAuthenticated_argsStandardScheme extends StandardScheme<isAuthenticated_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_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;
+ 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, isAuthenticated_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.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class isAuthenticated_argsTupleSchemeFactory implements SchemeFactory {
+ public isAuthenticated_argsTupleScheme getScheme() {
+ return new isAuthenticated_argsTupleScheme();
+ }
+ }
+
+ private static class isAuthenticated_argsTupleScheme extends TupleScheme<isAuthenticated_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class isAuthenticated_result implements org.apache.thrift.TBase<isAuthenticated_result, isAuthenticated_result._Fields>, java.io.Serializable, Cloneable, Comparable<isAuthenticated_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAuthenticated_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new isAuthenticated_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new isAuthenticated_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_result.class, metaDataMap);
+ }
+
+ public isAuthenticated_result() {
+ }
+
+ public isAuthenticated_result(
+ boolean success)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public isAuthenticated_result(isAuthenticated_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ }
+
+ public isAuthenticated_result deepCopy() {
+ return new isAuthenticated_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public isAuthenticated_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof isAuthenticated_result)
+ return this.equals((isAuthenticated_result)that);
+ return false;
+ }
+
+ public boolean equals(isAuthenticated_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(isAuthenticated_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("isAuthenticated_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class isAuthenticated_resultStandardSchemeFactory implements SchemeFactory {
+ public isAuthenticated_resultStandardScheme getScheme() {
+ return new isAuthenticated_resultStandardScheme();
+ }
+ }
+
+ private static class isAuthenticated_resultStandardScheme extends StandardScheme<isAuthenticated_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, isAuthenticated_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class isAuthenticated_resultTupleSchemeFactory implements SchemeFactory {
+ public isAuthenticated_resultTupleScheme getScheme() {
+ return new isAuthenticated_resultTupleScheme();
+ }
+ }
+
+ private static class isAuthenticated_resultTupleScheme extends TupleScheme<isAuthenticated_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class invalidateSession_args implements org.apache.thrift.TBase<invalidateSession_args, invalidateSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<invalidateSession_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_args");
+
+ 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new invalidateSession_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new invalidateSession_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_TOKEN((short)1, "userToken");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ 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")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_args.class, metaDataMap);
+ }
+
+ public invalidateSession_args() {
+ }
+
+ public invalidateSession_args(
+ String userToken)
+ {
+ this();
+ this.userToken = userToken;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public invalidateSession_args(invalidateSession_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ }
+
+ public invalidateSession_args deepCopy() {
+ return new invalidateSession_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public invalidateSession_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ }
+ 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();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof invalidateSession_args)
+ return this.equals((invalidateSession_args)that);
+ return false;
+ }
+
+ public boolean equals(invalidateSession_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(invalidateSession_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;
+ }
+ }
+ 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("invalidateSession_args(");
+ boolean first = true;
+
+ sb.append("userToken:");
+ if (this.userToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userToken);
+ }
+ 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 invalidateSession_argsStandardSchemeFactory implements SchemeFactory {
+ public invalidateSession_argsStandardScheme getScheme() {
+ return new invalidateSession_argsStandardScheme();
+ }
+ }
+
+ private static class invalidateSession_argsStandardScheme extends StandardScheme<invalidateSession_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_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;
+ 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, invalidateSession_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.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class invalidateSession_argsTupleSchemeFactory implements SchemeFactory {
+ public invalidateSession_argsTupleScheme getScheme() {
+ return new invalidateSession_argsTupleScheme();
+ }
+ }
+
+ private static class invalidateSession_argsTupleScheme extends TupleScheme<invalidateSession_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class invalidateSession_result implements org.apache.thrift.TBase<invalidateSession_result, invalidateSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<invalidateSession_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_result");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new invalidateSession_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new invalidateSession_resultTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_result.class, metaDataMap);
+ }
+
+ public invalidateSession_result() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public invalidateSession_result(invalidateSession_result other) {
+ }
+
+ public invalidateSession_result deepCopy() {
+ return new invalidateSession_result(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof invalidateSession_result)
+ return this.equals((invalidateSession_result)that);
+ return false;
+ }
+
+ public boolean equals(invalidateSession_result that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(invalidateSession_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("invalidateSession_result(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class invalidateSession_resultStandardSchemeFactory implements SchemeFactory {
+ public invalidateSession_resultStandardScheme getScheme() {
+ return new invalidateSession_resultStandardScheme();
+ }
+ }
+
+ private static class invalidateSession_resultStandardScheme extends StandardScheme<invalidateSession_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // 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, invalidateSession_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class invalidateSession_resultTupleSchemeFactory implements SchemeFactory {
+ public invalidateSession_resultTupleScheme getScheme() {
+ return new invalidateSession_resultTupleScheme();
+ }
+ }
+
+ private static class invalidateSession_resultTupleScheme extends TupleScheme<invalidateSession_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getOperatingSystems_args implements org.apache.thrift.TBase<getOperatingSystems_args, getOperatingSystems_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getOperatingSystems_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getOperatingSystems_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_args.class, metaDataMap);
+ }
+
+ public getOperatingSystems_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getOperatingSystems_args(getOperatingSystems_args other) {
+ }
+
+ public getOperatingSystems_args deepCopy() {
+ return new getOperatingSystems_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getOperatingSystems_args)
+ return this.equals((getOperatingSystems_args)that);
+ return false;
+ }
+
+ public boolean equals(getOperatingSystems_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getOperatingSystems_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getOperatingSystems_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getOperatingSystems_argsStandardSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_argsStandardScheme getScheme() {
+ return new getOperatingSystems_argsStandardScheme();
+ }
+ }
+
+ private static class getOperatingSystems_argsStandardScheme extends StandardScheme<getOperatingSystems_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_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) {
+ 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, getOperatingSystems_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getOperatingSystems_argsTupleSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_argsTupleScheme getScheme() {
+ return new getOperatingSystems_argsTupleScheme();
+ }
+ }
+
+ private static class getOperatingSystems_argsTupleScheme extends TupleScheme<getOperatingSystems_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getOperatingSystems_result implements org.apache.thrift.TBase<getOperatingSystems_result, getOperatingSystems_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getOperatingSystems_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getOperatingSystems_resultTupleSchemeFactory());
+ }
+
+ public List<OperatingSystem> success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OperatingSystem.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap);
+ }
+
+ public getOperatingSystems_result() {
+ }
+
+ public getOperatingSystems_result(
+ List<OperatingSystem> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getOperatingSystems_result(getOperatingSystems_result other) {
+ if (other.isSetSuccess()) {
+ List<OperatingSystem> __this__success = new ArrayList<OperatingSystem>(other.success.size());
+ for (OperatingSystem other_element : other.success) {
+ __this__success.add(new OperatingSystem(other_element));
+ }
+ this.success = __this__success;
+ }
+ }
+
+ public getOperatingSystems_result deepCopy() {
+ return new getOperatingSystems_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<OperatingSystem> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(OperatingSystem elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<OperatingSystem>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<OperatingSystem> getSuccess() {
+ return this.success;
+ }
+
+ public getOperatingSystems_result setSuccess(List<OperatingSystem> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<OperatingSystem>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getOperatingSystems_result)
+ return this.equals((getOperatingSystems_result)that);
+ return false;
+ }
+
+ public boolean equals(getOperatingSystems_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getOperatingSystems_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getOperatingSystems_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getOperatingSystems_resultStandardSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_resultStandardScheme getScheme() {
+ return new getOperatingSystems_resultStandardScheme();
+ }
+ }
+
+ private static class getOperatingSystems_resultStandardScheme extends StandardScheme<getOperatingSystems_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_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 _list66 = iprot.readListBegin();
+ struct.success = new ArrayList<OperatingSystem>(_list66.size);
+ for (int _i67 = 0; _i67 < _list66.size; ++_i67)
+ {
+ OperatingSystem _elem68;
+ _elem68 = new OperatingSystem();
+ _elem68.read(iprot);
+ struct.success.add(_elem68);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getOperatingSystems_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 (OperatingSystem _iter69 : struct.success)
+ {
+ _iter69.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getOperatingSystems_resultTupleSchemeFactory implements SchemeFactory {
+ public getOperatingSystems_resultTupleScheme getScheme() {
+ return new getOperatingSystems_resultTupleScheme();
+ }
+ }
+
+ private static class getOperatingSystems_resultTupleScheme extends TupleScheme<getOperatingSystems_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (OperatingSystem _iter70 : struct.success)
+ {
+ _iter70.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<OperatingSystem>(_list71.size);
+ for (int _i72 = 0; _i72 < _list71.size; ++_i72)
+ {
+ OperatingSystem _elem73;
+ _elem73 = new OperatingSystem();
+ _elem73.read(iprot);
+ struct.success.add(_elem73);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getVirtualizers_args implements org.apache.thrift.TBase<getVirtualizers_args, getVirtualizers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getVirtualizers_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getVirtualizers_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_args.class, metaDataMap);
+ }
+
+ public getVirtualizers_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getVirtualizers_args(getVirtualizers_args other) {
+ }
+
+ public getVirtualizers_args deepCopy() {
+ return new getVirtualizers_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getVirtualizers_args)
+ return this.equals((getVirtualizers_args)that);
+ return false;
+ }
+
+ public boolean equals(getVirtualizers_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getVirtualizers_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getVirtualizers_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getVirtualizers_argsStandardSchemeFactory implements SchemeFactory {
+ public getVirtualizers_argsStandardScheme getScheme() {
+ return new getVirtualizers_argsStandardScheme();
+ }
+ }
+
+ private static class getVirtualizers_argsStandardScheme extends StandardScheme<getVirtualizers_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_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) {
+ 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, getVirtualizers_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getVirtualizers_argsTupleSchemeFactory implements SchemeFactory {
+ public getVirtualizers_argsTupleScheme getScheme() {
+ return new getVirtualizers_argsTupleScheme();
+ }
+ }
+
+ private static class getVirtualizers_argsTupleScheme extends TupleScheme<getVirtualizers_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getVirtualizers_result implements org.apache.thrift.TBase<getVirtualizers_result, getVirtualizers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getVirtualizers_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getVirtualizers_resultTupleSchemeFactory());
+ }
+
+ public List<Virtualizer> success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Virtualizer.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap);
+ }
+
+ public getVirtualizers_result() {
+ }
+
+ public getVirtualizers_result(
+ List<Virtualizer> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getVirtualizers_result(getVirtualizers_result other) {
+ if (other.isSetSuccess()) {
+ List<Virtualizer> __this__success = new ArrayList<Virtualizer>(other.success.size());
+ for (Virtualizer other_element : other.success) {
+ __this__success.add(new Virtualizer(other_element));
+ }
+ this.success = __this__success;
+ }
+ }
+
+ public getVirtualizers_result deepCopy() {
+ return new getVirtualizers_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<Virtualizer> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(Virtualizer elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<Virtualizer>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<Virtualizer> getSuccess() {
+ return this.success;
+ }
+
+ public getVirtualizers_result setSuccess(List<Virtualizer> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<Virtualizer>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getVirtualizers_result)
+ return this.equals((getVirtualizers_result)that);
+ return false;
+ }
+
+ public boolean equals(getVirtualizers_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getVirtualizers_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getVirtualizers_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getVirtualizers_resultStandardSchemeFactory implements SchemeFactory {
+ public getVirtualizers_resultStandardScheme getScheme() {
+ return new getVirtualizers_resultStandardScheme();
+ }
+ }
+
+ private static class getVirtualizers_resultStandardScheme extends StandardScheme<getVirtualizers_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_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 _list74 = iprot.readListBegin();
+ struct.success = new ArrayList<Virtualizer>(_list74.size);
+ for (int _i75 = 0; _i75 < _list74.size; ++_i75)
+ {
+ Virtualizer _elem76;
+ _elem76 = new Virtualizer();
+ _elem76.read(iprot);
+ struct.success.add(_elem76);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getVirtualizers_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 (Virtualizer _iter77 : struct.success)
+ {
+ _iter77.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getVirtualizers_resultTupleSchemeFactory implements SchemeFactory {
+ public getVirtualizers_resultTupleScheme getScheme() {
+ return new getVirtualizers_resultTupleScheme();
+ }
+ }
+
+ private static class getVirtualizers_resultTupleScheme extends TupleScheme<getVirtualizers_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (Virtualizer _iter78 : struct.success)
+ {
+ _iter78.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<Virtualizer>(_list79.size);
+ for (int _i80 = 0; _i80 < _list79.size; ++_i80)
+ {
+ Virtualizer _elem81;
+ _elem81 = new Virtualizer();
+ _elem81.read(iprot);
+ struct.success.add(_elem81);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getAllOrganizations_args implements org.apache.thrift.TBase<getAllOrganizations_args, getAllOrganizations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrganizations_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOrganizations_args");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getAllOrganizations_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getAllOrganizations_argsTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_args.class, metaDataMap);
+ }
+
+ public getAllOrganizations_args() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAllOrganizations_args(getAllOrganizations_args other) {
+ }
+
+ public getAllOrganizations_args deepCopy() {
+ return new getAllOrganizations_args(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAllOrganizations_args)
+ return this.equals((getAllOrganizations_args)that);
+ return false;
+ }
+
+ public boolean equals(getAllOrganizations_args that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getAllOrganizations_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getAllOrganizations_args(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getAllOrganizations_argsStandardSchemeFactory implements SchemeFactory {
+ public getAllOrganizations_argsStandardScheme getScheme() {
+ return new getAllOrganizations_argsStandardScheme();
+ }
+ }
+
+ private static class getAllOrganizations_argsStandardScheme extends StandardScheme<getAllOrganizations_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_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) {
+ 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, getAllOrganizations_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAllOrganizations_argsTupleSchemeFactory implements SchemeFactory {
+ public getAllOrganizations_argsTupleScheme getScheme() {
+ return new getAllOrganizations_argsTupleScheme();
+ }
+ }
+
+ private static class getAllOrganizations_argsTupleScheme extends TupleScheme<getAllOrganizations_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+ }
+
+ public static class getAllOrganizations_result implements org.apache.thrift.TBase<getAllOrganizations_result, getAllOrganizations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrganizations_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOrganizations_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getAllOrganizations_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getAllOrganizations_resultTupleSchemeFactory());
+ }
+
+ public List<Organization> success; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SUCCESS((short)0, "success");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Organization.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_result.class, metaDataMap);
+ }
+
+ public getAllOrganizations_result() {
+ }
+
+ public getAllOrganizations_result(
+ List<Organization> success)
+ {
+ this();
+ this.success = success;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getAllOrganizations_result(getAllOrganizations_result other) {
+ if (other.isSetSuccess()) {
+ List<Organization> __this__success = new ArrayList<Organization>(other.success.size());
+ for (Organization other_element : other.success) {
+ __this__success.add(new Organization(other_element));
+ }
+ this.success = __this__success;
+ }
+ }
+
+ public getAllOrganizations_result deepCopy() {
+ return new getAllOrganizations_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<Organization> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(Organization elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<Organization>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<Organization> getSuccess() {
+ return this.success;
+ }
+
+ public getAllOrganizations_result setSuccess(List<Organization> success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<Organization>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getAllOrganizations_result)
+ return this.equals((getAllOrganizations_result)that);
+ return false;
+ }
+
+ public boolean equals(getAllOrganizations_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getAllOrganizations_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getAllOrganizations_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getAllOrganizations_resultStandardSchemeFactory implements SchemeFactory {
+ public getAllOrganizations_resultStandardScheme getScheme() {
+ return new getAllOrganizations_resultStandardScheme();
+ }
+ }
+
+ private static class getAllOrganizations_resultStandardScheme extends StandardScheme<getAllOrganizations_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_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 _list82 = iprot.readListBegin();
+ struct.success = new ArrayList<Organization>(_list82.size);
+ for (int _i83 = 0; _i83 < _list82.size; ++_i83)
+ {
+ Organization _elem84;
+ _elem84 = new Organization();
+ _elem84.read(iprot);
+ struct.success.add(_elem84);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOrganizations_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 (Organization _iter85 : struct.success)
+ {
+ _iter85.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getAllOrganizations_resultTupleSchemeFactory implements SchemeFactory {
+ public getAllOrganizations_resultTupleScheme getScheme() {
+ return new getAllOrganizations_resultTupleScheme();
+ }
+ }
+
+ private static class getAllOrganizations_resultTupleScheme extends TupleScheme<getAllOrganizations_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (Organization _iter86 : struct.success)
+ {
+ _iter86.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<Organization>(_list87.size);
+ for (int _i88 = 0; _i88 < _list87.size; ++_i88)
+ {
+ Organization _elem89;
+ _elem89 = new Organization();
+ _elem89.read(iprot);
+ struct.success.add(_elem89);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImageList_args implements org.apache.thrift.TBase<getImageList_args, getImageList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageList_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_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 TAG_SEARCH_FIELD_DESC = new org.apache.thrift.protocol.TField("tagSearch", org.apache.thrift.protocol.TType.LIST, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageList_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageList_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public List<String> tagSearch; // 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"),
+ TAG_SEARCH((short)2, "tagSearch");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // TAG_SEARCH
+ return TAG_SEARCH;
+ 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.TAG_SEARCH, new org.apache.thrift.meta_data.FieldMetaData("tagSearch", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_args.class, metaDataMap);
+ }
+
+ public getImageList_args() {
+ }
+
+ public getImageList_args(
+ String userToken,
+ List<String> tagSearch)
+ {
+ this();
+ this.userToken = userToken;
+ this.tagSearch = tagSearch;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageList_args(getImageList_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetTagSearch()) {
+ List<String> __this__tagSearch = new ArrayList<String>(other.tagSearch);
+ this.tagSearch = __this__tagSearch;
+ }
+ }
+
+ public getImageList_args deepCopy() {
+ return new getImageList_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.tagSearch = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public getImageList_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 getTagSearchSize() {
+ return (this.tagSearch == null) ? 0 : this.tagSearch.size();
+ }
+
+ public java.util.Iterator<String> getTagSearchIterator() {
+ return (this.tagSearch == null) ? null : this.tagSearch.iterator();
+ }
+
+ public void addToTagSearch(String elem) {
+ if (this.tagSearch == null) {
+ this.tagSearch = new ArrayList<String>();
+ }
+ this.tagSearch.add(elem);
+ }
+
+ public List<String> getTagSearch() {
+ return this.tagSearch;
+ }
+
+ public getImageList_args setTagSearch(List<String> tagSearch) {
+ this.tagSearch = tagSearch;
+ return this;
+ }
+
+ public void unsetTagSearch() {
+ this.tagSearch = null;
+ }
+
+ /** Returns true if field tagSearch is set (has been assigned a value) and false otherwise */
+ public boolean isSetTagSearch() {
+ return this.tagSearch != null;
+ }
+
+ public void setTagSearchIsSet(boolean value) {
+ if (!value) {
+ this.tagSearch = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case TAG_SEARCH:
+ if (value == null) {
+ unsetTagSearch();
+ } else {
+ setTagSearch((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case TAG_SEARCH:
+ return getTagSearch();
+
+ }
+ 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 TAG_SEARCH:
+ return isSetTagSearch();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImageList_args)
+ return this.equals((getImageList_args)that);
+ return false;
+ }
+
+ public boolean equals(getImageList_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_tagSearch = true && this.isSetTagSearch();
+ boolean that_present_tagSearch = true && that.isSetTagSearch();
+ if (this_present_tagSearch || that_present_tagSearch) {
+ if (!(this_present_tagSearch && that_present_tagSearch))
+ return false;
+ if (!this.tagSearch.equals(that.tagSearch))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImageList_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(isSetTagSearch()).compareTo(other.isSetTagSearch());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTagSearch()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagSearch, other.tagSearch);
+ 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("getImageList_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("tagSearch:");
+ if (this.tagSearch == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tagSearch);
+ }
+ 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 getImageList_argsStandardSchemeFactory implements SchemeFactory {
+ public getImageList_argsStandardScheme getScheme() {
+ return new getImageList_argsStandardScheme();
+ }
+ }
+
+ private static class getImageList_argsStandardScheme extends StandardScheme<getImageList_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_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: // TAG_SEARCH
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list90 = iprot.readListBegin();
+ struct.tagSearch = new ArrayList<String>(_list90.size);
+ for (int _i91 = 0; _i91 < _list90.size; ++_i91)
+ {
+ String _elem92;
+ _elem92 = iprot.readString();
+ struct.tagSearch.add(_elem92);
+ }
+ iprot.readListEnd();
+ }
+ struct.setTagSearchIsSet(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, getImageList_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tagSearch != null) {
+ 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 _iter93 : struct.tagSearch)
+ {
+ oprot.writeString(_iter93);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageList_argsTupleSchemeFactory implements SchemeFactory {
+ public getImageList_argsTupleScheme getScheme() {
+ return new getImageList_argsTupleScheme();
+ }
+ }
+
+ private static class getImageList_argsTupleScheme extends TupleScheme<getImageList_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetTagSearch()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetTagSearch()) {
+ {
+ oprot.writeI32(struct.tagSearch.size());
+ for (String _iter94 : struct.tagSearch)
+ {
+ oprot.writeString(_iter94);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_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)) {
+ {
+ org.apache.thrift.protocol.TList _list95 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.tagSearch = new ArrayList<String>(_list95.size);
+ for (int _i96 = 0; _i96 < _list95.size; ++_i96)
+ {
+ String _elem97;
+ _elem97 = iprot.readString();
+ struct.tagSearch.add(_elem97);
+ }
+ }
+ struct.setTagSearchIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImageList_result implements org.apache.thrift.TBase<getImageList_result, getImageList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageList_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageList_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageList_resultTupleSchemeFactory());
+ }
+
+ public List<ImageSummaryRead> success; // required
+ public TAuthorizationException authError; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ 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, ImageSummaryRead.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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_result.class, metaDataMap);
+ }
+
+ public getImageList_result() {
+ }
+
+ public getImageList_result(
+ List<ImageSummaryRead> success,
+ TAuthorizationException authError)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageList_result(getImageList_result other) {
+ if (other.isSetSuccess()) {
+ List<ImageSummaryRead> __this__success = new ArrayList<ImageSummaryRead>(other.success.size());
+ for (ImageSummaryRead other_element : other.success) {
+ __this__success.add(new ImageSummaryRead(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ }
+
+ public getImageList_result deepCopy() {
+ return new getImageList_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<ImageSummaryRead> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(ImageSummaryRead elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<ImageSummaryRead>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<ImageSummaryRead> getSuccess() {
+ return this.success;
+ }
+
+ public getImageList_result setSuccess(List<ImageSummaryRead> 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 getImageList_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<ImageSummaryRead>)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ }
+ 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();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImageList_result)
+ return this.equals((getImageList_result)that);
+ return false;
+ }
+
+ public boolean equals(getImageList_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImageList_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;
+ }
+ }
+ 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("getImageList_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;
+ 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 getImageList_resultStandardSchemeFactory implements SchemeFactory {
+ public getImageList_resultStandardScheme getScheme() {
+ return new getImageList_resultStandardScheme();
+ }
+ }
+
+ private static class getImageList_resultStandardScheme extends StandardScheme<getImageList_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_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 _list98 = iprot.readListBegin();
+ struct.success = new ArrayList<ImageSummaryRead>(_list98.size);
+ for (int _i99 = 0; _i99 < _list98.size; ++_i99)
+ {
+ ImageSummaryRead _elem100;
+ _elem100 = new ImageSummaryRead();
+ _elem100.read(iprot);
+ struct.success.add(_elem100);
+ }
+ 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;
+ 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, getImageList_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 (ImageSummaryRead _iter101 : struct.success)
+ {
+ _iter101.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageList_resultTupleSchemeFactory implements SchemeFactory {
+ public getImageList_resultTupleScheme getScheme() {
+ return new getImageList_resultTupleScheme();
+ }
+ }
+
+ private static class getImageList_resultTupleScheme extends TupleScheme<getImageList_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_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);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (ImageSummaryRead _iter102 : struct.success)
+ {
+ _iter102.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<ImageSummaryRead>(_list103.size);
+ for (int _i104 = 0; _i104 < _list103.size; ++_i104)
+ {
+ ImageSummaryRead _elem105;
+ _elem105 = new ImageSummaryRead();
+ _elem105.read(iprot);
+ struct.success.add(_elem105);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImageDetails_args implements org.apache.thrift.TBase<getImageDetails_args, getImageDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_args");
+
+ private static final org.apache.thrift.protocol.TField 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 IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageDetails_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageDetails_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageBaseId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_TOKEN((short)1, "userToken"),
+ IMAGE_BASE_ID((short)2, "imageBaseId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.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.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_args.class, metaDataMap);
+ }
+
+ public getImageDetails_args() {
+ }
+
+ public getImageDetails_args(
+ String userToken,
+ String imageBaseId)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageDetails_args(getImageDetails_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ }
+
+ public getImageDetails_args deepCopy() {
+ return new getImageDetails_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageBaseId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public getImageDetails_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public getImageDetails_args setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case USER_TOKEN:
+ return isSetUserToken();
+ case IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImageDetails_args)
+ return this.equals((getImageDetails_args)that);
+ return false;
+ }
+
+ public boolean equals(getImageDetails_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_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_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImageDetails_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(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(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getImageDetails_args(");
+ boolean first = true;
+
+ sb.append("userToken:");
+ if (this.userToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userToken);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getImageDetails_argsStandardSchemeFactory implements SchemeFactory {
+ public getImageDetails_argsStandardScheme getScheme() {
+ return new getImageDetails_argsStandardScheme();
+ }
+ }
+
+ private static class getImageDetails_argsStandardScheme extends StandardScheme<getImageDetails_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // 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: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageDetails_argsTupleSchemeFactory implements SchemeFactory {
+ public getImageDetails_argsTupleScheme getScheme() {
+ return new getImageDetails_argsTupleScheme();
+ }
+ }
+
+ private static class getImageDetails_argsTupleScheme extends TupleScheme<getImageDetails_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageBaseId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImageDetails_result implements org.apache.thrift.TBase<getImageDetails_result, getImageDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImageDetails_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImageDetails_resultTupleSchemeFactory());
+ }
+
+ public ImageDetailsRead success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // required
+
+ /** 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageDetailsRead.class)));
+ tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_result.class, metaDataMap);
+ }
+
+ public getImageDetails_result() {
+ }
+
+ public getImageDetails_result(
+ ImageDetailsRead success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImageDetails_result(getImageDetails_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new ImageDetailsRead(other.success);
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public getImageDetails_result deepCopy() {
+ return new getImageDetails_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public ImageDetailsRead getSuccess() {
+ return this.success;
+ }
+
+ public getImageDetails_result setSuccess(ImageDetailsRead success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public getImageDetails_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public getImageDetails_result setNotFound(TNotFoundException notFound) {
+ this.notFound = notFound;
+ return this;
+ }
+
+ public void unsetNotFound() {
+ this.notFound = null;
+ }
+
+ /** Returns true if field notFound is set (has been assigned a value) and false otherwise */
+ public boolean isSetNotFound() {
+ return this.notFound != null;
+ }
+
+ public void setNotFoundIsSet(boolean value) {
+ if (!value) {
+ this.notFound = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ImageDetailsRead)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImageDetails_result)
+ return this.equals((getImageDetails_result)that);
+ return false;
+ }
+
+ public boolean equals(getImageDetails_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImageDetails_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getImageDetails_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getImageDetails_resultStandardSchemeFactory implements SchemeFactory {
+ public getImageDetails_resultStandardScheme getScheme() {
+ return new getImageDetails_resultStandardScheme();
+ }
+ }
+
+ private static class getImageDetails_resultStandardScheme extends StandardScheme<getImageDetails_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new ImageDetailsRead();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ struct.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.notFound != null) {
+ oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
+ struct.notFound.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImageDetails_resultTupleSchemeFactory implements SchemeFactory {
+ public getImageDetails_resultTupleScheme getScheme() {
+ return new getImageDetails_resultTupleScheme();
+ }
+ }
+
+ private static class getImageDetails_resultTupleScheme extends TupleScheme<getImageDetails_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ 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);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = new ImageDetailsRead();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateImageBase_args implements org.apache.thrift.TBase<updateImageBase_args, updateImageBase_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageBase_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageBase_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 IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateImageBase_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateImageBase_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageBaseId; // required
+ public ImageBaseWrite image; // 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"),
+ IMAGE_BASE_ID((short)2, "imageBaseId"),
+ IMAGE((short)3, "image");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ case 3: // IMAGE
+ return IMAGE;
+ 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.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageBaseWrite.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_args.class, metaDataMap);
+ }
+
+ public updateImageBase_args() {
+ }
+
+ public updateImageBase_args(
+ String userToken,
+ String imageBaseId,
+ ImageBaseWrite image)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ this.image = image;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateImageBase_args(updateImageBase_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ if (other.isSetImage()) {
+ this.image = new ImageBaseWrite(other.image);
+ }
+ }
+
+ public updateImageBase_args deepCopy() {
+ return new updateImageBase_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageBaseId = null;
+ this.image = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public updateImageBase_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public updateImageBase_args setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public ImageBaseWrite getImage() {
+ return this.image;
+ }
+
+ public updateImageBase_args setImage(ImageBaseWrite image) {
+ this.image = image;
+ return this;
+ }
+
+ public void unsetImage() {
+ this.image = null;
+ }
+
+ /** Returns true if field image is set (has been assigned a value) and false otherwise */
+ public boolean isSetImage() {
+ return this.image != null;
+ }
+
+ public void setImageIsSet(boolean value) {
+ if (!value) {
+ this.image = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ case IMAGE:
+ if (value == null) {
+ unsetImage();
+ } else {
+ setImage((ImageBaseWrite)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ case IMAGE:
+ return getImage();
+
+ }
+ 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 IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ case IMAGE:
+ return isSetImage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateImageBase_args)
+ return this.equals((updateImageBase_args)that);
+ return false;
+ }
+
+ public boolean equals(updateImageBase_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_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ boolean this_present_image = true && this.isSetImage();
+ boolean that_present_image = true && that.isSetImage();
+ if (this_present_image || that_present_image) {
+ if (!(this_present_image && that_present_image))
+ return false;
+ if (!this.image.equals(that.image))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateImageBase_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(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
+ 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("updateImageBase_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("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("image:");
+ if (this.image == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.image);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (image != null) {
+ image.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class updateImageBase_argsStandardSchemeFactory implements SchemeFactory {
+ public updateImageBase_argsStandardScheme getScheme() {
+ return new updateImageBase_argsStandardScheme();
+ }
+ }
+
+ private static class updateImageBase_argsStandardScheme extends StandardScheme<updateImageBase_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_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: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // IMAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.image = new ImageBaseWrite();
+ struct.image.read(iprot);
+ struct.setImageIsSet(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, updateImageBase_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.image != null) {
+ oprot.writeFieldBegin(IMAGE_FIELD_DESC);
+ struct.image.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateImageBase_argsTupleSchemeFactory implements SchemeFactory {
+ public updateImageBase_argsTupleScheme getScheme() {
+ return new updateImageBase_argsTupleScheme();
+ }
+ }
+
+ private static class updateImageBase_argsTupleScheme extends TupleScheme<updateImageBase_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageBaseId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetImage()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ if (struct.isSetImage()) {
+ struct.image.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.image = new ImageBaseWrite();
+ struct.image.read(iprot);
+ struct.setImageIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateImageBase_result implements org.apache.thrift.TBase<updateImageBase_result, updateImageBase_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageBase_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageBase_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateImageBase_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateImageBase_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public TAuthorizationException authError; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_result.class, metaDataMap);
+ }
+
+ public updateImageBase_result() {
+ }
+
+ public updateImageBase_result(
+ boolean success,
+ TAuthorizationException authError)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.authError = authError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateImageBase_result(updateImageBase_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ }
+
+ public updateImageBase_result deepCopy() {
+ return new updateImageBase_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.authError = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updateImageBase_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public updateImageBase_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ }
+ 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();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateImageBase_result)
+ return this.equals((updateImageBase_result)that);
+ return false;
+ }
+
+ public boolean equals(updateImageBase_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ 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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateImageBase_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;
+ }
+ }
+ 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("updateImageBase_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ 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;
+ 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 updateImageBase_resultStandardSchemeFactory implements SchemeFactory {
+ public updateImageBase_resultStandardScheme getScheme() {
+ return new updateImageBase_resultStandardScheme();
+ }
+ }
+
+ private static class updateImageBase_resultStandardScheme extends StandardScheme<updateImageBase_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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;
+ 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, updateImageBase_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateImageBase_resultTupleSchemeFactory implements SchemeFactory {
+ public updateImageBase_resultTupleScheme getScheme() {
+ return new updateImageBase_resultTupleScheme();
+ }
+ }
+
+ private static class updateImageBase_resultTupleScheme extends TupleScheme<updateImageBase_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_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);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateImageVersion_args implements org.apache.thrift.TBase<updateImageVersion_args, updateImageVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageVersion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageVersion_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 IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateImageVersion_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateImageVersion_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageVersionId; // required
+ public ImageVersionWrite image; // 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"),
+ IMAGE_VERSION_ID((short)2, "imageVersionId"),
+ IMAGE((short)3, "image");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_ID;
+ case 3: // IMAGE
+ return IMAGE;
+ 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.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageVersionWrite.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_args.class, metaDataMap);
+ }
+
+ public updateImageVersion_args() {
+ }
+
+ public updateImageVersion_args(
+ String userToken,
+ String imageVersionId,
+ ImageVersionWrite image)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ this.image = image;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateImageVersion_args(updateImageVersion_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ if (other.isSetImage()) {
+ this.image = new ImageVersionWrite(other.image);
+ }
+ }
+
+ public updateImageVersion_args deepCopy() {
+ return new updateImageVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageVersionId = null;
+ this.image = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public updateImageVersion_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public updateImageVersion_args setImageVersionId(String imageVersionId) {
+ this.imageVersionId = imageVersionId;
+ return this;
+ }
+
+ public void unsetImageVersionId() {
+ this.imageVersionId = null;
+ }
+
+ /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageVersionId() {
+ return this.imageVersionId != null;
+ }
+
+ public void setImageVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.imageVersionId = null;
+ }
+ }
+
+ public ImageVersionWrite getImage() {
+ return this.image;
+ }
+
+ public updateImageVersion_args setImage(ImageVersionWrite image) {
+ this.image = image;
+ return this;
+ }
+
+ public void unsetImage() {
+ this.image = null;
+ }
+
+ /** Returns true if field image is set (has been assigned a value) and false otherwise */
+ public boolean isSetImage() {
+ return this.image != null;
+ }
+
+ public void setImageIsSet(boolean value) {
+ if (!value) {
+ this.image = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_VERSION_ID:
+ if (value == null) {
+ unsetImageVersionId();
+ } else {
+ setImageVersionId((String)value);
+ }
+ break;
+
+ case IMAGE:
+ if (value == null) {
+ unsetImage();
+ } else {
+ setImage((ImageVersionWrite)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ case IMAGE:
+ return getImage();
+
+ }
+ 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 IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ case IMAGE:
+ return isSetImage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateImageVersion_args)
+ return this.equals((updateImageVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(updateImageVersion_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_imageVersionId = true && this.isSetImageVersionId();
+ boolean that_present_imageVersionId = true && that.isSetImageVersionId();
+ if (this_present_imageVersionId || that_present_imageVersionId) {
+ if (!(this_present_imageVersionId && that_present_imageVersionId))
+ return false;
+ if (!this.imageVersionId.equals(that.imageVersionId))
+ return false;
+ }
+
+ boolean this_present_image = true && this.isSetImage();
+ boolean that_present_image = true && that.isSetImage();
+ if (this_present_image || that_present_image) {
+ if (!(this_present_image && that_present_image))
+ return false;
+ if (!this.image.equals(that.image))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateImageVersion_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(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
+ 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("updateImageVersion_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("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("image:");
+ if (this.image == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.image);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (image != null) {
+ image.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class updateImageVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public updateImageVersion_argsStandardScheme getScheme() {
+ return new updateImageVersion_argsStandardScheme();
+ }
+ }
+
+ private static class updateImageVersion_argsStandardScheme extends StandardScheme<updateImageVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_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: // IMAGE_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // IMAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.image = new ImageVersionWrite();
+ struct.image.read(iprot);
+ struct.setImageIsSet(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, updateImageVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.image != null) {
+ oprot.writeFieldBegin(IMAGE_FIELD_DESC);
+ struct.image.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateImageVersion_argsTupleSchemeFactory implements SchemeFactory {
+ public updateImageVersion_argsTupleScheme getScheme() {
+ return new updateImageVersion_argsTupleScheme();
+ }
+ }
+
+ private static class updateImageVersion_argsTupleScheme extends TupleScheme<updateImageVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageVersionId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetImage()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ if (struct.isSetImage()) {
+ struct.image.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.image = new ImageVersionWrite();
+ struct.image.read(iprot);
+ struct.setImageIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateImageVersion_result implements org.apache.thrift.TBase<updateImageVersion_result, updateImageVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageVersion_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateImageVersion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateImageVersion_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public TAuthorizationException authError; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_result.class, metaDataMap);
+ }
+
+ public updateImageVersion_result() {
+ }
+
+ public updateImageVersion_result(
+ boolean success,
+ TAuthorizationException authError)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.authError = authError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateImageVersion_result(updateImageVersion_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ }
+
+ public updateImageVersion_result deepCopy() {
+ return new updateImageVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.authError = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updateImageVersion_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public updateImageVersion_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ }
+ 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();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateImageVersion_result)
+ return this.equals((updateImageVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(updateImageVersion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ 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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateImageVersion_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;
+ }
+ }
+ 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("updateImageVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ 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;
+ 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 updateImageVersion_resultStandardSchemeFactory implements SchemeFactory {
+ public updateImageVersion_resultStandardScheme getScheme() {
+ return new updateImageVersion_resultStandardScheme();
+ }
+ }
+
+ private static class updateImageVersion_resultStandardScheme extends StandardScheme<updateImageVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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;
+ 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, updateImageVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateImageVersion_resultTupleSchemeFactory implements SchemeFactory {
+ public updateImageVersion_resultTupleScheme getScheme() {
+ return new updateImageVersion_resultTupleScheme();
+ }
+ }
+
+ private static class updateImageVersion_resultTupleScheme extends TupleScheme<updateImageVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_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);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deleteImageVersion_args implements org.apache.thrift.TBase<deleteImageVersion_args, deleteImageVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageVersion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageVersion_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 IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deleteImageVersion_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deleteImageVersion_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageVersionId; // 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"),
+ IMAGE_VERSION_ID((short)2, "imageVersionId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_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.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", 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(deleteImageVersion_args.class, metaDataMap);
+ }
+
+ public deleteImageVersion_args() {
+ }
+
+ public deleteImageVersion_args(
+ String userToken,
+ String imageVersionId)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deleteImageVersion_args(deleteImageVersion_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ }
+
+ public deleteImageVersion_args deepCopy() {
+ return new deleteImageVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageVersionId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public deleteImageVersion_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public deleteImageVersion_args setImageVersionId(String imageVersionId) {
+ this.imageVersionId = imageVersionId;
+ return this;
+ }
+
+ public void unsetImageVersionId() {
+ this.imageVersionId = null;
+ }
+
+ /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageVersionId() {
+ return this.imageVersionId != null;
+ }
+
+ public void setImageVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.imageVersionId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_VERSION_ID:
+ if (value == null) {
+ unsetImageVersionId();
+ } else {
+ setImageVersionId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ }
+ 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 IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deleteImageVersion_args)
+ return this.equals((deleteImageVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(deleteImageVersion_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_imageVersionId = true && this.isSetImageVersionId();
+ boolean that_present_imageVersionId = true && that.isSetImageVersionId();
+ if (this_present_imageVersionId || that_present_imageVersionId) {
+ if (!(this_present_imageVersionId && that_present_imageVersionId))
+ return false;
+ if (!this.imageVersionId.equals(that.imageVersionId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(deleteImageVersion_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(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ 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("deleteImageVersion_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("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ 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 deleteImageVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public deleteImageVersion_argsStandardScheme getScheme() {
+ return new deleteImageVersion_argsStandardScheme();
+ }
+ }
+
+ private static class deleteImageVersion_argsStandardScheme extends StandardScheme<deleteImageVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_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: // IMAGE_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(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, deleteImageVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deleteImageVersion_argsTupleSchemeFactory implements SchemeFactory {
+ public deleteImageVersion_argsTupleScheme getScheme() {
+ return new deleteImageVersion_argsTupleScheme();
+ }
+ }
+
+ private static class deleteImageVersion_argsTupleScheme extends TupleScheme<deleteImageVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageVersionId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_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.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deleteImageVersion_result implements org.apache.thrift.TBase<deleteImageVersion_result, deleteImageVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageVersion_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deleteImageVersion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deleteImageVersion_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_result.class, metaDataMap);
+ }
+
+ public deleteImageVersion_result() {
+ }
+
+ public deleteImageVersion_result(
+ boolean success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deleteImageVersion_result(deleteImageVersion_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public deleteImageVersion_result deepCopy() {
+ return new deleteImageVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public deleteImageVersion_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public deleteImageVersion_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public deleteImageVersion_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deleteImageVersion_result)
+ return this.equals((deleteImageVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(deleteImageVersion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(deleteImageVersion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("deleteImageVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 deleteImageVersion_resultStandardSchemeFactory implements SchemeFactory {
+ public deleteImageVersion_resultStandardScheme getScheme() {
+ return new deleteImageVersion_resultStandardScheme();
+ }
+ }
+
+ private static class deleteImageVersion_resultStandardScheme extends StandardScheme<deleteImageVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, deleteImageVersion_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deleteImageVersion_resultTupleSchemeFactory implements SchemeFactory {
+ public deleteImageVersion_resultTupleScheme getScheme() {
+ return new deleteImageVersion_resultTupleScheme();
+ }
+ }
+
+ private static class deleteImageVersion_resultTupleScheme extends TupleScheme<deleteImageVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class writeImagePermissions_args implements org.apache.thrift.TBase<writeImagePermissions_args, writeImagePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeImagePermissions_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImagePermissions_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 IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageId", 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new writeImagePermissions_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new writeImagePermissions_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageId; // required
+ public Map<String,ImagePermissions> 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"),
+ IMAGE_ID((short)2, "imageId"),
+ PERMISSIONS((short)3, "permissions");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_ID
+ return IMAGE_ID;
+ case 3: // PERMISSIONS
+ return PERMISSIONS;
+ 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.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageId", 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, ImagePermissions.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_args.class, metaDataMap);
+ }
+
+ public writeImagePermissions_args() {
+ }
+
+ public writeImagePermissions_args(
+ String userToken,
+ String imageId,
+ Map<String,ImagePermissions> permissions)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageId = imageId;
+ this.permissions = permissions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public writeImagePermissions_args(writeImagePermissions_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageId()) {
+ this.imageId = other.imageId;
+ }
+ if (other.isSetPermissions()) {
+ Map<String,ImagePermissions> __this__permissions = new HashMap<String,ImagePermissions>(other.permissions.size());
+ for (Map.Entry<String, ImagePermissions> other_element : other.permissions.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ ImagePermissions other_element_value = other_element.getValue();
+
+ String __this__permissions_copy_key = other_element_key;
+
+ ImagePermissions __this__permissions_copy_value = new ImagePermissions(other_element_value);
+
+ __this__permissions.put(__this__permissions_copy_key, __this__permissions_copy_value);
+ }
+ this.permissions = __this__permissions;
+ }
+ }
+
+ public writeImagePermissions_args deepCopy() {
+ return new writeImagePermissions_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageId = null;
+ this.permissions = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public writeImagePermissions_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageId() {
+ return this.imageId;
+ }
+
+ public writeImagePermissions_args setImageId(String imageId) {
+ this.imageId = imageId;
+ return this;
+ }
+
+ public void unsetImageId() {
+ this.imageId = null;
+ }
+
+ /** Returns true if field imageId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageId() {
+ return this.imageId != null;
+ }
+
+ public void setImageIdIsSet(boolean value) {
+ if (!value) {
+ this.imageId = null;
+ }
+ }
+
+ public int getPermissionsSize() {
+ return (this.permissions == null) ? 0 : this.permissions.size();
+ }
+
+ public void putToPermissions(String key, ImagePermissions val) {
+ if (this.permissions == null) {
+ this.permissions = new HashMap<String,ImagePermissions>();
+ }
+ this.permissions.put(key, val);
+ }
+
+ public Map<String,ImagePermissions> getPermissions() {
+ return this.permissions;
+ }
+
+ public writeImagePermissions_args setPermissions(Map<String,ImagePermissions> 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:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_ID:
+ if (value == null) {
+ unsetImageId();
+ } else {
+ setImageId((String)value);
+ }
+ break;
+
+ case PERMISSIONS:
+ if (value == null) {
+ unsetPermissions();
+ } else {
+ setPermissions((Map<String,ImagePermissions>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_ID:
+ return getImageId();
+
+ case PERMISSIONS:
+ return getPermissions();
+
+ }
+ 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 IMAGE_ID:
+ return isSetImageId();
+ case PERMISSIONS:
+ return isSetPermissions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof writeImagePermissions_args)
+ return this.equals((writeImagePermissions_args)that);
+ return false;
+ }
+
+ public boolean equals(writeImagePermissions_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_imageId = true && this.isSetImageId();
+ boolean that_present_imageId = true && that.isSetImageId();
+ if (this_present_imageId || that_present_imageId) {
+ if (!(this_present_imageId && that_present_imageId))
+ return false;
+ if (!this.imageId.equals(that.imageId))
+ 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;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(writeImagePermissions_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(isSetImageId()).compareTo(other.isSetImageId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageId, other.imageId);
+ if (lastComparison != 0) {
+ 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;
+ }
+
+ 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("writeImagePermissions_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("imageId:");
+ if (this.imageId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageId);
+ }
+ 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();
+ }
+
+ 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 writeImagePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ public writeImagePermissions_argsStandardScheme getScheme() {
+ return new writeImagePermissions_argsStandardScheme();
+ }
+ }
+
+ private static class writeImagePermissions_argsStandardScheme extends StandardScheme<writeImagePermissions_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_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: // IMAGE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageId = iprot.readString();
+ struct.setImageIdIsSet(true);
+ } else {
+ 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 _map106 = iprot.readMapBegin();
+ struct.permissions = new HashMap<String,ImagePermissions>(2*_map106.size);
+ for (int _i107 = 0; _i107 < _map106.size; ++_i107)
+ {
+ String _key108;
+ ImagePermissions _val109;
+ _key108 = iprot.readString();
+ _val109 = new ImagePermissions();
+ _val109.read(iprot);
+ struct.permissions.put(_key108, _val109);
+ }
+ 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);
+ }
+ 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, writeImagePermissions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageId != null) {
+ oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageId);
+ 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<String, ImagePermissions> _iter110 : struct.permissions.entrySet())
+ {
+ oprot.writeString(_iter110.getKey());
+ _iter110.getValue().write(oprot);
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class writeImagePermissions_argsTupleSchemeFactory implements SchemeFactory {
+ public writeImagePermissions_argsTupleScheme getScheme() {
+ return new writeImagePermissions_argsTupleScheme();
+ }
+ }
+
+ private static class writeImagePermissions_argsTupleScheme extends TupleScheme<writeImagePermissions_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPermissions()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageId()) {
+ oprot.writeString(struct.imageId);
+ }
+ if (struct.isSetPermissions()) {
+ {
+ oprot.writeI32(struct.permissions.size());
+ for (Map.Entry<String, ImagePermissions> _iter111 : struct.permissions.entrySet())
+ {
+ oprot.writeString(_iter111.getKey());
+ _iter111.getValue().write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.imageId = iprot.readString();
+ struct.setImageIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TMap _map112 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.permissions = new HashMap<String,ImagePermissions>(2*_map112.size);
+ for (int _i113 = 0; _i113 < _map112.size; ++_i113)
+ {
+ String _key114;
+ ImagePermissions _val115;
+ _key114 = iprot.readString();
+ _val115 = new ImagePermissions();
+ _val115.read(iprot);
+ struct.permissions.put(_key114, _val115);
+ }
+ }
+ struct.setPermissionsIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class writeImagePermissions_result implements org.apache.thrift.TBase<writeImagePermissions_result, writeImagePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeImagePermissions_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImagePermissions_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new writeImagePermissions_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new writeImagePermissions_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_result.class, metaDataMap);
+ }
+
+ public writeImagePermissions_result() {
+ }
+
+ public writeImagePermissions_result(
+ boolean success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public writeImagePermissions_result(writeImagePermissions_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public writeImagePermissions_result deepCopy() {
+ return new writeImagePermissions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public writeImagePermissions_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public writeImagePermissions_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public writeImagePermissions_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof writeImagePermissions_result)
+ return this.equals((writeImagePermissions_result)that);
+ return false;
+ }
+
+ public boolean equals(writeImagePermissions_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(writeImagePermissions_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("writeImagePermissions_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 writeImagePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ public writeImagePermissions_resultStandardScheme getScheme() {
+ return new writeImagePermissions_resultStandardScheme();
+ }
+ }
+
+ private static class writeImagePermissions_resultStandardScheme extends StandardScheme<writeImagePermissions_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, writeImagePermissions_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class writeImagePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ public writeImagePermissions_resultTupleScheme getScheme() {
+ return new writeImagePermissions_resultTupleScheme();
+ }
+ }
+
+ private static class writeImagePermissions_resultTupleScheme extends TupleScheme<writeImagePermissions_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImagePermissions_args implements org.apache.thrift.TBase<getImagePermissions_args, getImagePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImagePermissions_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImagePermissions_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 IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImagePermissions_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImagePermissions_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageBaseId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_TOKEN((short)1, "userToken"),
+ IMAGE_BASE_ID((short)2, "imageBaseId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_BASE_ID
+ return IMAGE_BASE_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.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.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_args.class, metaDataMap);
+ }
+
+ public getImagePermissions_args() {
+ }
+
+ public getImagePermissions_args(
+ String userToken,
+ String imageBaseId)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageBaseId = imageBaseId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImagePermissions_args(getImagePermissions_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageBaseId()) {
+ this.imageBaseId = other.imageBaseId;
+ }
+ }
+
+ public getImagePermissions_args deepCopy() {
+ return new getImagePermissions_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageBaseId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public getImagePermissions_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageBaseId() {
+ return this.imageBaseId;
+ }
+
+ public getImagePermissions_args setImageBaseId(String imageBaseId) {
+ this.imageBaseId = imageBaseId;
+ return this;
+ }
+
+ public void unsetImageBaseId() {
+ this.imageBaseId = null;
+ }
+
+ /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageBaseId() {
+ return this.imageBaseId != null;
+ }
+
+ public void setImageBaseIdIsSet(boolean value) {
+ if (!value) {
+ this.imageBaseId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_BASE_ID:
+ if (value == null) {
+ unsetImageBaseId();
+ } else {
+ setImageBaseId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_BASE_ID:
+ return getImageBaseId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case USER_TOKEN:
+ return isSetUserToken();
+ case IMAGE_BASE_ID:
+ return isSetImageBaseId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImagePermissions_args)
+ return this.equals((getImagePermissions_args)that);
+ return false;
+ }
+
+ public boolean equals(getImagePermissions_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_imageBaseId = true && this.isSetImageBaseId();
+ boolean that_present_imageBaseId = true && that.isSetImageBaseId();
+ if (this_present_imageBaseId || that_present_imageBaseId) {
+ if (!(this_present_imageBaseId && that_present_imageBaseId))
+ return false;
+ if (!this.imageBaseId.equals(that.imageBaseId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImagePermissions_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(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageBaseId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("getImagePermissions_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("imageBaseId:");
+ if (this.imageBaseId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageBaseId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getImagePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ public getImagePermissions_argsStandardScheme getScheme() {
+ return new getImagePermissions_argsStandardScheme();
+ }
+ }
+
+ private static class getImagePermissions_argsStandardScheme extends StandardScheme<getImagePermissions_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_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: // IMAGE_BASE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getImagePermissions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageBaseId != null) {
+ oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
+ oprot.writeString(struct.imageBaseId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImagePermissions_argsTupleSchemeFactory implements SchemeFactory {
+ public getImagePermissions_argsTupleScheme getScheme() {
+ return new getImagePermissions_argsTupleScheme();
+ }
+ }
+
+ private static class getImagePermissions_argsTupleScheme extends TupleScheme<getImagePermissions_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageBaseId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageBaseId()) {
+ oprot.writeString(struct.imageBaseId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_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.imageBaseId = iprot.readString();
+ struct.setImageBaseIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getImagePermissions_result implements org.apache.thrift.TBase<getImagePermissions_result, getImagePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImagePermissions_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImagePermissions_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getImagePermissions_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getImagePermissions_resultTupleSchemeFactory());
+ }
+
+ public Map<String,ImagePermissions> success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ 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.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, ImagePermissions.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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_result.class, metaDataMap);
+ }
+
+ public getImagePermissions_result() {
+ }
+
+ public getImagePermissions_result(
+ Map<String,ImagePermissions> success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getImagePermissions_result(getImagePermissions_result other) {
+ if (other.isSetSuccess()) {
+ Map<String,ImagePermissions> __this__success = new HashMap<String,ImagePermissions>(other.success.size());
+ for (Map.Entry<String, ImagePermissions> other_element : other.success.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ ImagePermissions other_element_value = other_element.getValue();
+
+ String __this__success_copy_key = other_element_key;
+
+ ImagePermissions __this__success_copy_value = new ImagePermissions(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);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public getImagePermissions_result deepCopy() {
+ return new getImagePermissions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public void putToSuccess(String key, ImagePermissions val) {
+ if (this.success == null) {
+ this.success = new HashMap<String,ImagePermissions>();
+ }
+ this.success.put(key, val);
+ }
+
+ public Map<String,ImagePermissions> getSuccess() {
+ return this.success;
+ }
+
+ public getImagePermissions_result setSuccess(Map<String,ImagePermissions> 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 getImagePermissions_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public getImagePermissions_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Map<String,ImagePermissions>)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getImagePermissions_result)
+ return this.equals((getImagePermissions_result)that);
+ return false;
+ }
+
+ public boolean equals(getImagePermissions_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getImagePermissions_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("getImagePermissions_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 getImagePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ public getImagePermissions_resultStandardScheme getScheme() {
+ return new getImagePermissions_resultStandardScheme();
+ }
+ }
+
+ private static class getImagePermissions_resultStandardScheme extends StandardScheme<getImagePermissions_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_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.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map116 = iprot.readMapBegin();
+ struct.success = new HashMap<String,ImagePermissions>(2*_map116.size);
+ for (int _i117 = 0; _i117 < _map116.size; ++_i117)
+ {
+ String _key118;
+ ImagePermissions _val119;
+ _key118 = iprot.readString();
+ _val119 = new ImagePermissions();
+ _val119.read(iprot);
+ struct.success.put(_key118, _val119);
+ }
+ 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();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, getImagePermissions_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<String, ImagePermissions> _iter120 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter120.getKey());
+ _iter120.getValue().write(oprot);
+ }
+ oprot.writeMapEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getImagePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ public getImagePermissions_resultTupleScheme getScheme() {
+ return new getImagePermissions_resultTupleScheme();
+ }
+ }
+
+ private static class getImagePermissions_resultTupleScheme extends TupleScheme<getImagePermissions_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (Map.Entry<String, ImagePermissions> _iter121 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter121.getKey());
+ _iter121.getValue().write(oprot);
+ }
+ }
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TMap _map122 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new HashMap<String,ImagePermissions>(2*_map122.size);
+ for (int _i123 = 0; _i123 < _map122.size; ++_i123)
+ {
+ String _key124;
+ ImagePermissions _val125;
+ _key124 = iprot.readString();
+ _val125 = new ImagePermissions();
+ _val125.read(iprot);
+ struct.success.put(_key124, _val125);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class createLecture_args implements org.apache.thrift.TBase<createLecture_args, createLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<createLecture_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLecture_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_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createLecture_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createLecture_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public LectureWrite lecture; // 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((short)2, "lecture");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // LECTURE
+ return LECTURE;
+ 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.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_args.class, metaDataMap);
+ }
+
+ public createLecture_args() {
+ }
+
+ public createLecture_args(
+ String userToken,
+ LectureWrite lecture)
+ {
+ this();
+ this.userToken = userToken;
+ this.lecture = lecture;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createLecture_args(createLecture_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetLecture()) {
+ this.lecture = new LectureWrite(other.lecture);
+ }
+ }
+
+ public createLecture_args deepCopy() {
+ return new createLecture_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.lecture = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public createLecture_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 LectureWrite getLecture() {
+ return this.lecture;
+ }
+
+ public createLecture_args setLecture(LectureWrite lecture) {
+ this.lecture = lecture;
+ return this;
+ }
+
+ public void unsetLecture() {
+ this.lecture = null;
+ }
+
+ /** Returns true if field lecture is set (has been assigned a value) and false otherwise */
+ public boolean isSetLecture() {
+ return this.lecture != null;
+ }
+
+ public void setLectureIsSet(boolean value) {
+ if (!value) {
+ this.lecture = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case LECTURE:
+ if (value == null) {
+ unsetLecture();
+ } else {
+ setLecture((LectureWrite)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case LECTURE:
+ return getLecture();
+
+ }
+ 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 LECTURE:
+ return isSetLecture();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof createLecture_args)
+ return this.equals((createLecture_args)that);
+ return false;
+ }
+
+ public boolean equals(createLecture_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_lecture = true && this.isSetLecture();
+ boolean that_present_lecture = true && that.isSetLecture();
+ if (this_present_lecture || that_present_lecture) {
+ if (!(this_present_lecture && that_present_lecture))
+ return false;
+ if (!this.lecture.equals(that.lecture))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(createLecture_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(isSetLecture()).compareTo(other.isSetLecture());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLecture()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture, other.lecture);
+ 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("createLecture_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("lecture:");
+ if (this.lecture == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lecture);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (lecture != null) {
+ lecture.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class createLecture_argsStandardSchemeFactory implements SchemeFactory {
+ public createLecture_argsStandardScheme getScheme() {
+ return new createLecture_argsStandardScheme();
+ }
+ }
+
+ private static class createLecture_argsStandardScheme extends StandardScheme<createLecture_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_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: // LECTURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.lecture = new LectureWrite();
+ struct.lecture.read(iprot);
+ struct.setLectureIsSet(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, createLecture_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lecture != null) {
+ oprot.writeFieldBegin(LECTURE_FIELD_DESC);
+ struct.lecture.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class createLecture_argsTupleSchemeFactory implements SchemeFactory {
+ public createLecture_argsTupleScheme getScheme() {
+ return new createLecture_argsTupleScheme();
+ }
+ }
+
+ private static class createLecture_argsTupleScheme extends TupleScheme<createLecture_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLecture()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetLecture()) {
+ struct.lecture.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_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.lecture = new LectureWrite();
+ struct.lecture.read(iprot);
+ struct.setLectureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class createLecture_result implements org.apache.thrift.TBase<createLecture_result, createLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<createLecture_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLecture_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
+ private static final 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createLecture_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createLecture_resultTupleSchemeFactory());
+ }
+
+ public String success; // required
+ public TAuthorizationException authError; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_result.class, metaDataMap);
+ }
+
+ public createLecture_result() {
+ }
+
+ public createLecture_result(
+ String success,
+ TAuthorizationException authError)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public createLecture_result(createLecture_result other) {
+ if (other.isSetSuccess()) {
+ this.success = other.success;
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ }
+
+ public createLecture_result deepCopy() {
+ return new createLecture_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ }
+
+ public String getSuccess() {
+ return this.success;
+ }
+
+ public createLecture_result setSuccess(String 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 createLecture_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((String)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ }
+ 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();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof createLecture_result)
+ return this.equals((createLecture_result)that);
+ return false;
+ }
+
+ public boolean equals(createLecture_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(createLecture_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;
+ }
+ }
+ 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("createLecture_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;
+ 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 createLecture_resultStandardSchemeFactory implements SchemeFactory {
+ public createLecture_resultStandardScheme getScheme() {
+ return new createLecture_resultStandardScheme();
+ }
+ }
+
+ private static class createLecture_resultStandardScheme extends StandardScheme<createLecture_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.success = iprot.readString();
+ struct.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;
+ 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, createLecture_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeString(struct.success);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class createLecture_resultTupleSchemeFactory implements SchemeFactory {
+ public createLecture_resultTupleScheme getScheme() {
+ return new createLecture_resultTupleScheme();
+ }
+ }
+
+ private static class createLecture_resultTupleScheme extends TupleScheme<createLecture_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_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);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ oprot.writeString(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.success = iprot.readString();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateLecture_args implements org.apache.thrift.TBase<updateLecture_args, updateLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecture_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecture_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 LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateLecture_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateLecture_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String lectureId; // required
+ public LectureWrite lecture; // 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((short)3, "lecture");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // LECTURE_ID
+ return LECTURE_ID;
+ case 3: // LECTURE
+ return LECTURE;
+ 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.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.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_args.class, metaDataMap);
+ }
+
+ public updateLecture_args() {
+ }
+
+ public updateLecture_args(
+ String userToken,
+ String lectureId,
+ LectureWrite lecture)
+ {
+ this();
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ this.lecture = lecture;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateLecture_args(updateLecture_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetLectureId()) {
+ this.lectureId = other.lectureId;
+ }
+ if (other.isSetLecture()) {
+ this.lecture = new LectureWrite(other.lecture);
+ }
+ }
+
+ public updateLecture_args deepCopy() {
+ return new updateLecture_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.lectureId = null;
+ this.lecture = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public updateLecture_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getLectureId() {
+ return this.lectureId;
+ }
+
+ public updateLecture_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 LectureWrite getLecture() {
+ return this.lecture;
+ }
+
+ public updateLecture_args setLecture(LectureWrite lecture) {
+ this.lecture = lecture;
+ return this;
+ }
+
+ public void unsetLecture() {
+ this.lecture = null;
+ }
+
+ /** Returns true if field lecture is set (has been assigned a value) and false otherwise */
+ public boolean isSetLecture() {
+ return this.lecture != null;
+ }
+
+ public void setLectureIsSet(boolean value) {
+ if (!value) {
+ this.lecture = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureId();
+ } else {
+ setLectureId((String)value);
+ }
+ break;
+
+ case LECTURE:
+ if (value == null) {
+ unsetLecture();
+ } else {
+ setLecture((LectureWrite)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case LECTURE_ID:
+ return getLectureId();
+
+ case LECTURE:
+ return getLecture();
+
+ }
+ 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 LECTURE_ID:
+ return isSetLectureId();
+ case LECTURE:
+ return isSetLecture();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateLecture_args)
+ return this.equals((updateLecture_args)that);
+ return false;
+ }
+
+ public boolean equals(updateLecture_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_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_lecture = true && this.isSetLecture();
+ boolean that_present_lecture = true && that.isSetLecture();
+ if (this_present_lecture || that_present_lecture) {
+ if (!(this_present_lecture && that_present_lecture))
+ return false;
+ if (!this.lecture.equals(that.lecture))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateLecture_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(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(isSetLecture()).compareTo(other.isSetLecture());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLecture()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture, other.lecture);
+ 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("updateLecture_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("lectureId:");
+ if (this.lectureId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lecture:");
+ if (this.lecture == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lecture);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (lecture != null) {
+ lecture.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class updateLecture_argsStandardSchemeFactory implements SchemeFactory {
+ public updateLecture_argsStandardScheme getScheme() {
+ return new updateLecture_argsStandardScheme();
+ }
+ }
+
+ private static class updateLecture_argsStandardScheme extends StandardScheme<updateLecture_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_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: // 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: // LECTURE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.lecture = new LectureWrite();
+ struct.lecture.read(iprot);
+ struct.setLectureIsSet(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, updateLecture_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lectureId != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ oprot.writeString(struct.lectureId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lecture != null) {
+ oprot.writeFieldBegin(LECTURE_FIELD_DESC);
+ struct.lecture.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateLecture_argsTupleSchemeFactory implements SchemeFactory {
+ public updateLecture_argsTupleScheme getScheme() {
+ return new updateLecture_argsTupleScheme();
+ }
+ }
+
+ private static class updateLecture_argsTupleScheme extends TupleScheme<updateLecture_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_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.isSetLecture()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetLectureId()) {
+ oprot.writeString(struct.lectureId);
+ }
+ if (struct.isSetLecture()) {
+ struct.lecture.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lectureId = iprot.readString();
+ struct.setLectureIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.lecture = new LectureWrite();
+ struct.lecture.read(iprot);
+ struct.setLectureIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class updateLecture_result implements org.apache.thrift.TBase<updateLecture_result, updateLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecture_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecture_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
+ private static final 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new updateLecture_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new updateLecture_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_result.class, metaDataMap);
+ }
+
+ public updateLecture_result() {
+ }
+
+ public updateLecture_result(
+ boolean success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public updateLecture_result(updateLecture_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public updateLecture_result deepCopy() {
+ return new updateLecture_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public updateLecture_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public updateLecture_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public updateLecture_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof updateLecture_result)
+ return this.equals((updateLecture_result)that);
+ return false;
+ }
+
+ public boolean equals(updateLecture_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(updateLecture_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("updateLecture_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 updateLecture_resultStandardSchemeFactory implements SchemeFactory {
+ public updateLecture_resultStandardScheme getScheme() {
+ return new updateLecture_resultStandardScheme();
+ }
+ }
+
+ private static class updateLecture_resultStandardScheme extends StandardScheme<updateLecture_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, updateLecture_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class updateLecture_resultTupleSchemeFactory implements SchemeFactory {
+ public updateLecture_resultTupleScheme getScheme() {
+ return new updateLecture_resultTupleScheme();
+ }
+ }
+
+ private static class updateLecture_resultTupleScheme extends TupleScheme<updateLecture_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLectureList_args implements org.apache.thrift.TBase<getLectureList_args, getLectureList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLectureList_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLectureList_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_TOKEN((short)1, "userToken");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ 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")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap);
+ }
+
+ public getLectureList_args() {
+ }
+
+ public getLectureList_args(
+ String userToken)
+ {
+ this();
+ this.userToken = userToken;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLectureList_args(getLectureList_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ }
+
+ public getLectureList_args deepCopy() {
+ return new getLectureList_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ }
+
+ 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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ }
+ 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();
+ }
+ 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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @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;
+ }
+ }
+ 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;
+ 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_argsStandardSchemeFactory implements SchemeFactory {
+ public getLectureList_argsStandardScheme getScheme() {
+ return new getLectureList_argsStandardScheme();
+ }
+ }
+
+ private static class getLectureList_argsStandardScheme extends StandardScheme<getLectureList_args> {
+
+ 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;
+ 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.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<getLectureList_args> {
+
+ @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);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ }
+
+ @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(1);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLectureList_result implements org.apache.thrift.TBase<getLectureList_result, getLectureList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_result> {
+ 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory());
+ }
+
+ public List<LectureSummary> success; // required
+ public TAuthorizationException authError; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap);
+ }
+
+ public getLectureList_result() {
+ }
+
+ public getLectureList_result(
+ List<LectureSummary> success,
+ TAuthorizationException authError)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLectureList_result(getLectureList_result other) {
+ if (other.isSetSuccess()) {
+ List<LectureSummary> __this__success = new ArrayList<LectureSummary>(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);
+ }
+ }
+
+ public getLectureList_result deepCopy() {
+ return new getLectureList_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<LectureSummary> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(LectureSummary elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<LectureSummary>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<LectureSummary> getSuccess() {
+ return this.success;
+ }
+
+ public getLectureList_result setSuccess(List<LectureSummary> 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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<LectureSummary>)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ }
+ 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();
+ }
+ 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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @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;
+ }
+ }
+ 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;
+ 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<getLectureList_result> {
+
+ 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 _list126 = iprot.readListBegin();
+ struct.success = new ArrayList<LectureSummary>(_list126.size);
+ for (int _i127 = 0; _i127 < _list126.size; ++_i127)
+ {
+ LectureSummary _elem128;
+ _elem128 = new LectureSummary();
+ _elem128.read(iprot);
+ struct.success.add(_elem128);
+ }
+ 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;
+ 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 _iter129 : struct.success)
+ {
+ _iter129.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.authError != null) {
+ oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
+ struct.authError.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<getLectureList_result> {
+
+ @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);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (LectureSummary _iter130 : struct.success)
+ {
+ _iter130.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.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(2);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<LectureSummary>(_list131.size);
+ for (int _i132 = 0; _i132 < _list131.size; ++_i132)
+ {
+ LectureSummary _elem133;
+ _elem133 = new LectureSummary();
+ _elem133.read(iprot);
+ struct.success.add(_elem133);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLectureDetails_args implements org.apache.thrift.TBase<getLectureDetails_args, getLectureDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureDetails_args> {
+ 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // 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.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);
+ }
+
+ public getLectureDetails_args() {
+ }
+
+ public getLectureDetails_args(
+ String userToken,
+ String lectureId)
+ {
+ this();
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLectureDetails_args(getLectureDetails_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetLectureId()) {
+ this.lectureId = other.lectureId;
+ }
+ }
+
+ public getLectureDetails_args deepCopy() {
+ return new getLectureDetails_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.lectureId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public getLectureDetails_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getLectureId() {
+ return this.lectureId;
+ }
+
+ public getLectureDetails_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureId();
+ } else {
+ setLectureId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case LECTURE_ID:
+ return getLectureId();
+
+ }
+ 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 LECTURE_ID:
+ return isSetLectureId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getLectureDetails_args)
+ return this.equals((getLectureDetails_args)that);
+ return false;
+ }
+
+ public boolean equals(getLectureDetails_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_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getLectureDetails_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(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;
+ }
+ }
+ 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("getLectureDetails_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("lectureId:");
+ if (this.lectureId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureId);
+ }
+ 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 getLectureDetails_argsStandardSchemeFactory implements SchemeFactory {
+ public getLectureDetails_argsStandardScheme getScheme() {
+ return new getLectureDetails_argsStandardScheme();
+ }
+ }
+
+ private static class getLectureDetails_argsStandardScheme extends StandardScheme<getLectureDetails_args> {
+
+ 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)
+ {
+ 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: // 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;
+ 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, getLectureDetails_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lectureId != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ oprot.writeString(struct.lectureId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLectureDetails_argsTupleSchemeFactory implements SchemeFactory {
+ public getLectureDetails_argsTupleScheme getScheme() {
+ return new getLectureDetails_argsTupleScheme();
+ }
+ }
+
+ private static class getLectureDetails_argsTupleScheme extends TupleScheme<getLectureDetails_args> {
+
+ @Override
+ 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.isSetLectureId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetLectureId()) {
+ oprot.writeString(struct.lectureId);
+ }
+ }
+
+ @Override
+ 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)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lectureId = iprot.readString();
+ struct.setLectureIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLectureDetails_result implements org.apache.thrift.TBase<getLectureDetails_result, getLectureDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureDetails_result> {
+ 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.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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLectureDetails_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLectureDetails_resultTupleSchemeFactory());
+ }
+
+ public LectureRead success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_result.class, metaDataMap);
+ }
+
+ public getLectureDetails_result() {
+ }
+
+ public getLectureDetails_result(
+ LectureRead success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLectureDetails_result(getLectureDetails_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new LectureRead(other.success);
+ }
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public getLectureDetails_result deepCopy() {
+ return new getLectureDetails_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ this.notFound = 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) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public 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 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();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getLectureDetails_result)
+ return this.equals((getLectureDetails_result)that);
+ return false;
+ }
+
+ public boolean equals(getLectureDetails_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getLectureDetails_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("getLectureDetails_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (success != null) {
+ success.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class getLectureDetails_resultStandardSchemeFactory implements SchemeFactory {
+ public getLectureDetails_resultStandardScheme getScheme() {
+ return new getLectureDetails_resultStandardScheme();
+ }
+ }
+
+ private static class getLectureDetails_resultStandardScheme extends StandardScheme<getLectureDetails_result> {
+
+ 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)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new 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();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, getLectureDetails_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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLectureDetails_resultTupleSchemeFactory implements SchemeFactory {
+ public getLectureDetails_resultTupleScheme getScheme() {
+ return new getLectureDetails_resultTupleScheme();
+ }
+ }
+
+ private static class getLectureDetails_resultTupleScheme extends TupleScheme<getLectureDetails_result> {
+
+ @Override
+ 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()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ 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);
+ }
+ }
+
+ @Override
+ 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);
+ 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)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLecturesByImageVersion_args implements org.apache.thrift.TBase<getLecturesByImageVersion_args, getLecturesByImageVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturesByImageVersion_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturesByImageVersion_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 IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLecturesByImageVersion_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLecturesByImageVersion_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String imageVersionId; // 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"),
+ IMAGE_VERSION_ID((short)2, "imageVersionId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // IMAGE_VERSION_ID
+ return IMAGE_VERSION_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.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", 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(getLecturesByImageVersion_args.class, metaDataMap);
+ }
+
+ public getLecturesByImageVersion_args() {
+ }
+
+ public getLecturesByImageVersion_args(
+ String userToken,
+ String imageVersionId)
+ {
+ this();
+ this.userToken = userToken;
+ this.imageVersionId = imageVersionId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLecturesByImageVersion_args(getLecturesByImageVersion_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetImageVersionId()) {
+ this.imageVersionId = other.imageVersionId;
+ }
+ }
+
+ public getLecturesByImageVersion_args deepCopy() {
+ return new getLecturesByImageVersion_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.imageVersionId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public getLecturesByImageVersion_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getImageVersionId() {
+ return this.imageVersionId;
+ }
+
+ public getLecturesByImageVersion_args setImageVersionId(String imageVersionId) {
+ this.imageVersionId = imageVersionId;
+ return this;
+ }
+
+ public void unsetImageVersionId() {
+ this.imageVersionId = null;
+ }
+
+ /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetImageVersionId() {
+ return this.imageVersionId != null;
+ }
+
+ public void setImageVersionIdIsSet(boolean value) {
+ if (!value) {
+ this.imageVersionId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case IMAGE_VERSION_ID:
+ if (value == null) {
+ unsetImageVersionId();
+ } else {
+ setImageVersionId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case IMAGE_VERSION_ID:
+ return getImageVersionId();
+
+ }
+ 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 IMAGE_VERSION_ID:
+ return isSetImageVersionId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getLecturesByImageVersion_args)
+ return this.equals((getLecturesByImageVersion_args)that);
+ return false;
+ }
+
+ public boolean equals(getLecturesByImageVersion_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_imageVersionId = true && this.isSetImageVersionId();
+ boolean that_present_imageVersionId = true && that.isSetImageVersionId();
+ if (this_present_imageVersionId || that_present_imageVersionId) {
+ if (!(this_present_imageVersionId && that_present_imageVersionId))
+ return false;
+ if (!this.imageVersionId.equals(that.imageVersionId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getLecturesByImageVersion_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(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetImageVersionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
+ 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("getLecturesByImageVersion_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("imageVersionId:");
+ if (this.imageVersionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.imageVersionId);
+ }
+ 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 getLecturesByImageVersion_argsStandardSchemeFactory implements SchemeFactory {
+ public getLecturesByImageVersion_argsStandardScheme getScheme() {
+ return new getLecturesByImageVersion_argsStandardScheme();
+ }
+ }
+
+ private static class getLecturesByImageVersion_argsStandardScheme extends StandardScheme<getLecturesByImageVersion_args> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturesByImageVersion_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: // IMAGE_VERSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(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, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.imageVersionId != null) {
+ oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
+ oprot.writeString(struct.imageVersionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLecturesByImageVersion_argsTupleSchemeFactory implements SchemeFactory {
+ public getLecturesByImageVersion_argsTupleScheme getScheme() {
+ return new getLecturesByImageVersion_argsTupleScheme();
+ }
+ }
+
+ private static class getLecturesByImageVersion_argsTupleScheme extends TupleScheme<getLecturesByImageVersion_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetImageVersionId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetImageVersionId()) {
+ oprot.writeString(struct.imageVersionId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_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.imageVersionId = iprot.readString();
+ struct.setImageVersionIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLecturesByImageVersion_result implements org.apache.thrift.TBase<getLecturesByImageVersion_result, getLecturesByImageVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturesByImageVersion_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturesByImageVersion_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 NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLecturesByImageVersion_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLecturesByImageVersion_resultTupleSchemeFactory());
+ }
+
+ public List<LectureSummary> success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ 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.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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturesByImageVersion_result.class, metaDataMap);
+ }
+
+ public getLecturesByImageVersion_result() {
+ }
+
+ public getLecturesByImageVersion_result(
+ List<LectureSummary> success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLecturesByImageVersion_result(getLecturesByImageVersion_result other) {
+ if (other.isSetSuccess()) {
+ List<LectureSummary> __this__success = new ArrayList<LectureSummary>(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.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public getLecturesByImageVersion_result deepCopy() {
+ return new getLecturesByImageVersion_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator<LectureSummary> getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(LectureSummary elem) {
+ if (this.success == null) {
+ this.success = new ArrayList<LectureSummary>();
+ }
+ this.success.add(elem);
+ }
+
+ public List<LectureSummary> getSuccess() {
+ return this.success;
+ }
+
+ public getLecturesByImageVersion_result setSuccess(List<LectureSummary> 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 getLecturesByImageVersion_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public getLecturesByImageVersion_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List<LectureSummary>)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getLecturesByImageVersion_result)
+ return this.equals((getLecturesByImageVersion_result)that);
+ return false;
+ }
+
+ public boolean equals(getLecturesByImageVersion_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getLecturesByImageVersion_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("getLecturesByImageVersion_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 getLecturesByImageVersion_resultStandardSchemeFactory implements SchemeFactory {
+ public getLecturesByImageVersion_resultStandardScheme getScheme() {
+ return new getLecturesByImageVersion_resultStandardScheme();
+ }
+ }
+
+ private static class getLecturesByImageVersion_resultStandardScheme extends StandardScheme<getLecturesByImageVersion_result> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturesByImageVersion_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 _list134 = iprot.readListBegin();
+ struct.success = new ArrayList<LectureSummary>(_list134.size);
+ for (int _i135 = 0; _i135 < _list134.size; ++_i135)
+ {
+ LectureSummary _elem136;
+ _elem136 = new LectureSummary();
+ _elem136.read(iprot);
+ struct.success.add(_elem136);
+ }
+ 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: // 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;
+ 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, getLecturesByImageVersion_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 _iter137 : struct.success)
+ {
+ _iter137.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLecturesByImageVersion_resultTupleSchemeFactory implements SchemeFactory {
+ public getLecturesByImageVersion_resultTupleScheme getScheme() {
+ return new getLecturesByImageVersion_resultTupleScheme();
+ }
+ }
+
+ private static class getLecturesByImageVersion_resultTupleScheme extends TupleScheme<getLecturesByImageVersion_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_result struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (LectureSummary _iter138 : struct.success)
+ {
+ _iter138.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_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 _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new ArrayList<LectureSummary>(_list139.size);
+ for (int _i140 = 0; _i140 < _list139.size; ++_i140)
+ {
+ LectureSummary _elem141;
+ _elem141 = new LectureSummary();
+ _elem141.read(iprot);
+ struct.success.add(_elem141);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deleteLecture_args implements org.apache.thrift.TBase<deleteLecture_args, deleteLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLecture_args> {
+ 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deleteLecture_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deleteLecture_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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // 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.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(deleteLecture_args.class, metaDataMap);
+ }
+
+ public deleteLecture_args() {
+ }
+
+ public deleteLecture_args(
+ String userToken,
+ String lectureId)
+ {
+ this();
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deleteLecture_args(deleteLecture_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetLectureId()) {
+ this.lectureId = other.lectureId;
+ }
+ }
+
+ public deleteLecture_args deepCopy() {
+ return new deleteLecture_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.lectureId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public deleteLecture_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getLectureId() {
+ return this.lectureId;
+ }
+
+ public deleteLecture_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureId();
+ } else {
+ setLectureId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case LECTURE_ID:
+ return getLectureId();
+
+ }
+ 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 LECTURE_ID:
+ return isSetLectureId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deleteLecture_args)
+ return this.equals((deleteLecture_args)that);
+ return false;
+ }
+
+ public boolean equals(deleteLecture_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_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(deleteLecture_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(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;
+ }
+ }
+ 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("deleteLecture_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("lectureId:");
+ if (this.lectureId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureId);
+ }
+ 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 deleteLecture_argsStandardSchemeFactory implements SchemeFactory {
+ public deleteLecture_argsStandardScheme getScheme() {
+ return new deleteLecture_argsStandardScheme();
+ }
+ }
+
+ private static class deleteLecture_argsStandardScheme extends StandardScheme<deleteLecture_args> {
+
+ 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)
+ {
+ 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: // 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;
+ 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, deleteLecture_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lectureId != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ oprot.writeString(struct.lectureId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deleteLecture_argsTupleSchemeFactory implements SchemeFactory {
+ public deleteLecture_argsTupleScheme getScheme() {
+ return new deleteLecture_argsTupleScheme();
+ }
+ }
+
+ private static class deleteLecture_argsTupleScheme extends TupleScheme<deleteLecture_args> {
+
+ @Override
+ 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()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLectureId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetLectureId()) {
+ oprot.writeString(struct.lectureId);
+ }
+ }
+
+ @Override
+ 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)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lectureId = iprot.readString();
+ struct.setLectureIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class deleteLecture_result implements org.apache.thrift.TBase<deleteLecture_result, deleteLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLecture_result> {
+ 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.BOOL, (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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new deleteLecture_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new deleteLecture_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_result.class, metaDataMap);
+ }
+
+ public deleteLecture_result() {
+ }
+
+ public deleteLecture_result(
+ boolean success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public deleteLecture_result(deleteLecture_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public deleteLecture_result deepCopy() {
+ return new deleteLecture_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public deleteLecture_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public deleteLecture_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public deleteLecture_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof deleteLecture_result)
+ return this.equals((deleteLecture_result)that);
+ return false;
+ }
+
+ public boolean equals(deleteLecture_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ 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;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("deleteLecture_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 deleteLecture_resultStandardSchemeFactory implements SchemeFactory {
+ public deleteLecture_resultStandardScheme getScheme() {
+ return new deleteLecture_resultStandardScheme();
+ }
+ }
+
+ private static class deleteLecture_resultStandardScheme extends StandardScheme<deleteLecture_result> {
+
+ 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)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, deleteLecture_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class deleteLecture_resultTupleSchemeFactory implements SchemeFactory {
+ public deleteLecture_resultTupleScheme getScheme() {
+ return new deleteLecture_resultTupleScheme();
+ }
+ }
+
+ private static class deleteLecture_resultTupleScheme extends TupleScheme<deleteLecture_result> {
+
+ @Override
+ 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);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ 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(3);
+ if (incoming.get(0)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class writeLecturePermissions_args implements org.apache.thrift.TBase<writeLecturePermissions_args, writeLecturePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeLecturePermissions_args> {
+ 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new writeLecturePermissions_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new writeLecturePermissions_argsTupleSchemeFactory());
+ }
+
+ public String userToken; // required
+ public String lectureId; // required
+ public Map<String,LecturePermissions> 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // LECTURE_ID
+ return LECTURE_ID;
+ case 3: // PERMISSIONS
+ return PERMISSIONS;
+ 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.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);
+ }
+
+ public writeLecturePermissions_args() {
+ }
+
+ public writeLecturePermissions_args(
+ String userToken,
+ String lectureId,
+ Map<String,LecturePermissions> permissions)
+ {
+ this();
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ this.permissions = permissions;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public writeLecturePermissions_args(writeLecturePermissions_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetLectureId()) {
+ this.lectureId = other.lectureId;
+ }
+ if (other.isSetPermissions()) {
+ Map<String,LecturePermissions> __this__permissions = new HashMap<String,LecturePermissions>(other.permissions.size());
+ for (Map.Entry<String, LecturePermissions> 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);
+ }
+
+ @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) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getLectureId() {
+ return this.lectureId;
+ }
+
+ public writeLecturePermissions_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 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<String,LecturePermissions>();
+ }
+ this.permissions.put(key, val);
+ }
+
+ public Map<String,LecturePermissions> getPermissions() {
+ return this.permissions;
+ }
+
+ public writeLecturePermissions_args setPermissions(Map<String,LecturePermissions> 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:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureId();
+ } else {
+ setLectureId((String)value);
+ }
+ break;
+
+ case PERMISSIONS:
+ if (value == null) {
+ unsetPermissions();
+ } else {
+ setPermissions((Map<String,LecturePermissions>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case LECTURE_ID:
+ return getLectureId();
+
+ case PERMISSIONS:
+ return getPermissions();
+
+ }
+ 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 LECTURE_ID:
+ return isSetLectureId();
+ case PERMISSIONS:
+ return isSetPermissions();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof writeLecturePermissions_args)
+ return this.equals((writeLecturePermissions_args)that);
+ return false;
+ }
+
+ public boolean equals(writeLecturePermissions_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_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_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;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(writeLecturePermissions_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(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(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;
+ }
+
+ 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("writeLecturePermissions_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("lectureId:");
+ if (this.lectureId == null) {
+ sb.append("null");
+ } else {
+ 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();
+ }
+
+ 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 writeLecturePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ public writeLecturePermissions_argsStandardScheme getScheme() {
+ return new writeLecturePermissions_argsStandardScheme();
+ }
+ }
+
+ private static class writeLecturePermissions_argsStandardScheme extends StandardScheme<writeLecturePermissions_args> {
+
+ 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)
+ {
+ 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: // 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: // PERMISSIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin();
+ struct.permissions = new HashMap<String,LecturePermissions>(2*_map142.size);
+ for (int _i143 = 0; _i143 < _map142.size; ++_i143)
+ {
+ String _key144;
+ LecturePermissions _val145;
+ _key144 = iprot.readString();
+ _val145 = new LecturePermissions();
+ _val145.read(iprot);
+ struct.permissions.put(_key144, _val145);
+ }
+ 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);
+ }
+ 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, writeLecturePermissions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lectureId != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ 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<String, LecturePermissions> _iter146 : struct.permissions.entrySet())
+ {
+ oprot.writeString(_iter146.getKey());
+ _iter146.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 writeLecturePermissions_argsTupleScheme extends TupleScheme<writeLecturePermissions_args> {
+
+ @Override
+ 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()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLectureId()) {
+ optionals.set(1);
+ }
+ 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<String, LecturePermissions> _iter147 : struct.permissions.entrySet())
+ {
+ oprot.writeString(_iter147.getKey());
+ _iter147.getValue().write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ 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(3);
+ 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)) {
+ {
+ org.apache.thrift.protocol.TMap _map148 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.permissions = new HashMap<String,LecturePermissions>(2*_map148.size);
+ for (int _i149 = 0; _i149 < _map148.size; ++_i149)
+ {
+ String _key150;
+ LecturePermissions _val151;
+ _key150 = iprot.readString();
+ _val151 = new LecturePermissions();
+ _val151.read(iprot);
+ struct.permissions.put(_key150, _val151);
+ }
+ }
+ struct.setPermissionsIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class writeLecturePermissions_result implements org.apache.thrift.TBase<writeLecturePermissions_result, writeLecturePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeLecturePermissions_result> {
+ 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 SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new writeLecturePermissions_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new writeLecturePermissions_resultTupleSchemeFactory());
+ }
+
+ public boolean success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ 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)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_result.class, metaDataMap);
+ }
+
+ public writeLecturePermissions_result() {
+ }
+
+ public writeLecturePermissions_result(
+ boolean success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public writeLecturePermissions_result(writeLecturePermissions_result other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.success = other.success;
+ if (other.isSetAuthError()) {
+ this.authError = new TAuthorizationException(other.authError);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public writeLecturePermissions_result deepCopy() {
+ return new writeLecturePermissions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.authError = null;
+ this.notFound = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public writeLecturePermissions_result setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ return this;
+ }
+
+ public void unsetSuccess() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ }
+
+ public TAuthorizationException getAuthError() {
+ return this.authError;
+ }
+
+ public writeLecturePermissions_result setAuthError(TAuthorizationException authError) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public writeLecturePermissions_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return Boolean.valueOf(isSuccess());
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof writeLecturePermissions_result)
+ return this.equals((writeLecturePermissions_result)that);
+ return false;
+ }
+
+ public boolean equals(writeLecturePermissions_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_success = true;
+ boolean that_present_success = true;
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_authError = true && this.isSetAuthError();
+ boolean that_present_authError = true && that.isSetAuthError();
+ if (this_present_authError || that_present_authError) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(writeLecturePermissions_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("writeLecturePermissions_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authError:");
+ if (this.authError == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 writeLecturePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ public writeLecturePermissions_resultStandardScheme getScheme() {
+ return new writeLecturePermissions_resultStandardScheme();
+ }
+ }
+
+ private static class writeLecturePermissions_resultStandardScheme extends StandardScheme<writeLecturePermissions_result> {
+
+ 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)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // AUTH_ERROR
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, writeLecturePermissions_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ oprot.writeBool(struct.success);
+ oprot.writeFieldEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class writeLecturePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ public writeLecturePermissions_resultTupleScheme getScheme() {
+ return new writeLecturePermissions_resultTupleScheme();
+ }
+ }
+
+ private static class writeLecturePermissions_resultTupleScheme extends TupleScheme<writeLecturePermissions_result> {
+
+ @Override
+ 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.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ oprot.writeBool(struct.success);
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ 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)) {
+ struct.success = iprot.readBool();
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLecturePermissions_args implements org.apache.thrift.TBase<getLecturePermissions_args, getLecturePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturePermissions_args> {
+ 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLecturePermissions_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLecturePermissions_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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_TOKEN
+ return USER_TOKEN;
+ case 2: // 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.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(getLecturePermissions_args.class, metaDataMap);
+ }
+
+ public getLecturePermissions_args() {
+ }
+
+ public getLecturePermissions_args(
+ String userToken,
+ String lectureId)
+ {
+ this();
+ this.userToken = userToken;
+ this.lectureId = lectureId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLecturePermissions_args(getLecturePermissions_args other) {
+ if (other.isSetUserToken()) {
+ this.userToken = other.userToken;
+ }
+ if (other.isSetLectureId()) {
+ this.lectureId = other.lectureId;
+ }
+ }
+
+ public getLecturePermissions_args deepCopy() {
+ return new getLecturePermissions_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userToken = null;
+ this.lectureId = null;
+ }
+
+ public String getUserToken() {
+ return this.userToken;
+ }
+
+ public getLecturePermissions_args setUserToken(String userToken) {
+ this.userToken = userToken;
+ return this;
+ }
+
+ public void unsetUserToken() {
+ this.userToken = null;
+ }
+
+ /** Returns true if field userToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserToken() {
+ return this.userToken != null;
+ }
+
+ public void setUserTokenIsSet(boolean value) {
+ if (!value) {
+ this.userToken = null;
+ }
+ }
+
+ public String getLectureId() {
+ return this.lectureId;
+ }
+
+ public getLecturePermissions_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_TOKEN:
+ if (value == null) {
+ unsetUserToken();
+ } else {
+ setUserToken((String)value);
+ }
+ break;
+
+ case LECTURE_ID:
+ if (value == null) {
+ unsetLectureId();
+ } else {
+ setLectureId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_TOKEN:
+ return getUserToken();
+
+ case LECTURE_ID:
+ return getLectureId();
+
+ }
+ 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 LECTURE_ID:
+ return isSetLectureId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getLecturePermissions_args)
+ return this.equals((getLecturePermissions_args)that);
+ return false;
+ }
+
+ public boolean equals(getLecturePermissions_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_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;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(getLecturePermissions_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(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;
+ }
+ }
+ 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("getLecturePermissions_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("lectureId:");
+ if (this.lectureId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lectureId);
+ }
+ 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 getLecturePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ public getLecturePermissions_argsStandardScheme getScheme() {
+ return new getLecturePermissions_argsStandardScheme();
+ }
+ }
+
+ private static class getLecturePermissions_argsStandardScheme extends StandardScheme<getLecturePermissions_args> {
+
+ 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)
+ {
+ 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: // 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;
+ 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, getLecturePermissions_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userToken != null) {
+ oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.userToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lectureId != null) {
+ oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
+ oprot.writeString(struct.lectureId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLecturePermissions_argsTupleSchemeFactory implements SchemeFactory {
+ public getLecturePermissions_argsTupleScheme getScheme() {
+ return new getLecturePermissions_argsTupleScheme();
+ }
+ }
+
+ private static class getLecturePermissions_argsTupleScheme extends TupleScheme<getLecturePermissions_args> {
+
+ @Override
+ 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()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLectureId()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetUserToken()) {
+ oprot.writeString(struct.userToken);
+ }
+ if (struct.isSetLectureId()) {
+ oprot.writeString(struct.lectureId);
+ }
+ }
+
+ @Override
+ 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(2);
+ if (incoming.get(0)) {
+ struct.userToken = iprot.readString();
+ struct.setUserTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lectureId = iprot.readString();
+ struct.setLectureIdIsSet(true);
+ }
+ }
+ }
+
+ }
+
+ public static class getLecturePermissions_result implements org.apache.thrift.TBase<getLecturePermissions_result, getLecturePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturePermissions_result> {
+ 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new getLecturePermissions_resultStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new getLecturePermissions_resultTupleSchemeFactory());
+ }
+
+ public Map<String,LecturePermissions> success; // required
+ public TAuthorizationException authError; // required
+ public TNotFoundException notFound; // 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");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // AUTH_ERROR
+ return AUTH_ERROR;
+ case 2: // NOT_FOUND
+ return NOT_FOUND;
+ 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.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,
+ 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);
+ }
+
+ public getLecturePermissions_result() {
+ }
+
+ public getLecturePermissions_result(
+ Map<String,LecturePermissions> success,
+ TAuthorizationException authError,
+ TNotFoundException notFound)
+ {
+ this();
+ this.success = success;
+ this.authError = authError;
+ this.notFound = notFound;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getLecturePermissions_result(getLecturePermissions_result other) {
+ if (other.isSetSuccess()) {
+ Map<String,LecturePermissions> __this__success = new HashMap<String,LecturePermissions>(other.success.size());
+ for (Map.Entry<String, LecturePermissions> 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);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ }
+
+ public getLecturePermissions_result deepCopy() {
+ return new getLecturePermissions_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.authError = null;
+ this.notFound = 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<String,LecturePermissions>();
+ }
+ this.success.put(key, val);
+ }
+
+ public Map<String,LecturePermissions> getSuccess() {
+ return this.success;
+ }
+
+ public getLecturePermissions_result setSuccess(Map<String,LecturePermissions> 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) {
+ this.authError = authError;
+ return this;
+ }
+
+ public void unsetAuthError() {
+ this.authError = null;
+ }
+
+ /** Returns true if field authError is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthError() {
+ return this.authError != null;
+ }
+
+ public void setAuthErrorIsSet(boolean value) {
+ if (!value) {
+ this.authError = null;
+ }
+ }
+
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public getLecturePermissions_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 void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Map<String,LecturePermissions>)value);
+ }
+ break;
+
+ case AUTH_ERROR:
+ if (value == null) {
+ unsetAuthError();
+ } else {
+ setAuthError((TAuthorizationException)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case AUTH_ERROR:
+ return getAuthError();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case AUTH_ERROR:
+ return isSetAuthError();
+ case NOT_FOUND:
+ return isSetNotFound();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof getLecturePermissions_result)
+ return this.equals((getLecturePermissions_result)that);
+ return false;
+ }
+
+ 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) {
+ if (!(this_present_authError && that_present_authError))
+ return false;
+ if (!this.authError.equals(that.authError))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ 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;
+ }
+ if (isSetAuthError()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("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");
+ } else {
+ sb.append(this.authError);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ 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 getLecturePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ public getLecturePermissions_resultStandardScheme getScheme() {
+ return new getLecturePermissions_resultStandardScheme();
+ }
+ }
+
+ private static class getLecturePermissions_resultStandardScheme extends StandardScheme<getLecturePermissions_result> {
+
+ 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)
+ {
+ 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.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map152 = iprot.readMapBegin();
+ struct.success = new HashMap<String,LecturePermissions>(2*_map152.size);
+ for (int _i153 = 0; _i153 < _map152.size; ++_i153)
+ {
+ String _key154;
+ LecturePermissions _val155;
+ _key154 = iprot.readString();
+ _val155 = new LecturePermissions();
+ _val155.read(iprot);
+ struct.success.put(_key154, _val155);
+ }
+ 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();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, 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<String, LecturePermissions> _iter156 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter156.getKey());
+ _iter156.getValue().write(oprot);
+ }
+ oprot.writeMapEnd();
+ }
+ 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();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getLecturePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ public getLecturePermissions_resultTupleScheme getScheme() {
+ return new getLecturePermissions_resultTupleScheme();
+ }
+ }
+
+ private static class getLecturePermissions_resultTupleScheme extends TupleScheme<getLecturePermissions_result> {
+
+ @Override
+ 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.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthError()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ {
+ oprot.writeI32(struct.success.size());
+ for (Map.Entry<String, LecturePermissions> _iter157 : struct.success.entrySet())
+ {
+ oprot.writeString(_iter157.getKey());
+ _iter157.getValue().write(oprot);
+ }
+ }
+ }
+ if (struct.isSetAuthError()) {
+ struct.authError.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ }
+
+ @Override
+ 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);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TMap _map158 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.success = new HashMap<String,LecturePermissions>(2*_map158.size);
+ for (int _i159 = 0; _i159 < _map158.size; ++_i159)
+ {
+ String _key160;
+ LecturePermissions _val161;
+ _key160 = iprot.readString();
+ _val161 = new LecturePermissions();
+ _val161.read(iprot);
+ struct.success.put(_key160, _val161);
+ }
+ }
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authError = new TAuthorizationException();
+ struct.authError.read(iprot);
+ struct.setAuthErrorIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ }
+ }
+
+ }
+
+}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java
new file mode 100644
index 0000000..ad100c2
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java
@@ -0,0 +1,388 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionData, ServerSessionData._Fields>, java.io.Serializable, Cloneable, Comparable<ServerSessionData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ServerSessionData");
+
+ private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ServerSessionDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ServerSessionDataTupleSchemeFactory());
+ }
+
+ public String sessionId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SESSION_ID((short)1, "sessionId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SESSION_ID
+ return SESSION_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServerSessionData.class, metaDataMap);
+ }
+
+ public ServerSessionData() {
+ }
+
+ public ServerSessionData(
+ String sessionId)
+ {
+ this();
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ServerSessionData(ServerSessionData other) {
+ if (other.isSetSessionId()) {
+ this.sessionId = other.sessionId;
+ }
+ }
+
+ public ServerSessionData deepCopy() {
+ return new ServerSessionData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.sessionId = null;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public ServerSessionData setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ public void unsetSessionId() {
+ this.sessionId = null;
+ }
+
+ /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetSessionId() {
+ return this.sessionId != null;
+ }
+
+ public void setSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.sessionId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SESSION_ID:
+ if (value == null) {
+ unsetSessionId();
+ } else {
+ setSessionId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SESSION_ID:
+ return getSessionId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SESSION_ID:
+ return isSetSessionId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ServerSessionData)
+ return this.equals((ServerSessionData)that);
+ return false;
+ }
+
+ public boolean equals(ServerSessionData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_sessionId = true && this.isSetSessionId();
+ boolean that_present_sessionId = true && that.isSetSessionId();
+ if (this_present_sessionId || that_present_sessionId) {
+ if (!(this_present_sessionId && that_present_sessionId))
+ return false;
+ if (!this.sessionId.equals(that.sessionId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ServerSessionData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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("ServerSessionData(");
+ boolean first = true;
+
+ sb.append("sessionId:");
+ if (this.sessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sessionId);
+ }
+ 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 ServerSessionDataStandardSchemeFactory implements SchemeFactory {
+ public ServerSessionDataStandardScheme getScheme() {
+ return new ServerSessionDataStandardScheme();
+ }
+ }
+
+ private static class ServerSessionDataStandardScheme extends StandardScheme<ServerSessionData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ServerSessionData struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ 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, ServerSessionData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sessionId != null) {
+ oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.sessionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ServerSessionDataTupleSchemeFactory implements SchemeFactory {
+ public ServerSessionDataTupleScheme getScheme() {
+ return new ServerSessionDataTupleScheme();
+ }
+ }
+
+ private static class ServerSessionDataTupleScheme extends TupleScheme<ServerSessionData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ServerSessionData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSessionId()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetSessionId()) {
+ oprot.writeString(struct.sessionId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ServerSessionData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java b/src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java
new file mode 100644
index 0000000..7234e6a
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java
@@ -0,0 +1,588 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SessionData implements org.apache.thrift.TBase<SessionData, SessionData._Fields>, java.io.Serializable, Cloneable, Comparable<SessionData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SessionData");
+
+ private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authToken", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField SERVER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("serverAddress", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SessionDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SessionDataTupleSchemeFactory());
+ }
+
+ public String sessionId; // required
+ public String authToken; // required
+ public String serverAddress; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ SESSION_ID((short)1, "sessionId"),
+ AUTH_TOKEN((short)2, "authToken"),
+ SERVER_ADDRESS((short)3, "serverAddress");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // SESSION_ID
+ return SESSION_ID;
+ case 2: // AUTH_TOKEN
+ return AUTH_TOKEN;
+ case 3: // SERVER_ADDRESS
+ return SERVER_ADDRESS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
+ tmpMap.put(_Fields.SERVER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("serverAddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SessionData.class, metaDataMap);
+ }
+
+ public SessionData() {
+ }
+
+ public SessionData(
+ String sessionId,
+ String authToken,
+ String serverAddress)
+ {
+ this();
+ this.sessionId = sessionId;
+ this.authToken = authToken;
+ this.serverAddress = serverAddress;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public SessionData(SessionData other) {
+ if (other.isSetSessionId()) {
+ this.sessionId = other.sessionId;
+ }
+ if (other.isSetAuthToken()) {
+ this.authToken = other.authToken;
+ }
+ if (other.isSetServerAddress()) {
+ this.serverAddress = other.serverAddress;
+ }
+ }
+
+ public SessionData deepCopy() {
+ return new SessionData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.sessionId = null;
+ this.authToken = null;
+ this.serverAddress = null;
+ }
+
+ public String getSessionId() {
+ return this.sessionId;
+ }
+
+ public SessionData setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ public void unsetSessionId() {
+ this.sessionId = null;
+ }
+
+ /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetSessionId() {
+ return this.sessionId != null;
+ }
+
+ public void setSessionIdIsSet(boolean value) {
+ if (!value) {
+ this.sessionId = null;
+ }
+ }
+
+ public String getAuthToken() {
+ return this.authToken;
+ }
+
+ public SessionData setAuthToken(String authToken) {
+ this.authToken = authToken;
+ return this;
+ }
+
+ public void unsetAuthToken() {
+ this.authToken = null;
+ }
+
+ /** Returns true if field authToken is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthToken() {
+ return this.authToken != null;
+ }
+
+ public void setAuthTokenIsSet(boolean value) {
+ if (!value) {
+ this.authToken = null;
+ }
+ }
+
+ public String getServerAddress() {
+ return this.serverAddress;
+ }
+
+ public SessionData setServerAddress(String serverAddress) {
+ this.serverAddress = serverAddress;
+ return this;
+ }
+
+ public void unsetServerAddress() {
+ this.serverAddress = null;
+ }
+
+ /** Returns true if field serverAddress is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerAddress() {
+ return this.serverAddress != null;
+ }
+
+ public void setServerAddressIsSet(boolean value) {
+ if (!value) {
+ this.serverAddress = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SESSION_ID:
+ if (value == null) {
+ unsetSessionId();
+ } else {
+ setSessionId((String)value);
+ }
+ break;
+
+ case AUTH_TOKEN:
+ if (value == null) {
+ unsetAuthToken();
+ } else {
+ setAuthToken((String)value);
+ }
+ break;
+
+ case SERVER_ADDRESS:
+ if (value == null) {
+ unsetServerAddress();
+ } else {
+ setServerAddress((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SESSION_ID:
+ return getSessionId();
+
+ case AUTH_TOKEN:
+ return getAuthToken();
+
+ case SERVER_ADDRESS:
+ return getServerAddress();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SESSION_ID:
+ return isSetSessionId();
+ case AUTH_TOKEN:
+ return isSetAuthToken();
+ case SERVER_ADDRESS:
+ return isSetServerAddress();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof SessionData)
+ return this.equals((SessionData)that);
+ return false;
+ }
+
+ public boolean equals(SessionData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_sessionId = true && this.isSetSessionId();
+ boolean that_present_sessionId = true && that.isSetSessionId();
+ if (this_present_sessionId || that_present_sessionId) {
+ if (!(this_present_sessionId && that_present_sessionId))
+ return false;
+ if (!this.sessionId.equals(that.sessionId))
+ return false;
+ }
+
+ boolean this_present_authToken = true && this.isSetAuthToken();
+ boolean that_present_authToken = true && that.isSetAuthToken();
+ if (this_present_authToken || that_present_authToken) {
+ if (!(this_present_authToken && that_present_authToken))
+ return false;
+ if (!this.authToken.equals(that.authToken))
+ return false;
+ }
+
+ boolean this_present_serverAddress = true && this.isSetServerAddress();
+ boolean that_present_serverAddress = true && that.isSetServerAddress();
+ if (this_present_serverAddress || that_present_serverAddress) {
+ if (!(this_present_serverAddress && that_present_serverAddress))
+ return false;
+ if (!this.serverAddress.equals(that.serverAddress))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(SessionData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSessionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetServerAddress()).compareTo(other.isSetServerAddress());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerAddress()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverAddress, other.serverAddress);
+ 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("SessionData(");
+ boolean first = true;
+
+ sb.append("sessionId:");
+ if (this.sessionId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sessionId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authToken:");
+ if (this.authToken == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authToken);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("serverAddress:");
+ if (this.serverAddress == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverAddress);
+ }
+ 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 SessionDataStandardSchemeFactory implements SchemeFactory {
+ public SessionDataStandardScheme getScheme() {
+ return new SessionDataStandardScheme();
+ }
+ }
+
+ private static class SessionDataStandardScheme extends StandardScheme<SessionData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SessionData struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SESSION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // AUTH_TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.authToken = iprot.readString();
+ struct.setAuthTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SERVER_ADDRESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.serverAddress = iprot.readString();
+ struct.setServerAddressIsSet(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, SessionData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.sessionId != null) {
+ oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
+ oprot.writeString(struct.sessionId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.authToken != null) {
+ oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC);
+ oprot.writeString(struct.authToken);
+ oprot.writeFieldEnd();
+ }
+ if (struct.serverAddress != null) {
+ oprot.writeFieldBegin(SERVER_ADDRESS_FIELD_DESC);
+ oprot.writeString(struct.serverAddress);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SessionDataTupleSchemeFactory implements SchemeFactory {
+ public SessionDataTupleScheme getScheme() {
+ return new SessionDataTupleScheme();
+ }
+ }
+
+ private static class SessionDataTupleScheme extends TupleScheme<SessionData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetSessionId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAuthToken()) {
+ optionals.set(1);
+ }
+ if (struct.isSetServerAddress()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSessionId()) {
+ oprot.writeString(struct.sessionId);
+ }
+ if (struct.isSetAuthToken()) {
+ oprot.writeString(struct.authToken);
+ }
+ if (struct.isSetServerAddress()) {
+ oprot.writeString(struct.serverAddress);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.sessionId = iprot.readString();
+ struct.setSessionIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.authToken = iprot.readString();
+ struct.setAuthTokenIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.serverAddress = iprot.readString();
+ struct.setServerAddressIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java
new file mode 100644
index 0000000..668d513
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java
@@ -0,0 +1,48 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum ShareMode implements org.apache.thrift.TEnum {
+ LOCAL(0),
+ PUBLISH(1),
+ DOWNLOAD(2);
+
+ private final int value;
+
+ private ShareMode(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ShareMode findByValue(int value) {
+ switch (value) {
+ case 0:
+ return LOCAL;
+ case 1:
+ return PUBLISH;
+ case 2:
+ return DOWNLOAD;
+ default:
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TAuthenticationException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TAuthenticationException.java
new file mode 100644
index 0000000..b5b5078
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TAuthenticationException.java
@@ -0,0 +1,504 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TAuthenticationException extends TException implements org.apache.thrift.TBase<TAuthenticationException, TAuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthenticationException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthenticationException");
+
+ private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TAuthenticationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TAuthenticationExceptionTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see AuthenticationError
+ */
+ public AuthenticationError number; // required
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see AuthenticationError
+ */
+ NUMBER((short)1, "number"),
+ MESSAGE((short)2, "message");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // NUMBER
+ return NUMBER;
+ case 2: // MESSAGE
+ return MESSAGE;
+ 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthenticationError.class)));
+ tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAuthenticationException.class, metaDataMap);
+ }
+
+ public TAuthenticationException() {
+ }
+
+ public TAuthenticationException(
+ AuthenticationError number,
+ String message)
+ {
+ this();
+ this.number = number;
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TAuthenticationException(TAuthenticationException other) {
+ if (other.isSetNumber()) {
+ this.number = other.number;
+ }
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public TAuthenticationException deepCopy() {
+ return new TAuthenticationException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.number = null;
+ this.message = null;
+ }
+
+ /**
+ *
+ * @see AuthenticationError
+ */
+ public AuthenticationError getNumber() {
+ return this.number;
+ }
+
+ /**
+ *
+ * @see AuthenticationError
+ */
+ public TAuthenticationException setNumber(AuthenticationError number) {
+ this.number = number;
+ return this;
+ }
+
+ public void unsetNumber() {
+ this.number = null;
+ }
+
+ /** Returns true if field number is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumber() {
+ return this.number != null;
+ }
+
+ public void setNumberIsSet(boolean value) {
+ if (!value) {
+ this.number = null;
+ }
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public TAuthenticationException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NUMBER:
+ if (value == null) {
+ unsetNumber();
+ } else {
+ setNumber((AuthenticationError)value);
+ }
+ break;
+
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NUMBER:
+ return getNumber();
+
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 NUMBER:
+ return isSetNumber();
+ case MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TAuthenticationException)
+ return this.equals((TAuthenticationException)that);
+ return false;
+ }
+
+ public boolean equals(TAuthenticationException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_number = true && this.isSetNumber();
+ boolean that_present_number = true && that.isSetNumber();
+ if (this_present_number || that_present_number) {
+ if (!(this_present_number && that_present_number))
+ return false;
+ if (!this.number.equals(that.number))
+ return false;
+ }
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TAuthenticationException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("TAuthenticationException(");
+ boolean first = true;
+
+ sb.append("number:");
+ if (this.number == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.number);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ 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 TAuthenticationExceptionStandardSchemeFactory implements SchemeFactory {
+ public TAuthenticationExceptionStandardScheme getScheme() {
+ return new TAuthenticationExceptionStandardScheme();
+ }
+ }
+
+ private static class TAuthenticationExceptionStandardScheme extends StandardScheme<TAuthenticationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthenticationException 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: // NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.number = AuthenticationError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, TAuthenticationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.number != null) {
+ oprot.writeFieldBegin(NUMBER_FIELD_DESC);
+ oprot.writeI32(struct.number.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TAuthenticationExceptionTupleSchemeFactory implements SchemeFactory {
+ public TAuthenticationExceptionTupleScheme getScheme() {
+ return new TAuthenticationExceptionTupleScheme();
+ }
+ }
+
+ private static class TAuthenticationExceptionTupleScheme extends TupleScheme<TAuthenticationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TAuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetNumber()) {
+ optionals.set(0);
+ }
+ if (struct.isSetMessage()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetNumber()) {
+ oprot.writeI32(struct.number.getValue());
+ }
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TAuthenticationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.number = AuthenticationError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java
new file mode 100644
index 0000000..17d1db4
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java
@@ -0,0 +1,504 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TAuthorizationException extends TException implements org.apache.thrift.TBase<TAuthorizationException, TAuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthorizationException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthorizationException");
+
+ private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TAuthorizationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TAuthorizationExceptionTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see AuthorizationError
+ */
+ public AuthorizationError number; // required
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see AuthorizationError
+ */
+ NUMBER((short)1, "number"),
+ MESSAGE((short)2, "message");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // NUMBER
+ return NUMBER;
+ case 2: // MESSAGE
+ return MESSAGE;
+ 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthorizationError.class)));
+ tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAuthorizationException.class, metaDataMap);
+ }
+
+ public TAuthorizationException() {
+ }
+
+ public TAuthorizationException(
+ AuthorizationError number,
+ String message)
+ {
+ this();
+ this.number = number;
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TAuthorizationException(TAuthorizationException other) {
+ if (other.isSetNumber()) {
+ this.number = other.number;
+ }
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public TAuthorizationException deepCopy() {
+ return new TAuthorizationException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.number = null;
+ this.message = null;
+ }
+
+ /**
+ *
+ * @see AuthorizationError
+ */
+ public AuthorizationError getNumber() {
+ return this.number;
+ }
+
+ /**
+ *
+ * @see AuthorizationError
+ */
+ public TAuthorizationException setNumber(AuthorizationError number) {
+ this.number = number;
+ return this;
+ }
+
+ public void unsetNumber() {
+ this.number = null;
+ }
+
+ /** Returns true if field number is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumber() {
+ return this.number != null;
+ }
+
+ public void setNumberIsSet(boolean value) {
+ if (!value) {
+ this.number = null;
+ }
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public TAuthorizationException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NUMBER:
+ if (value == null) {
+ unsetNumber();
+ } else {
+ setNumber((AuthorizationError)value);
+ }
+ break;
+
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NUMBER:
+ return getNumber();
+
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 NUMBER:
+ return isSetNumber();
+ case MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TAuthorizationException)
+ return this.equals((TAuthorizationException)that);
+ return false;
+ }
+
+ public boolean equals(TAuthorizationException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_number = true && this.isSetNumber();
+ boolean that_present_number = true && that.isSetNumber();
+ if (this_present_number || that_present_number) {
+ if (!(this_present_number && that_present_number))
+ return false;
+ if (!this.number.equals(that.number))
+ return false;
+ }
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TAuthorizationException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("TAuthorizationException(");
+ boolean first = true;
+
+ sb.append("number:");
+ if (this.number == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.number);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ 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 TAuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
+ public TAuthorizationExceptionStandardScheme getScheme() {
+ return new TAuthorizationExceptionStandardScheme();
+ }
+ }
+
+ private static class TAuthorizationExceptionStandardScheme extends StandardScheme<TAuthorizationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthorizationException 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: // NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.number = AuthorizationError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, TAuthorizationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.number != null) {
+ oprot.writeFieldBegin(NUMBER_FIELD_DESC);
+ oprot.writeI32(struct.number.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TAuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
+ public TAuthorizationExceptionTupleScheme getScheme() {
+ return new TAuthorizationExceptionTupleScheme();
+ }
+ }
+
+ private static class TAuthorizationExceptionTupleScheme extends TupleScheme<TAuthorizationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TAuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetNumber()) {
+ optionals.set(0);
+ }
+ if (struct.isSetMessage()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetNumber()) {
+ oprot.writeI32(struct.number.getValue());
+ }
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TAuthorizationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.number = AuthorizationError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TImageDataException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TImageDataException.java
new file mode 100644
index 0000000..c467e5f
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TImageDataException.java
@@ -0,0 +1,504 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TImageDataException extends TException implements org.apache.thrift.TBase<TImageDataException, TImageDataException._Fields>, java.io.Serializable, Cloneable, Comparable<TImageDataException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TImageDataException");
+
+ private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TImageDataExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TImageDataExceptionTupleSchemeFactory());
+ }
+
+ /**
+ *
+ * @see ImageDataError
+ */
+ public ImageDataError number; // required
+ public String message; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see ImageDataError
+ */
+ NUMBER((short)1, "number"),
+ MESSAGE((short)2, "message");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // NUMBER
+ return NUMBER;
+ case 2: // MESSAGE
+ return MESSAGE;
+ 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ImageDataError.class)));
+ tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TImageDataException.class, metaDataMap);
+ }
+
+ public TImageDataException() {
+ }
+
+ public TImageDataException(
+ ImageDataError number,
+ String message)
+ {
+ this();
+ this.number = number;
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TImageDataException(TImageDataException other) {
+ if (other.isSetNumber()) {
+ this.number = other.number;
+ }
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
+
+ public TImageDataException deepCopy() {
+ return new TImageDataException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.number = null;
+ this.message = null;
+ }
+
+ /**
+ *
+ * @see ImageDataError
+ */
+ public ImageDataError getNumber() {
+ return this.number;
+ }
+
+ /**
+ *
+ * @see ImageDataError
+ */
+ public TImageDataException setNumber(ImageDataError number) {
+ this.number = number;
+ return this;
+ }
+
+ public void unsetNumber() {
+ this.number = null;
+ }
+
+ /** Returns true if field number is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumber() {
+ return this.number != null;
+ }
+
+ public void setNumberIsSet(boolean value) {
+ if (!value) {
+ this.number = null;
+ }
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public TImageDataException setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ /** Returns true if field message is set (has been assigned a value) and false otherwise */
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setMessageIsSet(boolean value) {
+ if (!value) {
+ this.message = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NUMBER:
+ if (value == null) {
+ unsetNumber();
+ } else {
+ setNumber((ImageDataError)value);
+ }
+ break;
+
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NUMBER:
+ return getNumber();
+
+ case MESSAGE:
+ return getMessage();
+
+ }
+ 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 NUMBER:
+ return isSetNumber();
+ case MESSAGE:
+ return isSetMessage();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TImageDataException)
+ return this.equals((TImageDataException)that);
+ return false;
+ }
+
+ public boolean equals(TImageDataException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_number = true && this.isSetNumber();
+ boolean that_present_number = true && that.isSetNumber();
+ if (this_present_number || that_present_number) {
+ if (!(this_present_number && that_present_number))
+ return false;
+ if (!this.number.equals(that.number))
+ return false;
+ }
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TImageDataException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMessage()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
+ 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("TImageDataException(");
+ boolean first = true;
+
+ sb.append("number:");
+ if (this.number == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.number);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ 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 TImageDataExceptionStandardSchemeFactory implements SchemeFactory {
+ public TImageDataExceptionStandardScheme getScheme() {
+ return new TImageDataExceptionStandardScheme();
+ }
+ }
+
+ private static class TImageDataExceptionStandardScheme extends StandardScheme<TImageDataException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TImageDataException 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: // NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.number = ImageDataError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(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, TImageDataException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.number != null) {
+ oprot.writeFieldBegin(NUMBER_FIELD_DESC);
+ oprot.writeI32(struct.number.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TImageDataExceptionTupleSchemeFactory implements SchemeFactory {
+ public TImageDataExceptionTupleScheme getScheme() {
+ return new TImageDataExceptionTupleScheme();
+ }
+ }
+
+ private static class TImageDataExceptionTupleScheme extends TupleScheme<TImageDataException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TImageDataException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetNumber()) {
+ optionals.set(0);
+ }
+ if (struct.isSetMessage()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetNumber()) {
+ oprot.writeI32(struct.number.getValue());
+ }
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TImageDataException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.number = ImageDataError.findByValue(iprot.readI32());
+ struct.setNumberIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java
new file mode 100644
index 0000000..9417e40
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java
@@ -0,0 +1,280 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TInvalidTokenException extends TException implements org.apache.thrift.TBase<TInvalidTokenException, TInvalidTokenException._Fields>, java.io.Serializable, Cloneable, Comparable<TInvalidTokenException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInvalidTokenException");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TInvalidTokenExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TInvalidTokenExceptionTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TInvalidTokenException.class, metaDataMap);
+ }
+
+ public TInvalidTokenException() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TInvalidTokenException(TInvalidTokenException other) {
+ }
+
+ public TInvalidTokenException deepCopy() {
+ return new TInvalidTokenException(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TInvalidTokenException)
+ return this.equals((TInvalidTokenException)that);
+ return false;
+ }
+
+ public boolean equals(TInvalidTokenException that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TInvalidTokenException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TInvalidTokenException(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TInvalidTokenExceptionStandardSchemeFactory implements SchemeFactory {
+ public TInvalidTokenExceptionStandardScheme getScheme() {
+ return new TInvalidTokenExceptionStandardScheme();
+ }
+ }
+
+ private static class TInvalidTokenExceptionStandardScheme extends StandardScheme<TInvalidTokenException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TInvalidTokenException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // 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, TInvalidTokenException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TInvalidTokenExceptionTupleSchemeFactory implements SchemeFactory {
+ public TInvalidTokenExceptionTupleScheme getScheme() {
+ return new TInvalidTokenExceptionTupleScheme();
+ }
+ }
+
+ private static class TInvalidTokenExceptionTupleScheme extends TupleScheme<TInvalidTokenException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TInvalidTokenException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TInvalidTokenException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
new file mode 100644
index 0000000..25690bd
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
@@ -0,0 +1,280 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TNotFoundException extends TException implements org.apache.thrift.TBase<TNotFoundException, TNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<TNotFoundException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNotFoundException");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TNotFoundExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TNotFoundExceptionTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNotFoundException.class, metaDataMap);
+ }
+
+ public TNotFoundException() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TNotFoundException(TNotFoundException other) {
+ }
+
+ public TNotFoundException deepCopy() {
+ return new TNotFoundException(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TNotFoundException)
+ return this.equals((TNotFoundException)that);
+ return false;
+ }
+
+ public boolean equals(TNotFoundException that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TNotFoundException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TNotFoundException(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
+ public TNotFoundExceptionStandardScheme getScheme() {
+ return new TNotFoundExceptionStandardScheme();
+ }
+ }
+
+ private static class TNotFoundExceptionStandardScheme extends StandardScheme<TNotFoundException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TNotFoundException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // 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, TNotFoundException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
+ public TNotFoundExceptionTupleScheme getScheme() {
+ return new TNotFoundExceptionTupleScheme();
+ }
+ }
+
+ private static class TNotFoundExceptionTupleScheme extends TupleScheme<TNotFoundException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TNotFoundException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TNotFoundException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java
new file mode 100644
index 0000000..45256f8
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java
@@ -0,0 +1,388 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TTransferRejectedException extends TException implements org.apache.thrift.TBase<TTransferRejectedException, TTransferRejectedException._Fields>, java.io.Serializable, Cloneable, Comparable<TTransferRejectedException> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTransferRejectedException");
+
+ private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TTransferRejectedExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TTransferRejectedExceptionTupleSchemeFactory());
+ }
+
+ public String reason; // 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 {
+ REASON((short)1, "reason");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // REASON
+ return REASON;
+ 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.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTransferRejectedException.class, metaDataMap);
+ }
+
+ public TTransferRejectedException() {
+ }
+
+ public TTransferRejectedException(
+ String reason)
+ {
+ this();
+ this.reason = reason;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TTransferRejectedException(TTransferRejectedException other) {
+ if (other.isSetReason()) {
+ this.reason = other.reason;
+ }
+ }
+
+ public TTransferRejectedException deepCopy() {
+ return new TTransferRejectedException(this);
+ }
+
+ @Override
+ public void clear() {
+ this.reason = null;
+ }
+
+ public String getReason() {
+ return this.reason;
+ }
+
+ public TTransferRejectedException setReason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ public void unsetReason() {
+ this.reason = null;
+ }
+
+ /** Returns true if field reason is set (has been assigned a value) and false otherwise */
+ public boolean isSetReason() {
+ return this.reason != null;
+ }
+
+ public void setReasonIsSet(boolean value) {
+ if (!value) {
+ this.reason = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case REASON:
+ if (value == null) {
+ unsetReason();
+ } else {
+ setReason((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case REASON:
+ return getReason();
+
+ }
+ 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 REASON:
+ return isSetReason();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TTransferRejectedException)
+ return this.equals((TTransferRejectedException)that);
+ return false;
+ }
+
+ public boolean equals(TTransferRejectedException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_reason = true && this.isSetReason();
+ boolean that_present_reason = true && that.isSetReason();
+ if (this_present_reason || that_present_reason) {
+ if (!(this_present_reason && that_present_reason))
+ return false;
+ if (!this.reason.equals(that.reason))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TTransferRejectedException other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReason()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reason, other.reason);
+ 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("TTransferRejectedException(");
+ boolean first = true;
+
+ sb.append("reason:");
+ if (this.reason == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.reason);
+ }
+ 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 TTransferRejectedExceptionStandardSchemeFactory implements SchemeFactory {
+ public TTransferRejectedExceptionStandardScheme getScheme() {
+ return new TTransferRejectedExceptionStandardScheme();
+ }
+ }
+
+ private static class TTransferRejectedExceptionStandardScheme extends StandardScheme<TTransferRejectedException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TTransferRejectedException 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: // REASON
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.reason = iprot.readString();
+ struct.setReasonIsSet(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, TTransferRejectedException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.reason != null) {
+ oprot.writeFieldBegin(REASON_FIELD_DESC);
+ oprot.writeString(struct.reason);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TTransferRejectedExceptionTupleSchemeFactory implements SchemeFactory {
+ public TTransferRejectedExceptionTupleScheme getScheme() {
+ return new TTransferRejectedExceptionTupleScheme();
+ }
+ }
+
+ private static class TTransferRejectedExceptionTupleScheme extends TupleScheme<TTransferRejectedException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TTransferRejectedException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetReason()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetReason()) {
+ oprot.writeString(struct.reason);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TTransferRejectedException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.reason = iprot.readString();
+ struct.setReasonIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java b/src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java
new file mode 100644
index 0000000..ea6777b
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java
@@ -0,0 +1,580 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TransferInformation implements org.apache.thrift.TBase<TransferInformation, TransferInformation._Fields>, java.io.Serializable, Cloneable, Comparable<TransferInformation> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TransferInformation");
+
+ private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PLAIN_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("plainPort", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField SSL_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sslPort", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TransferInformationStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TransferInformationTupleSchemeFactory());
+ }
+
+ public String token; // required
+ public int plainPort; // required
+ public int sslPort; // 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 {
+ TOKEN((short)1, "token"),
+ PLAIN_PORT((short)2, "plainPort"),
+ SSL_PORT((short)3, "sslPort");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TOKEN
+ return TOKEN;
+ case 2: // PLAIN_PORT
+ return PLAIN_PORT;
+ case 3: // SSL_PORT
+ return SSL_PORT;
+ 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 __PLAINPORT_ISSET_ID = 0;
+ private static final int __SSLPORT_ISSET_ID = 1;
+ 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PLAIN_PORT, new org.apache.thrift.meta_data.FieldMetaData("plainPort", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.SSL_PORT, new org.apache.thrift.meta_data.FieldMetaData("sslPort", 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(TransferInformation.class, metaDataMap);
+ }
+
+ public TransferInformation() {
+ }
+
+ public TransferInformation(
+ String token,
+ int plainPort,
+ int sslPort)
+ {
+ this();
+ this.token = token;
+ this.plainPort = plainPort;
+ setPlainPortIsSet(true);
+ this.sslPort = sslPort;
+ setSslPortIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TransferInformation(TransferInformation other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetToken()) {
+ this.token = other.token;
+ }
+ this.plainPort = other.plainPort;
+ this.sslPort = other.sslPort;
+ }
+
+ public TransferInformation deepCopy() {
+ return new TransferInformation(this);
+ }
+
+ @Override
+ public void clear() {
+ this.token = null;
+ setPlainPortIsSet(false);
+ this.plainPort = 0;
+ setSslPortIsSet(false);
+ this.sslPort = 0;
+ }
+
+ public String getToken() {
+ return this.token;
+ }
+
+ public TransferInformation setToken(String token) {
+ this.token = token;
+ return this;
+ }
+
+ public void unsetToken() {
+ this.token = null;
+ }
+
+ /** Returns true if field token is set (has been assigned a value) and false otherwise */
+ public boolean isSetToken() {
+ return this.token != null;
+ }
+
+ public void setTokenIsSet(boolean value) {
+ if (!value) {
+ this.token = null;
+ }
+ }
+
+ public int getPlainPort() {
+ return this.plainPort;
+ }
+
+ public TransferInformation setPlainPort(int plainPort) {
+ this.plainPort = plainPort;
+ setPlainPortIsSet(true);
+ return this;
+ }
+
+ public void unsetPlainPort() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PLAINPORT_ISSET_ID);
+ }
+
+ /** Returns true if field plainPort is set (has been assigned a value) and false otherwise */
+ public boolean isSetPlainPort() {
+ return EncodingUtils.testBit(__isset_bitfield, __PLAINPORT_ISSET_ID);
+ }
+
+ public void setPlainPortIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PLAINPORT_ISSET_ID, value);
+ }
+
+ public int getSslPort() {
+ return this.sslPort;
+ }
+
+ public TransferInformation setSslPort(int sslPort) {
+ this.sslPort = sslPort;
+ setSslPortIsSet(true);
+ return this;
+ }
+
+ public void unsetSslPort() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSLPORT_ISSET_ID);
+ }
+
+ /** Returns true if field sslPort is set (has been assigned a value) and false otherwise */
+ public boolean isSetSslPort() {
+ return EncodingUtils.testBit(__isset_bitfield, __SSLPORT_ISSET_ID);
+ }
+
+ public void setSslPortIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSLPORT_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TOKEN:
+ if (value == null) {
+ unsetToken();
+ } else {
+ setToken((String)value);
+ }
+ break;
+
+ case PLAIN_PORT:
+ if (value == null) {
+ unsetPlainPort();
+ } else {
+ setPlainPort((Integer)value);
+ }
+ break;
+
+ case SSL_PORT:
+ if (value == null) {
+ unsetSslPort();
+ } else {
+ setSslPort((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TOKEN:
+ return getToken();
+
+ case PLAIN_PORT:
+ return Integer.valueOf(getPlainPort());
+
+ case SSL_PORT:
+ return Integer.valueOf(getSslPort());
+
+ }
+ 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 TOKEN:
+ return isSetToken();
+ case PLAIN_PORT:
+ return isSetPlainPort();
+ case SSL_PORT:
+ return isSetSslPort();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TransferInformation)
+ return this.equals((TransferInformation)that);
+ return false;
+ }
+
+ public boolean equals(TransferInformation that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_token = true && this.isSetToken();
+ boolean that_present_token = true && that.isSetToken();
+ if (this_present_token || that_present_token) {
+ if (!(this_present_token && that_present_token))
+ return false;
+ if (!this.token.equals(that.token))
+ return false;
+ }
+
+ boolean this_present_plainPort = true;
+ boolean that_present_plainPort = true;
+ if (this_present_plainPort || that_present_plainPort) {
+ if (!(this_present_plainPort && that_present_plainPort))
+ return false;
+ if (this.plainPort != that.plainPort)
+ return false;
+ }
+
+ boolean this_present_sslPort = true;
+ boolean that_present_sslPort = true;
+ if (this_present_sslPort || that_present_sslPort) {
+ if (!(this_present_sslPort && that_present_sslPort))
+ return false;
+ if (this.sslPort != that.sslPort)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(TransferInformation other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetToken()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPlainPort()).compareTo(other.isSetPlainPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPlainPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.plainPort, other.plainPort);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSslPort()).compareTo(other.isSetSslPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSslPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sslPort, other.sslPort);
+ 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("TransferInformation(");
+ boolean first = true;
+
+ sb.append("token:");
+ if (this.token == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.token);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("plainPort:");
+ sb.append(this.plainPort);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("sslPort:");
+ sb.append(this.sslPort);
+ 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 TransferInformationStandardSchemeFactory implements SchemeFactory {
+ public TransferInformationStandardScheme getScheme() {
+ return new TransferInformationStandardScheme();
+ }
+ }
+
+ private static class TransferInformationStandardScheme extends StandardScheme<TransferInformation> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TransferInformation 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: // TOKEN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.token = iprot.readString();
+ struct.setTokenIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PLAIN_PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.plainPort = iprot.readI32();
+ struct.setPlainPortIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SSL_PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.sslPort = iprot.readI32();
+ struct.setSslPortIsSet(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, TransferInformation struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.token != null) {
+ oprot.writeFieldBegin(TOKEN_FIELD_DESC);
+ oprot.writeString(struct.token);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(PLAIN_PORT_FIELD_DESC);
+ oprot.writeI32(struct.plainPort);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(SSL_PORT_FIELD_DESC);
+ oprot.writeI32(struct.sslPort);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TransferInformationTupleSchemeFactory implements SchemeFactory {
+ public TransferInformationTupleScheme getScheme() {
+ return new TransferInformationTupleScheme();
+ }
+ }
+
+ private static class TransferInformationTupleScheme extends TupleScheme<TransferInformation> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TransferInformation struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetToken()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPlainPort()) {
+ optionals.set(1);
+ }
+ if (struct.isSetSslPort()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetToken()) {
+ oprot.writeString(struct.token);
+ }
+ if (struct.isSetPlainPort()) {
+ oprot.writeI32(struct.plainPort);
+ }
+ if (struct.isSetSslPort()) {
+ oprot.writeI32(struct.sslPort);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TransferInformation struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.token = iprot.readString();
+ struct.setTokenIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.plainPort = iprot.readI32();
+ struct.setPlainPortIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.sslPort = iprot.readI32();
+ struct.setSslPortIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/UploadStatus.java b/src/main/java/org/openslx/bwlp/thrift/iface/UploadStatus.java
new file mode 100644
index 0000000..54b07ef
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/UploadStatus.java
@@ -0,0 +1,399 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UploadStatus implements org.apache.thrift.TBase<UploadStatus, UploadStatus._Fields>, java.io.Serializable, Cloneable, Comparable<UploadStatus> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UploadStatus");
+
+ private static final org.apache.thrift.protocol.TField BLOCK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("blockStatus", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UploadStatusStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UploadStatusTupleSchemeFactory());
+ }
+
+ public ByteBuffer blockStatus; // 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 {
+ BLOCK_STATUS((short)1, "blockStatus");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // BLOCK_STATUS
+ return BLOCK_STATUS;
+ 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.BLOCK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("blockStatus", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UploadStatus.class, metaDataMap);
+ }
+
+ public UploadStatus() {
+ }
+
+ public UploadStatus(
+ ByteBuffer blockStatus)
+ {
+ this();
+ this.blockStatus = blockStatus;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public UploadStatus(UploadStatus other) {
+ if (other.isSetBlockStatus()) {
+ this.blockStatus = org.apache.thrift.TBaseHelper.copyBinary(other.blockStatus);
+;
+ }
+ }
+
+ public UploadStatus deepCopy() {
+ return new UploadStatus(this);
+ }
+
+ @Override
+ public void clear() {
+ this.blockStatus = null;
+ }
+
+ public byte[] getBlockStatus() {
+ setBlockStatus(org.apache.thrift.TBaseHelper.rightSize(blockStatus));
+ return blockStatus == null ? null : blockStatus.array();
+ }
+
+ public ByteBuffer bufferForBlockStatus() {
+ return blockStatus;
+ }
+
+ public UploadStatus setBlockStatus(byte[] blockStatus) {
+ setBlockStatus(blockStatus == null ? (ByteBuffer)null : ByteBuffer.wrap(blockStatus));
+ return this;
+ }
+
+ public UploadStatus setBlockStatus(ByteBuffer blockStatus) {
+ this.blockStatus = blockStatus;
+ return this;
+ }
+
+ public void unsetBlockStatus() {
+ this.blockStatus = null;
+ }
+
+ /** Returns true if field blockStatus is set (has been assigned a value) and false otherwise */
+ public boolean isSetBlockStatus() {
+ return this.blockStatus != null;
+ }
+
+ public void setBlockStatusIsSet(boolean value) {
+ if (!value) {
+ this.blockStatus = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case BLOCK_STATUS:
+ if (value == null) {
+ unsetBlockStatus();
+ } else {
+ setBlockStatus((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case BLOCK_STATUS:
+ return getBlockStatus();
+
+ }
+ 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 BLOCK_STATUS:
+ return isSetBlockStatus();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof UploadStatus)
+ return this.equals((UploadStatus)that);
+ return false;
+ }
+
+ public boolean equals(UploadStatus that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_blockStatus = true && this.isSetBlockStatus();
+ boolean that_present_blockStatus = true && that.isSetBlockStatus();
+ if (this_present_blockStatus || that_present_blockStatus) {
+ if (!(this_present_blockStatus && that_present_blockStatus))
+ return false;
+ if (!this.blockStatus.equals(that.blockStatus))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(UploadStatus other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetBlockStatus()).compareTo(other.isSetBlockStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBlockStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockStatus, other.blockStatus);
+ 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("UploadStatus(");
+ boolean first = true;
+
+ sb.append("blockStatus:");
+ if (this.blockStatus == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.blockStatus, sb);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class UploadStatusStandardSchemeFactory implements SchemeFactory {
+ public UploadStatusStandardScheme getScheme() {
+ return new UploadStatusStandardScheme();
+ }
+ }
+
+ private static class UploadStatusStandardScheme extends StandardScheme<UploadStatus> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, UploadStatus 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: // BLOCK_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.blockStatus = iprot.readBinary();
+ struct.setBlockStatusIsSet(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, UploadStatus struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.blockStatus != null) {
+ oprot.writeFieldBegin(BLOCK_STATUS_FIELD_DESC);
+ oprot.writeBinary(struct.blockStatus);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UploadStatusTupleSchemeFactory implements SchemeFactory {
+ public UploadStatusTupleScheme getScheme() {
+ return new UploadStatusTupleScheme();
+ }
+ }
+
+ private static class UploadStatusTupleScheme extends TupleScheme<UploadStatus> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, UploadStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetBlockStatus()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetBlockStatus()) {
+ oprot.writeBinary(struct.blockStatus);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, UploadStatus struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.blockStatus = iprot.readBinary();
+ struct.setBlockStatusIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java b/src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java
new file mode 100644
index 0000000..53a5161
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java
@@ -0,0 +1,788 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fields>, java.io.Serializable, Cloneable, Comparable<UserInfo> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserInfo");
+
+ private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField FIRST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField LAST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField E_MAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("eMail", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new UserInfoStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new UserInfoTupleSchemeFactory());
+ }
+
+ public String userId; // required
+ public String firstName; // required
+ public String lastName; // required
+ public String eMail; // required
+ public String organizationId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ USER_ID((short)1, "userId"),
+ FIRST_NAME((short)2, "firstName"),
+ LAST_NAME((short)3, "lastName"),
+ E_MAIL((short)4, "eMail"),
+ ORGANIZATION_ID((short)5, "organizationId");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // USER_ID
+ return USER_ID;
+ case 2: // FIRST_NAME
+ return FIRST_NAME;
+ case 3: // LAST_NAME
+ return LAST_NAME;
+ case 4: // E_MAIL
+ return E_MAIL;
+ case 5: // ORGANIZATION_ID
+ return ORGANIZATION_ID;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.LAST_NAME, new org.apache.thrift.meta_data.FieldMetaData("lastName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.E_MAIL, new org.apache.thrift.meta_data.FieldMetaData("eMail", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserInfo.class, metaDataMap);
+ }
+
+ public UserInfo() {
+ }
+
+ public UserInfo(
+ String userId,
+ String firstName,
+ String lastName,
+ String eMail,
+ String organizationId)
+ {
+ this();
+ this.userId = userId;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.eMail = eMail;
+ this.organizationId = organizationId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public UserInfo(UserInfo other) {
+ if (other.isSetUserId()) {
+ this.userId = other.userId;
+ }
+ if (other.isSetFirstName()) {
+ this.firstName = other.firstName;
+ }
+ if (other.isSetLastName()) {
+ this.lastName = other.lastName;
+ }
+ if (other.isSetEMail()) {
+ this.eMail = other.eMail;
+ }
+ if (other.isSetOrganizationId()) {
+ this.organizationId = other.organizationId;
+ }
+ }
+
+ public UserInfo deepCopy() {
+ return new UserInfo(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userId = null;
+ this.firstName = null;
+ this.lastName = null;
+ this.eMail = null;
+ this.organizationId = null;
+ }
+
+ public String getUserId() {
+ return this.userId;
+ }
+
+ public UserInfo setUserId(String userId) {
+ this.userId = userId;
+ return this;
+ }
+
+ public void unsetUserId() {
+ this.userId = null;
+ }
+
+ /** Returns true if field userId is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserId() {
+ return this.userId != null;
+ }
+
+ public void setUserIdIsSet(boolean value) {
+ if (!value) {
+ this.userId = null;
+ }
+ }
+
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ public UserInfo setFirstName(String firstName) {
+ this.firstName = firstName;
+ return this;
+ }
+
+ public void unsetFirstName() {
+ this.firstName = null;
+ }
+
+ /** Returns true if field firstName is set (has been assigned a value) and false otherwise */
+ public boolean isSetFirstName() {
+ return this.firstName != null;
+ }
+
+ public void setFirstNameIsSet(boolean value) {
+ if (!value) {
+ this.firstName = null;
+ }
+ }
+
+ public String getLastName() {
+ return this.lastName;
+ }
+
+ public UserInfo setLastName(String lastName) {
+ this.lastName = lastName;
+ return this;
+ }
+
+ public void unsetLastName() {
+ this.lastName = null;
+ }
+
+ /** Returns true if field lastName is set (has been assigned a value) and false otherwise */
+ public boolean isSetLastName() {
+ return this.lastName != null;
+ }
+
+ public void setLastNameIsSet(boolean value) {
+ if (!value) {
+ this.lastName = null;
+ }
+ }
+
+ public String getEMail() {
+ return this.eMail;
+ }
+
+ public UserInfo setEMail(String eMail) {
+ this.eMail = eMail;
+ return this;
+ }
+
+ public void unsetEMail() {
+ this.eMail = null;
+ }
+
+ /** Returns true if field eMail is set (has been assigned a value) and false otherwise */
+ public boolean isSetEMail() {
+ return this.eMail != null;
+ }
+
+ public void setEMailIsSet(boolean value) {
+ if (!value) {
+ this.eMail = null;
+ }
+ }
+
+ public String getOrganizationId() {
+ return this.organizationId;
+ }
+
+ public UserInfo setOrganizationId(String organizationId) {
+ this.organizationId = organizationId;
+ return this;
+ }
+
+ public void unsetOrganizationId() {
+ this.organizationId = null;
+ }
+
+ /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOrganizationId() {
+ return this.organizationId != null;
+ }
+
+ public void setOrganizationIdIsSet(boolean value) {
+ if (!value) {
+ this.organizationId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_ID:
+ if (value == null) {
+ unsetUserId();
+ } else {
+ setUserId((String)value);
+ }
+ break;
+
+ case FIRST_NAME:
+ if (value == null) {
+ unsetFirstName();
+ } else {
+ setFirstName((String)value);
+ }
+ break;
+
+ case LAST_NAME:
+ if (value == null) {
+ unsetLastName();
+ } else {
+ setLastName((String)value);
+ }
+ break;
+
+ case E_MAIL:
+ if (value == null) {
+ unsetEMail();
+ } else {
+ setEMail((String)value);
+ }
+ break;
+
+ case ORGANIZATION_ID:
+ if (value == null) {
+ unsetOrganizationId();
+ } else {
+ setOrganizationId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_ID:
+ return getUserId();
+
+ case FIRST_NAME:
+ return getFirstName();
+
+ case LAST_NAME:
+ return getLastName();
+
+ case E_MAIL:
+ return getEMail();
+
+ case ORGANIZATION_ID:
+ return getOrganizationId();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case USER_ID:
+ return isSetUserId();
+ case FIRST_NAME:
+ return isSetFirstName();
+ case LAST_NAME:
+ return isSetLastName();
+ case E_MAIL:
+ return isSetEMail();
+ case ORGANIZATION_ID:
+ return isSetOrganizationId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof UserInfo)
+ return this.equals((UserInfo)that);
+ return false;
+ }
+
+ public boolean equals(UserInfo that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userId = true && this.isSetUserId();
+ boolean that_present_userId = true && that.isSetUserId();
+ if (this_present_userId || that_present_userId) {
+ if (!(this_present_userId && that_present_userId))
+ return false;
+ if (!this.userId.equals(that.userId))
+ return false;
+ }
+
+ boolean this_present_firstName = true && this.isSetFirstName();
+ boolean that_present_firstName = true && that.isSetFirstName();
+ if (this_present_firstName || that_present_firstName) {
+ if (!(this_present_firstName && that_present_firstName))
+ return false;
+ if (!this.firstName.equals(that.firstName))
+ return false;
+ }
+
+ boolean this_present_lastName = true && this.isSetLastName();
+ boolean that_present_lastName = true && that.isSetLastName();
+ if (this_present_lastName || that_present_lastName) {
+ if (!(this_present_lastName && that_present_lastName))
+ return false;
+ if (!this.lastName.equals(that.lastName))
+ return false;
+ }
+
+ boolean this_present_eMail = true && this.isSetEMail();
+ boolean that_present_eMail = true && that.isSetEMail();
+ if (this_present_eMail || that_present_eMail) {
+ if (!(this_present_eMail && that_present_eMail))
+ return false;
+ if (!this.eMail.equals(that.eMail))
+ return false;
+ }
+
+ boolean this_present_organizationId = true && this.isSetOrganizationId();
+ boolean that_present_organizationId = true && that.isSetOrganizationId();
+ if (this_present_organizationId || that_present_organizationId) {
+ if (!(this_present_organizationId && that_present_organizationId))
+ return false;
+ if (!this.organizationId.equals(that.organizationId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(UserInfo other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFirstName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLastName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEMail()).compareTo(other.isSetEMail());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEMail()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eMail, other.eMail);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOrganizationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
+ 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("UserInfo(");
+ boolean first = true;
+
+ sb.append("userId:");
+ if (this.userId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("firstName:");
+ if (this.firstName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.firstName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lastName:");
+ if (this.lastName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.lastName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("eMail:");
+ if (this.eMail == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.eMail);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("organizationId:");
+ if (this.organizationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.organizationId);
+ }
+ 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 UserInfoStandardSchemeFactory implements SchemeFactory {
+ public UserInfoStandardScheme getScheme() {
+ return new UserInfoStandardScheme();
+ }
+ }
+
+ private static class UserInfoStandardScheme extends StandardScheme<UserInfo> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, UserInfo struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // USER_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // FIRST_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.firstName = iprot.readString();
+ struct.setFirstNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // LAST_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.lastName = iprot.readString();
+ struct.setLastNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // E_MAIL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.eMail = iprot.readString();
+ struct.setEMailIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // ORGANIZATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(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, UserInfo struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userId != null) {
+ oprot.writeFieldBegin(USER_ID_FIELD_DESC);
+ oprot.writeString(struct.userId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.firstName != null) {
+ oprot.writeFieldBegin(FIRST_NAME_FIELD_DESC);
+ oprot.writeString(struct.firstName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.lastName != null) {
+ oprot.writeFieldBegin(LAST_NAME_FIELD_DESC);
+ oprot.writeString(struct.lastName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.eMail != null) {
+ oprot.writeFieldBegin(E_MAIL_FIELD_DESC);
+ oprot.writeString(struct.eMail);
+ oprot.writeFieldEnd();
+ }
+ if (struct.organizationId != null) {
+ oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
+ oprot.writeString(struct.organizationId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class UserInfoTupleSchemeFactory implements SchemeFactory {
+ public UserInfoTupleScheme getScheme() {
+ return new UserInfoTupleScheme();
+ }
+ }
+
+ private static class UserInfoTupleScheme extends TupleScheme<UserInfo> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFirstName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetLastName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetEMail()) {
+ optionals.set(3);
+ }
+ if (struct.isSetOrganizationId()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetUserId()) {
+ oprot.writeString(struct.userId);
+ }
+ if (struct.isSetFirstName()) {
+ oprot.writeString(struct.firstName);
+ }
+ if (struct.isSetLastName()) {
+ oprot.writeString(struct.lastName);
+ }
+ if (struct.isSetEMail()) {
+ oprot.writeString(struct.eMail);
+ }
+ if (struct.isSetOrganizationId()) {
+ oprot.writeString(struct.organizationId);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.userId = iprot.readString();
+ struct.setUserIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.firstName = iprot.readString();
+ struct.setFirstNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.lastName = iprot.readString();
+ struct.setLastNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.eMail = iprot.readString();
+ struct.setEMailIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.organizationId = iprot.readString();
+ struct.setOrganizationIdIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java b/src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java
new file mode 100644
index 0000000..5239a9b
--- /dev/null
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java
@@ -0,0 +1,488 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.openslx.bwlp.thrift.iface;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtualizer._Fields>, java.io.Serializable, Cloneable, Comparable<Virtualizer> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Virtualizer");
+
+ private static final org.apache.thrift.protocol.TField VIRT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField VIRT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("virtName", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new VirtualizerStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new VirtualizerTupleSchemeFactory());
+ }
+
+ public String virtId; // required
+ public String virtName; // 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 {
+ VIRT_ID((short)1, "virtId"),
+ VIRT_NAME((short)2, "virtName");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // VIRT_ID
+ return VIRT_ID;
+ case 2: // VIRT_NAME
+ return VIRT_NAME;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.VIRT_ID, new org.apache.thrift.meta_data.FieldMetaData("virtId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.VIRT_NAME, new org.apache.thrift.meta_data.FieldMetaData("virtName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Virtualizer.class, metaDataMap);
+ }
+
+ public Virtualizer() {
+ }
+
+ public Virtualizer(
+ String virtId,
+ String virtName)
+ {
+ this();
+ this.virtId = virtId;
+ this.virtName = virtName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Virtualizer(Virtualizer other) {
+ if (other.isSetVirtId()) {
+ this.virtId = other.virtId;
+ }
+ if (other.isSetVirtName()) {
+ this.virtName = other.virtName;
+ }
+ }
+
+ public Virtualizer deepCopy() {
+ return new Virtualizer(this);
+ }
+
+ @Override
+ public void clear() {
+ this.virtId = null;
+ this.virtName = null;
+ }
+
+ public String getVirtId() {
+ return this.virtId;
+ }
+
+ public Virtualizer setVirtId(String virtId) {
+ this.virtId = virtId;
+ return this;
+ }
+
+ public void unsetVirtId() {
+ this.virtId = null;
+ }
+
+ /** Returns true if field virtId is set (has been assigned a value) and false otherwise */
+ public boolean isSetVirtId() {
+ return this.virtId != null;
+ }
+
+ public void setVirtIdIsSet(boolean value) {
+ if (!value) {
+ this.virtId = null;
+ }
+ }
+
+ public String getVirtName() {
+ return this.virtName;
+ }
+
+ public Virtualizer setVirtName(String virtName) {
+ this.virtName = virtName;
+ return this;
+ }
+
+ public void unsetVirtName() {
+ this.virtName = null;
+ }
+
+ /** Returns true if field virtName is set (has been assigned a value) and false otherwise */
+ public boolean isSetVirtName() {
+ return this.virtName != null;
+ }
+
+ public void setVirtNameIsSet(boolean value) {
+ if (!value) {
+ this.virtName = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case VIRT_ID:
+ if (value == null) {
+ unsetVirtId();
+ } else {
+ setVirtId((String)value);
+ }
+ break;
+
+ case VIRT_NAME:
+ if (value == null) {
+ unsetVirtName();
+ } else {
+ setVirtName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VIRT_ID:
+ return getVirtId();
+
+ case VIRT_NAME:
+ return getVirtName();
+
+ }
+ 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 VIRT_ID:
+ return isSetVirtId();
+ case VIRT_NAME:
+ return isSetVirtName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Virtualizer)
+ return this.equals((Virtualizer)that);
+ return false;
+ }
+
+ public boolean equals(Virtualizer that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_virtId = true && this.isSetVirtId();
+ boolean that_present_virtId = true && that.isSetVirtId();
+ if (this_present_virtId || that_present_virtId) {
+ if (!(this_present_virtId && that_present_virtId))
+ return false;
+ if (!this.virtId.equals(that.virtId))
+ return false;
+ }
+
+ boolean this_present_virtName = true && this.isSetVirtName();
+ boolean that_present_virtName = true && that.isSetVirtName();
+ if (this_present_virtName || that_present_virtName) {
+ if (!(this_present_virtName && that_present_virtName))
+ return false;
+ if (!this.virtName.equals(that.virtName))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(Virtualizer other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVirtId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtId, other.virtId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetVirtName()).compareTo(other.isSetVirtName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVirtName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtName, other.virtName);
+ 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("Virtualizer(");
+ boolean first = true;
+
+ sb.append("virtId:");
+ if (this.virtId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.virtId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("virtName:");
+ if (this.virtName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.virtName);
+ }
+ 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 VirtualizerStandardSchemeFactory implements SchemeFactory {
+ public VirtualizerStandardScheme getScheme() {
+ return new VirtualizerStandardScheme();
+ }
+ }
+
+ private static class VirtualizerStandardScheme extends StandardScheme<Virtualizer> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Virtualizer 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: // VIRT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // VIRT_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.virtName = iprot.readString();
+ struct.setVirtNameIsSet(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, Virtualizer struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.virtId != null) {
+ oprot.writeFieldBegin(VIRT_ID_FIELD_DESC);
+ oprot.writeString(struct.virtId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.virtName != null) {
+ oprot.writeFieldBegin(VIRT_NAME_FIELD_DESC);
+ oprot.writeString(struct.virtName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class VirtualizerTupleSchemeFactory implements SchemeFactory {
+ public VirtualizerTupleScheme getScheme() {
+ return new VirtualizerTupleScheme();
+ }
+ }
+
+ private static class VirtualizerTupleScheme extends TupleScheme<Virtualizer> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Virtualizer struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetVirtId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetVirtName()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetVirtId()) {
+ oprot.writeString(struct.virtId);
+ }
+ if (struct.isSetVirtName()) {
+ oprot.writeString(struct.virtName);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Virtualizer struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.virtId = iprot.readString();
+ struct.setVirtIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.virtName = iprot.readString();
+ struct.setVirtNameIsSet(true);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/org/openslx/thrifthelper/ThriftManager.java b/src/main/java/org/openslx/thrifthelper/ThriftManager.java
index 6072030..b548f58 100644
--- a/src/main/java/org/openslx/thrifthelper/ThriftManager.java
+++ b/src/main/java/org/openslx/thrifthelper/ThriftManager.java
@@ -9,8 +9,8 @@ import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.apache.thrift.transport.TTransportException;
-import org.openslx.imagemaster.thrift.iface.ImageServer;
-import org.openslx.sat.thrift.iface.Server;
+import org.openslx.bwlp.thrift.iface.MasterServer;
+import org.openslx.bwlp.thrift.iface.SatelliteServer;
import org.openslx.thrifthelper.ThriftHandler.EventCallback;
public class ThriftManager
@@ -48,17 +48,17 @@ public class ThriftManager
/**
* Sat connection. Initialized when we know the sat server IP.
*/
- private static Server.Iface _satClient = null;
+ private static SatelliteServer.Iface _satClient = null;
/**
* Master connection. As its address is known in advance, create the object right away.
*/
- private static ImageServer.Iface _masterClient = (ImageServer.Iface)Proxy.newProxyInstance(
- ImageServer.Iface.class.getClassLoader(),
- new Class[] { ImageServer.Iface.class }, new ThriftHandler<ImageServer.Client>( ImageServer.Client.class, new EventCallback<ImageServer.Client>() {
+ private static MasterServer.Iface _masterClient = (MasterServer.Iface)Proxy.newProxyInstance(
+ MasterServer.Iface.class.getClassLoader(),
+ new Class[] { MasterServer.Iface.class }, new ThriftHandler<MasterServer.Client>( MasterServer.Client.class, new EventCallback<MasterServer.Client>() {
@Override
- public ImageServer.Client getNewClient()
+ public MasterServer.Client getNewClient()
{
// ok lets do it
TTransport transport =
@@ -72,7 +72,7 @@ public class ThriftManager
}
final TProtocol protocol = new TBinaryProtocol( transport );
// now we are ready to create the client, according to ClientType!
- return new ImageServer.Client( protocol );
+ return new MasterServer.Client( protocol );
}
@@ -116,12 +116,12 @@ public class ThriftManager
SATELLITE_IP = ip;
// Create monster proxy class from interface
- _satClient = (Server.Iface)Proxy.newProxyInstance(
- Server.Iface.class.getClassLoader(),
- new Class[] { Server.Iface.class }, new ThriftHandler<Server.Client>( Server.Client.class, new EventCallback<Server.Client>() {
+ _satClient = (SatelliteServer.Iface)Proxy.newProxyInstance(
+ SatelliteServer.Iface.class.getClassLoader(),
+ new Class[] { SatelliteServer.Iface.class }, new ThriftHandler<SatelliteServer.Client>( SatelliteServer.Client.class, new EventCallback<SatelliteServer.Client>() {
@Override
- public Server.Client getNewClient()
+ public SatelliteServer.Client getNewClient()
{
// first check if we have a sat ip
if ( SATELLITE_IP == null ) {
@@ -141,7 +141,7 @@ public class ThriftManager
final TProtocol protocol = new TBinaryProtocol( transport );
// now we are ready to create the client, according to ClientType!
LOGGER.info( "Satellite '" + SATELLITE_IP + "' reachable. Client initialised." );
- return new Server.Client( protocol );
+ return new SatelliteServer.Client( protocol );
}
@Override
@@ -161,7 +161,7 @@ public class ThriftManager
*
* @return the thrift client to the satellite server
*/
- public static Server.Iface getSatClient()
+ public static SatelliteServer.Iface getSatClient()
{
return _satClient;
}
@@ -171,7 +171,7 @@ public class ThriftManager
*
* @return the thrift client to the master server
*/
- public static ImageServer.Iface getMasterClient()
+ public static MasterServer.Iface getMasterClient()
{
return _masterClient;
}
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
index 4d2a588..c3221c1 100644
--- a/src/main/thrift/bwlp.thrift
+++ b/src/main/thrift/bwlp.thrift
@@ -5,12 +5,16 @@ namespace java org.openslx.bwlp.thrift.iface
typedef i64 int
-typedef string ID
+// Use these typedefs if appropriate (to clarify)
typedef string Token
typedef string UUID
-typedef string UserID
typedef i64 UnixTimestamp
+// Use *only* strings (or typedefs of string) as keys for a map (map<string, ...>)
+// UpperCamelCase for struct names
+// lowerCamelCase for methods, variables, struct members
+// CAPS_WITH_UNDERSCORE for enum members
+
// ################# ENUM ################
enum AuthorizationError {
@@ -34,12 +38,10 @@ enum ImageDataError {
UNKNOWN_IMAGE
}
-enum UploadError {
- INVALID_CRC,
- BROKEN_BLOCK,
- GENERIC_ERROR,
- INVALID_METADATA,
- ALREADY_COMPLETE
+enum ShareMode {
+ LOCAL,
+ PUBLISH,
+ DOWNLOAD
}
// ############## STRUCT ###############
@@ -52,21 +54,38 @@ struct UserInfo {
5: string organizationId
}
-struct OrganizationData {
+struct Organization {
1: string organizationId,
2: string displayName,
3: string ecpUrl,
4: list<string> suffixList,
}
+struct Satellite {
+ 1: list<string> addressList,
+ 2: string displayName
+}
+
+// Old session information for clients logging in via "test-account"
struct SessionData {
- 1: ID sessionId,
+ 1: Token sessionId,
2: Token authToken,
3: string serverAddress
}
+struct ClientSessionData {
+ 1: Token sessionId,
+ 2: Token authToken,
+ 3: list<Satellite> satellites
+}
+
struct ServerSessionData {
- 1: ID sessionId
+ 1: Token sessionId
+}
+
+struct Virtualizer {
+ 1: string virtId,
+ 2: string virtName
}
struct OperatingSystem {
@@ -76,45 +95,147 @@ struct OperatingSystem {
4: string architecture,
}
-struct ImagePermission {
- 1: bool read
- 2: bool write
- 3: bool admin
- 4: bool link
+struct ImagePermissions {
+ 1: bool link
+ 2: bool download
+ 3: bool edit
+ 4: bool admin
}
-struct LecturePermission {
- 1: bool write
+struct LecturePermissions {
+ 1: bool edit
2: bool admin
}
-struct ImageBaseData {
+struct ImageBaseWrite {
+ 1: string imageName,
+ 2: string description,
+ 3: i32 osId,
+ 4: bool isTemplate,
+ 5: ImagePermissions defaultPermissions,
+ 6: ShareMode shareMode,
+ 7: optional UUID ownerId,
+}
+
+struct ImagePublishData {
+ 1: UUID imageBaseId,
+ 2: UUID currentVersionId,
+ 3: string imageName,
+ 4: i32 osId,
+ 5: string virtId,
+ 6: UnixTimestamp baseCreateTime,
+ 7: UnixTimestamp versionCreateTime,
+ 8: UUID ownerId,
+ 9: UUID uploaderId,
+ 11: i64 fileSize,
+ 16: bool isTemplate,
+}
+
+struct ImageVersionWrite {
+ 1: bool isEnabled,
+ 2: bool isRestricted,
+}
+
+struct ImageSummaryRead {
1: UUID imageBaseId,
+ 2: UUID currentVersionId,
3: string imageName,
- 10: string description,
- 5: i32 osId,
+ 4: i32 osId,
+ 5: string virtId,
6: UnixTimestamp createTime,
7: UnixTimestamp updateTime,
- 9: string isTemplate,
+ 8: UUID ownerId,
+ 9: UUID uploaderId,
+ 10: ShareMode shareMode,
+ 11: i64 fileSize,
+ 12: bool isEnabled,
+ 13: bool isRestricted,
+ 14: bool isValid,
+ 15: bool isProcessed,
+ 16: bool isTemplate,
+ 17: ImagePermissions defaultPermissions,
+ 18: optional ImagePermissions userPermissions,
}
-struct ImagePermissionCombined {
- 1: Image image,
- 2: ImagePermission permission,
+
+struct ImageVersionDetails {
+ 1: UUID versionId,
+ 2: UnixTimestamp createTime,
+ 3: UnixTimestamp expireTime,
+ 4: i64 fileSize,
+ 5: UUID uploaderId,
+ 6: bool isEnabled,
+ 7: bool isRestricted,
+ 8: bool isValid,
+ 9: bool isProcessed,
}
-struct Lecture {
- 1: optional UUID lectureId,
+struct ImageDetailsRead {
+ 1: UUID imageBaseId,
+ 2: UUID currentVersionId,
+ 3: list<ImageVersionDetails> versions,
+ 4: string imageName,
+ 5: string description,
+ 6: list<string> tags,
+ 7: list<string> software,
+ 8: i32 osId,
+ 9: string virtId,
+ 10: UnixTimestamp createTime,
+ 11: UnixTimestamp updateTime,
+ 12: UUID ownerId,
+ 13: UUID updaterId,
+ 14: ShareMode shareMode,
+ 15: bool isTemplate,
+ 16: ImagePermissions defaultPermissions,
+ 17: optional ImagePermissions userPermissions,
+}
+
+struct LectureWrite {
+ 1: string lectureName,
+ 2: string description,
+ 3: UUID imageVersionId,
+ 4: bool isEnabled,
+ 5: UnixTimestamp startTime,
+ 6: UnixTimestamp endTime,
+ 7: UUID ownerId,
+ 8: bool isExam,
+ 9: bool hasInternetAccess,
+ 10: LecturePermissions defaultPermissions,
+}
+
+struct LectureSummary {
+ 1: UUID lectureId,
2: string lectureName,
- 3: string isActive,
- 4: UnixTimestamp startTime,
- 5: UnixTimestamp endTime,
- 6: UnixTimestamp lastUsed,
- 7: string description,
- 8: UUID imageId
+ 3: UUID imageVersionId,
+ 4: string imageName,
+ 5: bool isEnabled,
+ 6: UnixTimestamp startTime,
+ 7: UnixTimestamp endTime,
+ 8: UnixTimestamp lastUsed,
+ 9: i32 useCount,
+ 10: UUID ownerId,
+ 11: UUID updaterId,
+ 12: bool isExam,
+ 13: bool hasInternetAccess,
+ 14: LecturePermissions defaultPermissions,
+ 15: optional LecturePermissions userPermissions,
}
-struct LecturePermissionCombined {
- 1: Lecture lecture,
- 2: LecturePermission permission,
+
+struct LectureRead {
+ 1: UUID lectureId,
+ 2: string lectureName,
+ 3: string description,
+ 4: ImageSummaryRead image,
+ 5: bool isEnabled,
+ 6: UnixTimestamp startTime,
+ 7: UnixTimestamp endTime,
+ 8: UnixTimestamp lastUsed,
+ 9: i32 useCount,
+ 10: UUID ownerId,
+ 11: UUID updaterId,
+ 12: bool isExam,
+ 13: bool hasInternetAccess,
+ 14: LecturePermissions defaultPermissions,
+ 15: optional LecturePermissions userPermissions,
}
struct TransferInformation {
@@ -123,13 +244,13 @@ struct TransferInformation {
3: i32 sslPort,
}
-// ############ EXCEPTION ######################
-
-exception TUploadFinishException {
- 1: string reason,
+struct UploadStatus {
+ 1: binary blockStatus,
}
-exception TUploadRejectedException {
+// ############ EXCEPTION ######################
+
+exception TTransferRejectedException {
1: string reason,
}
@@ -146,13 +267,11 @@ exception TAuthenticationException {
exception TInvalidTokenException {
}
-exception TImageDataException {
- 1: ImageDataError number,
- 2: string message
+exception TNotFoundException {
}
-exception TDownloadRejectedException {
- 1: UploadError number,
+exception TImageDataException {
+ 1: ImageDataError number,
2: string message
}
@@ -162,41 +281,77 @@ service SatelliteServer {
int getVersion(),
// File transfer related
- TransferInformation requestUpload(1: string userToken, 2: i64 fileSize, 3: list<binary> blockHashes)
- throws (1:TUploadRejectedException rejection),
- void cancelUpload(1: string uploadToken),
- TransferInformation requestDownload(1: string userToken, 2: string imageId),
+ TransferInformation requestImageVersionUpload(1: Token userToken, 2: UUID imageBaseId, 3: i64 fileSize, 4: list<binary> blockHashes)
+ throws (1:TTransferRejectedException rejection, 2:TAuthorizationException authError),
+ void cancelUpload(1: Token uploadToken),
+ UploadStatus queryUploadStatus(1: Token uploadToken)
+ throws (1:TInvalidTokenException ex1),
+
+ TransferInformation requestDownload(1: Token userToken, 2: UUID imageVersionId)
+ throws (1:TAuthorizationException authError),
void cancelDownload(1: string downloadToken),
// Authentication
- bool authenticated(1: Token userToken),
- bool setSessionInvalid(1: Token userToken),
+ bool isAuthenticated(1: Token userToken),
+ void invalidateSession(1: Token userToken),
// Misc
list<OperatingSystem> getOperatingSystems(),
- list<string> getAllOrganizations(1: Token userToken),
+ list<Virtualizer> getVirtualizers(),
+ list<Organization> getAllOrganizations(),
- // Image related
- string finishImageUpload(1: string imageName, 2: string description, 10: bool license, 11: bool internet, 17: int shareMode, 18: string os, 22: Token uploadToken)
- throws (1:TUploadFinishException failure),
- list<ImagePermissionCombined> getImageList(1: Token userToken),
- ImagePermissionCombined getImageData(1: UUID imageId, 3: Token userToken),
- bool updateImageData(1: Token userToken, 9: Image image),
+ /*
+ * Image related
+ */
+ // Get image list. tagSearch can be null, which disables this type of filtering and returns all
+ list<ImageSummaryRead> getImageList(1: Token userToken, 2: list<string> tagSearch)
+ throws (1:TAuthorizationException authError),
+ // Query detailed information about an image
+ ImageDetailsRead getImageDetails(1: Token userToken, 2: UUID imageBaseId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ // Update given image's base meta data
+ bool updateImageBase(1: Token userToken, 2: UUID imageBaseId 3: ImageBaseWrite image)
+ throws (1:TAuthorizationException authError),
+ // Update a certain image version's meta data
+ bool updateImageVersion(1: Token userToken, 2: UUID imageVersionId 3: ImageVersionWrite image)
+ throws (1:TAuthorizationException authError),
+ // Delete given image version. If the version is currently in use by a lecture, it will not be
+ // deleted and false is returned
+ bool deleteImageVersion(1: Token userToken, 2: UUID imageVersionId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ // Write list of permissions for given image
+ bool writeImagePermissions(1: Token userToken, 2: UUID imageId, 3: map<UUID, ImagePermissions> permissions)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ // Get all user-permissions for given image
+ map<UUID, ImagePermissions> getImagePermissions(1: Token userToken, 2: UUID imageBaseId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
- // Lecture related
- bool writeLecture(1: Token userToken, 2: Lecture lecture),
- list<Lecture> getLectureList(1: Token userToken),
- Lecture getLectureData(1: UUID lectureId, 2: Token userToken),
- bool deleteImage(1: string id, 2: string version, 3: string token),
- bool connectedToLecture(1: string id, 2: string version, 3: string token),
- bool deleteLecture(1: string lectureId, 2: string token),
- bool checkUser(1: string username, 2: string token),
- bool writeImagePermissions(1: Token userToken, 2: UUID imageId, 3: list<ImagePermission> permissions),
- bool writeLecturePermissions(1: Token userToken, 2: UUID lectureId, 3: list<LecturePermission> permissions),
- map<UserID, UserInfo> getImagePermissions(1: Token userToken, 2: UUID imageId),
- map<UserID, UserInfo> getLecturePermissions(1: Token userToken, 2: UUID lectureId),
- void deleteAllAdditionalImagePermissions(1: UUID imageID, 2: Token userToken),
- void deleteAllAdditionalLecturePermissions(1: UUID lectureID, 2: Token userToken),
+ /*
+ * Lecture related
+ */
+ // Create new lecture
+ UUID createLecture(1: Token userToken, 2: LectureWrite lecture)
+ throws (1:TAuthorizationException authError),
+ // Update existing lecture
+ bool updateLecture(1: Token userToken, 2: UUID lectureId, 3: LectureWrite lecture)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ // Get list of all lectures
+ list<LectureSummary> getLectureList(1: Token userToken)
+ throws (1:TAuthorizationException authError),
+ // Get detailed lecture information
+ LectureRead getLectureDetails(1: Token userToken, 2: UUID lectureId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ // Get list of lectures that are using the given image version
+ list<LectureSummary> getLecturesByImageVersion(1: Token userToken, 2: UUID imageVersionId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ // Delete given lecture
+ bool deleteLecture(1: Token userToken, 2: UUID lectureId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ // Write list of permissions for given lecture
+ bool writeLecturePermissions(1: Token userToken, 2: UUID lectureId, 3: map<UUID, LecturePermissions> permissions)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
+ map<UUID, LecturePermissions> getLecturePermissions(1: Token userToken, 2: UUID lectureId)
+ throws (1:TAuthorizationException authError, 2:TNotFoundException notFound),
}
// Central master server
@@ -206,37 +361,55 @@ service MasterServer {
/*
* Client (User's Desktop App) calls
*/
+ // Ping service
bool ping(),
- SessionData authenticate(1:string login, 2:string password) throws (1:AuthenticationException failure),
-
- list<OrganizationData> getOrganizations(),
-
- list<UserInfo> findUser(1:ID sessionId, 2:string organizationId, 3:string searchTerm) throws (1:AuthorizationException failure),
-
- list<ImageData> getPublicImages(1:ID sessionId, 2:i32 page) throws (1:AuthorizationException failure),
-
- list<OperatingSystem> getOperatingSystems(),
+ // Old style test-account login
+ SessionData authenticate(1:string login, 2:string password)
+ throws (1:TAuthorizationException failure),
+ // New style test-account login
+ ClientSessionData localAccountLogin(1:string login, 2:string password)
+ throws (1:TAuthorizationException failure),
+ // find a user in a given organization by a search term
+ list<UserInfo> findUser(1:Token sessionId, 2:string organizationId, 3:string searchTerm)
+ throws (1:TAuthorizationException failure),
+ // Get list of publicly available images
+ list<ImagePublishData> getPublicImages(1:Token sessionId, 2:i32 page)
+ throws (1:TAuthorizationException failure),
/*
* Server (Satellite) calls
*/
- UserInfo getUserFromToken(1:Token token) throws (1:InvalidTokenException failure),
-
- bool isServerAuthenticated(1:string serverSessionId),
-
- binary startServerAuthentication(1:string organization) throws (1: AuthenticationException failure),
-
- ServerSessionData serverAuthenticate(1:string organizationId, 2:binary challengeResponse) throws (1:AuthenticationException failure),
-
- UploadData submitImage(1:ID serverSessionId, 2:ImageData imageDescription, 3:list<i32> crcSums) throws (1:AuthorizationException failure, 2: ImageDataException failure2, 3: UploadException failure3),
-
- DownloadData getImage(2:ID serverSessionId, 1:UUID uuid) throws (1:AuthorizationException failure, 2: ImageDataException failure2),
-
- bool publishUser(1:ID serverSessionId, 2:UserInfo user) throws (1:AuthorizationException failure),
+ // Verify a user by querying its meta data from the supplied token
+ UserInfo getUserFromToken(1:Token token)
+ throws (1:TInvalidTokenException failure),
+ // Check if the server is authenticated
+ bool isServerAuthenticated(1:Token serverSessionId),
+ // Start authentication of server for given organization
+ binary startServerAuthentication(1:string organizationId)
+ throws (1: TAuthenticationException failure),
+ // Reply to master server authentication challenge
+ ServerSessionData serverAuthenticate(1:string organizationId, 2:binary challengeResponse)
+ throws (1:TAuthenticationException failure),
+ // Request upload of an image to the master server
+ TransferInformation submitImage(1:Token serverSessionId, 2:ImagePublishData imageDescription, 3:list<binary> blockHashes)
+ throws (1:TAuthorizationException failure, 2: TImageDataException failure2, 3: TTransferRejectedException failure3),
+ // Request download of an image
+ TransferInformation getImage(2:Token serverSessionId, 1:UUID imageVersionId)
+ throws (1:TAuthorizationException failure, 2: TImageDataException failure2),
bool registerSatellite(1:string organizationId, 2:string address, 3:string modulus, 4:string exponent),
- bool updateSatelliteAddress(1:ID serverSessionId, 2:string address),
+ bool updateSatelliteAddress(1:Token serverSessionId, 2:string address),
+
+/*
+ * Shared calls
+ */
+ // Get list of known organizations with meta data
+ list<Organization> getOrganizations(),
+
+ list<OperatingSystem> getOperatingSystems(),
+
+ list<Virtualizer> getVirtualizers(),
}