airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [21/24] airavata git commit: adding thrift generated files
Date Tue, 12 Jan 2016 15:48:04 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/a14d717f/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/FileCollectionModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/FileCollectionModel.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/FileCollectionModel.java
new file mode 100644
index 0000000..851fe68
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/FileCollectionModel.java
@@ -0,0 +1,1247 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.model.data.replica;
+
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-12")
+public class FileCollectionModel implements org.apache.thrift.TBase<FileCollectionModel,
FileCollectionModel._Fields>, java.io.Serializable, Cloneable, Comparable<FileCollectionModel>
{
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileCollectionModel");
+
+  private static final org.apache.thrift.protocol.TField COLLECTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("collectionId",
org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId",
org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username",
org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField SHARED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedUsers",
org.apache.thrift.protocol.TType.LIST, (short)4);
+  private static final org.apache.thrift.protocol.TField SHARED_PUBLIC_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedPublic",
org.apache.thrift.protocol.TType.BOOL, (short)5);
+  private static final org.apache.thrift.protocol.TField COLLECTION_NAME_FIELD_DESC = new
org.apache.thrift.protocol.TField("collectionName", org.apache.thrift.protocol.TType.STRING,
(short)6);
+  private static final org.apache.thrift.protocol.TField COLLECTION_DESCRIPTION_FIELD_DESC
= new org.apache.thrift.protocol.TField("collectionDescription", org.apache.thrift.protocol.TType.STRING,
(short)7);
+  private static final org.apache.thrift.protocol.TField FILE_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("fileIdList",
org.apache.thrift.protocol.TType.LIST, (short)8);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new FileCollectionModelStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new FileCollectionModelTupleSchemeFactory());
+  }
+
+  private String collectionId; // optional
+  private String gatewayId; // optional
+  private String username; // optional
+  private List<String> sharedUsers; // optional
+  private boolean sharedPublic; // optional
+  private String collectionName; // optional
+  private String collectionDescription; // optional
+  private List<String> fileIdList; // 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 {
+    COLLECTION_ID((short)1, "collectionId"),
+    GATEWAY_ID((short)2, "gatewayId"),
+    USERNAME((short)3, "username"),
+    SHARED_USERS((short)4, "sharedUsers"),
+    SHARED_PUBLIC((short)5, "sharedPublic"),
+    COLLECTION_NAME((short)6, "collectionName"),
+    COLLECTION_DESCRIPTION((short)7, "collectionDescription"),
+    FILE_ID_LIST((short)8, "fileIdList");
+
+    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: // COLLECTION_ID
+          return COLLECTION_ID;
+        case 2: // GATEWAY_ID
+          return GATEWAY_ID;
+        case 3: // USERNAME
+          return USERNAME;
+        case 4: // SHARED_USERS
+          return SHARED_USERS;
+        case 5: // SHARED_PUBLIC
+          return SHARED_PUBLIC;
+        case 6: // COLLECTION_NAME
+          return COLLECTION_NAME;
+        case 7: // COLLECTION_DESCRIPTION
+          return COLLECTION_DESCRIPTION;
+        case 8: // FILE_ID_LIST
+          return FILE_ID_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
+  private static final int __SHAREDPUBLIC_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.COLLECTION_ID,_Fields.GATEWAY_ID,_Fields.USERNAME,_Fields.SHARED_USERS,_Fields.SHARED_PUBLIC,_Fields.COLLECTION_NAME,_Fields.COLLECTION_DESCRIPTION,_Fields.FILE_ID_LIST};
+  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.COLLECTION_ID, new org.apache.thrift.meta_data.FieldMetaData("collectionId",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.SHARED_USERS, new org.apache.thrift.meta_data.FieldMetaData("sharedUsers",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        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.SHARED_PUBLIC, new org.apache.thrift.meta_data.FieldMetaData("sharedPublic",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.COLLECTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("collectionName",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.COLLECTION_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("collectionDescription",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.FILE_ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("fileIdList",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        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(FileCollectionModel.class,
metaDataMap);
+  }
+
+  public FileCollectionModel() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public FileCollectionModel(FileCollectionModel other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetCollectionId()) {
+      this.collectionId = other.collectionId;
+    }
+    if (other.isSetGatewayId()) {
+      this.gatewayId = other.gatewayId;
+    }
+    if (other.isSetUsername()) {
+      this.username = other.username;
+    }
+    if (other.isSetSharedUsers()) {
+      List<String> __this__sharedUsers = new ArrayList<String>(other.sharedUsers);
+      this.sharedUsers = __this__sharedUsers;
+    }
+    this.sharedPublic = other.sharedPublic;
+    if (other.isSetCollectionName()) {
+      this.collectionName = other.collectionName;
+    }
+    if (other.isSetCollectionDescription()) {
+      this.collectionDescription = other.collectionDescription;
+    }
+    if (other.isSetFileIdList()) {
+      List<String> __this__fileIdList = new ArrayList<String>(other.fileIdList);
+      this.fileIdList = __this__fileIdList;
+    }
+  }
+
+  public FileCollectionModel deepCopy() {
+    return new FileCollectionModel(this);
+  }
+
+  @Override
+  public void clear() {
+    this.collectionId = null;
+    this.gatewayId = null;
+    this.username = null;
+    this.sharedUsers = null;
+    setSharedPublicIsSet(false);
+    this.sharedPublic = false;
+    this.collectionName = null;
+    this.collectionDescription = null;
+    this.fileIdList = null;
+  }
+
+  public String getCollectionId() {
+    return this.collectionId;
+  }
+
+  public void setCollectionId(String collectionId) {
+    this.collectionId = collectionId;
+  }
+
+  public void unsetCollectionId() {
+    this.collectionId = null;
+  }
+
+  /** Returns true if field collectionId is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetCollectionId() {
+    return this.collectionId != null;
+  }
+
+  public void setCollectionIdIsSet(boolean value) {
+    if (!value) {
+      this.collectionId = null;
+    }
+  }
+
+  public String getGatewayId() {
+    return this.gatewayId;
+  }
+
+  public void setGatewayId(String gatewayId) {
+    this.gatewayId = gatewayId;
+  }
+
+  public void unsetGatewayId() {
+    this.gatewayId = null;
+  }
+
+  /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetGatewayId() {
+    return this.gatewayId != null;
+  }
+
+  public void setGatewayIdIsSet(boolean value) {
+    if (!value) {
+      this.gatewayId = null;
+    }
+  }
+
+  public String getUsername() {
+    return this.username;
+  }
+
+  public void setUsername(String username) {
+    this.username = username;
+  }
+
+  public void unsetUsername() {
+    this.username = null;
+  }
+
+  /** Returns true if field username is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetUsername() {
+    return this.username != null;
+  }
+
+  public void setUsernameIsSet(boolean value) {
+    if (!value) {
+      this.username = null;
+    }
+  }
+
+  public int getSharedUsersSize() {
+    return (this.sharedUsers == null) ? 0 : this.sharedUsers.size();
+  }
+
+  public java.util.Iterator<String> getSharedUsersIterator() {
+    return (this.sharedUsers == null) ? null : this.sharedUsers.iterator();
+  }
+
+  public void addToSharedUsers(String elem) {
+    if (this.sharedUsers == null) {
+      this.sharedUsers = new ArrayList<String>();
+    }
+    this.sharedUsers.add(elem);
+  }
+
+  public List<String> getSharedUsers() {
+    return this.sharedUsers;
+  }
+
+  public void setSharedUsers(List<String> sharedUsers) {
+    this.sharedUsers = sharedUsers;
+  }
+
+  public void unsetSharedUsers() {
+    this.sharedUsers = null;
+  }
+
+  /** Returns true if field sharedUsers is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetSharedUsers() {
+    return this.sharedUsers != null;
+  }
+
+  public void setSharedUsersIsSet(boolean value) {
+    if (!value) {
+      this.sharedUsers = null;
+    }
+  }
+
+  public boolean isSharedPublic() {
+    return this.sharedPublic;
+  }
+
+  public void setSharedPublic(boolean sharedPublic) {
+    this.sharedPublic = sharedPublic;
+    setSharedPublicIsSet(true);
+  }
+
+  public void unsetSharedPublic() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREDPUBLIC_ISSET_ID);
+  }
+
+  /** Returns true if field sharedPublic is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetSharedPublic() {
+    return EncodingUtils.testBit(__isset_bitfield, __SHAREDPUBLIC_ISSET_ID);
+  }
+
+  public void setSharedPublicIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREDPUBLIC_ISSET_ID, value);
+  }
+
+  public String getCollectionName() {
+    return this.collectionName;
+  }
+
+  public void setCollectionName(String collectionName) {
+    this.collectionName = collectionName;
+  }
+
+  public void unsetCollectionName() {
+    this.collectionName = null;
+  }
+
+  /** Returns true if field collectionName is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetCollectionName() {
+    return this.collectionName != null;
+  }
+
+  public void setCollectionNameIsSet(boolean value) {
+    if (!value) {
+      this.collectionName = null;
+    }
+  }
+
+  public String getCollectionDescription() {
+    return this.collectionDescription;
+  }
+
+  public void setCollectionDescription(String collectionDescription) {
+    this.collectionDescription = collectionDescription;
+  }
+
+  public void unsetCollectionDescription() {
+    this.collectionDescription = null;
+  }
+
+  /** Returns true if field collectionDescription is set (has been assigned a value) and
false otherwise */
+  public boolean isSetCollectionDescription() {
+    return this.collectionDescription != null;
+  }
+
+  public void setCollectionDescriptionIsSet(boolean value) {
+    if (!value) {
+      this.collectionDescription = null;
+    }
+  }
+
+  public int getFileIdListSize() {
+    return (this.fileIdList == null) ? 0 : this.fileIdList.size();
+  }
+
+  public java.util.Iterator<String> getFileIdListIterator() {
+    return (this.fileIdList == null) ? null : this.fileIdList.iterator();
+  }
+
+  public void addToFileIdList(String elem) {
+    if (this.fileIdList == null) {
+      this.fileIdList = new ArrayList<String>();
+    }
+    this.fileIdList.add(elem);
+  }
+
+  public List<String> getFileIdList() {
+    return this.fileIdList;
+  }
+
+  public void setFileIdList(List<String> fileIdList) {
+    this.fileIdList = fileIdList;
+  }
+
+  public void unsetFileIdList() {
+    this.fileIdList = null;
+  }
+
+  /** Returns true if field fileIdList is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetFileIdList() {
+    return this.fileIdList != null;
+  }
+
+  public void setFileIdListIsSet(boolean value) {
+    if (!value) {
+      this.fileIdList = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case COLLECTION_ID:
+      if (value == null) {
+        unsetCollectionId();
+      } else {
+        setCollectionId((String)value);
+      }
+      break;
+
+    case GATEWAY_ID:
+      if (value == null) {
+        unsetGatewayId();
+      } else {
+        setGatewayId((String)value);
+      }
+      break;
+
+    case USERNAME:
+      if (value == null) {
+        unsetUsername();
+      } else {
+        setUsername((String)value);
+      }
+      break;
+
+    case SHARED_USERS:
+      if (value == null) {
+        unsetSharedUsers();
+      } else {
+        setSharedUsers((List<String>)value);
+      }
+      break;
+
+    case SHARED_PUBLIC:
+      if (value == null) {
+        unsetSharedPublic();
+      } else {
+        setSharedPublic((Boolean)value);
+      }
+      break;
+
+    case COLLECTION_NAME:
+      if (value == null) {
+        unsetCollectionName();
+      } else {
+        setCollectionName((String)value);
+      }
+      break;
+
+    case COLLECTION_DESCRIPTION:
+      if (value == null) {
+        unsetCollectionDescription();
+      } else {
+        setCollectionDescription((String)value);
+      }
+      break;
+
+    case FILE_ID_LIST:
+      if (value == null) {
+        unsetFileIdList();
+      } else {
+        setFileIdList((List<String>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case COLLECTION_ID:
+      return getCollectionId();
+
+    case GATEWAY_ID:
+      return getGatewayId();
+
+    case USERNAME:
+      return getUsername();
+
+    case SHARED_USERS:
+      return getSharedUsers();
+
+    case SHARED_PUBLIC:
+      return isSharedPublic();
+
+    case COLLECTION_NAME:
+      return getCollectionName();
+
+    case COLLECTION_DESCRIPTION:
+      return getCollectionDescription();
+
+    case FILE_ID_LIST:
+      return getFileIdList();
+
+    }
+    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 COLLECTION_ID:
+      return isSetCollectionId();
+    case GATEWAY_ID:
+      return isSetGatewayId();
+    case USERNAME:
+      return isSetUsername();
+    case SHARED_USERS:
+      return isSetSharedUsers();
+    case SHARED_PUBLIC:
+      return isSetSharedPublic();
+    case COLLECTION_NAME:
+      return isSetCollectionName();
+    case COLLECTION_DESCRIPTION:
+      return isSetCollectionDescription();
+    case FILE_ID_LIST:
+      return isSetFileIdList();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof FileCollectionModel)
+      return this.equals((FileCollectionModel)that);
+    return false;
+  }
+
+  public boolean equals(FileCollectionModel that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_collectionId = true && this.isSetCollectionId();
+    boolean that_present_collectionId = true && that.isSetCollectionId();
+    if (this_present_collectionId || that_present_collectionId) {
+      if (!(this_present_collectionId && that_present_collectionId))
+        return false;
+      if (!this.collectionId.equals(that.collectionId))
+        return false;
+    }
+
+    boolean this_present_gatewayId = true && this.isSetGatewayId();
+    boolean that_present_gatewayId = true && that.isSetGatewayId();
+    if (this_present_gatewayId || that_present_gatewayId) {
+      if (!(this_present_gatewayId && that_present_gatewayId))
+        return false;
+      if (!this.gatewayId.equals(that.gatewayId))
+        return false;
+    }
+
+    boolean this_present_username = true && this.isSetUsername();
+    boolean that_present_username = true && that.isSetUsername();
+    if (this_present_username || that_present_username) {
+      if (!(this_present_username && that_present_username))
+        return false;
+      if (!this.username.equals(that.username))
+        return false;
+    }
+
+    boolean this_present_sharedUsers = true && this.isSetSharedUsers();
+    boolean that_present_sharedUsers = true && that.isSetSharedUsers();
+    if (this_present_sharedUsers || that_present_sharedUsers) {
+      if (!(this_present_sharedUsers && that_present_sharedUsers))
+        return false;
+      if (!this.sharedUsers.equals(that.sharedUsers))
+        return false;
+    }
+
+    boolean this_present_sharedPublic = true && this.isSetSharedPublic();
+    boolean that_present_sharedPublic = true && that.isSetSharedPublic();
+    if (this_present_sharedPublic || that_present_sharedPublic) {
+      if (!(this_present_sharedPublic && that_present_sharedPublic))
+        return false;
+      if (this.sharedPublic != that.sharedPublic)
+        return false;
+    }
+
+    boolean this_present_collectionName = true && this.isSetCollectionName();
+    boolean that_present_collectionName = true && that.isSetCollectionName();
+    if (this_present_collectionName || that_present_collectionName) {
+      if (!(this_present_collectionName && that_present_collectionName))
+        return false;
+      if (!this.collectionName.equals(that.collectionName))
+        return false;
+    }
+
+    boolean this_present_collectionDescription = true && this.isSetCollectionDescription();
+    boolean that_present_collectionDescription = true && that.isSetCollectionDescription();
+    if (this_present_collectionDescription || that_present_collectionDescription) {
+      if (!(this_present_collectionDescription && that_present_collectionDescription))
+        return false;
+      if (!this.collectionDescription.equals(that.collectionDescription))
+        return false;
+    }
+
+    boolean this_present_fileIdList = true && this.isSetFileIdList();
+    boolean that_present_fileIdList = true && that.isSetFileIdList();
+    if (this_present_fileIdList || that_present_fileIdList) {
+      if (!(this_present_fileIdList && that_present_fileIdList))
+        return false;
+      if (!this.fileIdList.equals(that.fileIdList))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_collectionId = true && (isSetCollectionId());
+    list.add(present_collectionId);
+    if (present_collectionId)
+      list.add(collectionId);
+
+    boolean present_gatewayId = true && (isSetGatewayId());
+    list.add(present_gatewayId);
+    if (present_gatewayId)
+      list.add(gatewayId);
+
+    boolean present_username = true && (isSetUsername());
+    list.add(present_username);
+    if (present_username)
+      list.add(username);
+
+    boolean present_sharedUsers = true && (isSetSharedUsers());
+    list.add(present_sharedUsers);
+    if (present_sharedUsers)
+      list.add(sharedUsers);
+
+    boolean present_sharedPublic = true && (isSetSharedPublic());
+    list.add(present_sharedPublic);
+    if (present_sharedPublic)
+      list.add(sharedPublic);
+
+    boolean present_collectionName = true && (isSetCollectionName());
+    list.add(present_collectionName);
+    if (present_collectionName)
+      list.add(collectionName);
+
+    boolean present_collectionDescription = true && (isSetCollectionDescription());
+    list.add(present_collectionDescription);
+    if (present_collectionDescription)
+      list.add(collectionDescription);
+
+    boolean present_fileIdList = true && (isSetFileIdList());
+    list.add(present_fileIdList);
+    if (present_fileIdList)
+      list.add(fileIdList);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(FileCollectionModel other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetCollectionId()).compareTo(other.isSetCollectionId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCollectionId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collectionId, other.collectionId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGatewayId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUsername()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSharedUsers()).compareTo(other.isSetSharedUsers());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSharedUsers()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharedUsers, other.sharedUsers);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSharedPublic()).compareTo(other.isSetSharedPublic());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSharedPublic()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharedPublic, other.sharedPublic);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCollectionName()).compareTo(other.isSetCollectionName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCollectionName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collectionName, other.collectionName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCollectionDescription()).compareTo(other.isSetCollectionDescription());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCollectionDescription()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collectionDescription,
other.collectionDescription);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFileIdList()).compareTo(other.isSetFileIdList());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFileIdList()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileIdList, other.fileIdList);
+      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("FileCollectionModel(");
+    boolean first = true;
+
+    if (isSetCollectionId()) {
+      sb.append("collectionId:");
+      if (this.collectionId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.collectionId);
+      }
+      first = false;
+    }
+    if (isSetGatewayId()) {
+      if (!first) sb.append(", ");
+      sb.append("gatewayId:");
+      if (this.gatewayId == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.gatewayId);
+      }
+      first = false;
+    }
+    if (isSetUsername()) {
+      if (!first) sb.append(", ");
+      sb.append("username:");
+      if (this.username == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.username);
+      }
+      first = false;
+    }
+    if (isSetSharedUsers()) {
+      if (!first) sb.append(", ");
+      sb.append("sharedUsers:");
+      if (this.sharedUsers == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.sharedUsers);
+      }
+      first = false;
+    }
+    if (isSetSharedPublic()) {
+      if (!first) sb.append(", ");
+      sb.append("sharedPublic:");
+      sb.append(this.sharedPublic);
+      first = false;
+    }
+    if (isSetCollectionName()) {
+      if (!first) sb.append(", ");
+      sb.append("collectionName:");
+      if (this.collectionName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.collectionName);
+      }
+      first = false;
+    }
+    if (isSetCollectionDescription()) {
+      if (!first) sb.append(", ");
+      sb.append("collectionDescription:");
+      if (this.collectionDescription == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.collectionDescription);
+      }
+      first = false;
+    }
+    if (isSetFileIdList()) {
+      if (!first) sb.append(", ");
+      sb.append("fileIdList:");
+      if (this.fileIdList == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.fileIdList);
+      }
+      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 FileCollectionModelStandardSchemeFactory implements SchemeFactory
{
+    public FileCollectionModelStandardScheme getScheme() {
+      return new FileCollectionModelStandardScheme();
+    }
+  }
+
+  private static class FileCollectionModelStandardScheme extends StandardScheme<FileCollectionModel>
{
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, FileCollectionModel 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: // COLLECTION_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.collectionId = iprot.readString();
+              struct.setCollectionIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // GATEWAY_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.gatewayId = iprot.readString();
+              struct.setGatewayIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // USERNAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.username = iprot.readString();
+              struct.setUsernameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // SHARED_USERS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+                struct.sharedUsers = new ArrayList<String>(_list0.size);
+                String _elem1;
+                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+                {
+                  _elem1 = iprot.readString();
+                  struct.sharedUsers.add(_elem1);
+                }
+                iprot.readListEnd();
+              }
+              struct.setSharedUsersIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // SHARED_PUBLIC
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.sharedPublic = iprot.readBool();
+              struct.setSharedPublicIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // COLLECTION_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.collectionName = iprot.readString();
+              struct.setCollectionNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // COLLECTION_DESCRIPTION
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.collectionDescription = iprot.readString();
+              struct.setCollectionDescriptionIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // FILE_ID_LIST
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
+                struct.fileIdList = new ArrayList<String>(_list3.size);
+                String _elem4;
+                for (int _i5 = 0; _i5 < _list3.size; ++_i5)
+                {
+                  _elem4 = iprot.readString();
+                  struct.fileIdList.add(_elem4);
+                }
+                iprot.readListEnd();
+              }
+              struct.setFileIdListIsSet(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();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, FileCollectionModel struct)
throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.collectionId != null) {
+        if (struct.isSetCollectionId()) {
+          oprot.writeFieldBegin(COLLECTION_ID_FIELD_DESC);
+          oprot.writeString(struct.collectionId);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.gatewayId != null) {
+        if (struct.isSetGatewayId()) {
+          oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.gatewayId);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.username != null) {
+        if (struct.isSetUsername()) {
+          oprot.writeFieldBegin(USERNAME_FIELD_DESC);
+          oprot.writeString(struct.username);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.sharedUsers != null) {
+        if (struct.isSetSharedUsers()) {
+          oprot.writeFieldBegin(SHARED_USERS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
struct.sharedUsers.size()));
+            for (String _iter6 : struct.sharedUsers)
+            {
+              oprot.writeString(_iter6);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetSharedPublic()) {
+        oprot.writeFieldBegin(SHARED_PUBLIC_FIELD_DESC);
+        oprot.writeBool(struct.sharedPublic);
+        oprot.writeFieldEnd();
+      }
+      if (struct.collectionName != null) {
+        if (struct.isSetCollectionName()) {
+          oprot.writeFieldBegin(COLLECTION_NAME_FIELD_DESC);
+          oprot.writeString(struct.collectionName);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.collectionDescription != null) {
+        if (struct.isSetCollectionDescription()) {
+          oprot.writeFieldBegin(COLLECTION_DESCRIPTION_FIELD_DESC);
+          oprot.writeString(struct.collectionDescription);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.fileIdList != null) {
+        if (struct.isSetFileIdList()) {
+          oprot.writeFieldBegin(FILE_ID_LIST_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
struct.fileIdList.size()));
+            for (String _iter7 : struct.fileIdList)
+            {
+              oprot.writeString(_iter7);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class FileCollectionModelTupleSchemeFactory implements SchemeFactory {
+    public FileCollectionModelTupleScheme getScheme() {
+      return new FileCollectionModelTupleScheme();
+    }
+  }
+
+  private static class FileCollectionModelTupleScheme extends TupleScheme<FileCollectionModel>
{
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, FileCollectionModel struct)
throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetCollectionId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetGatewayId()) {
+        optionals.set(1);
+      }
+      if (struct.isSetUsername()) {
+        optionals.set(2);
+      }
+      if (struct.isSetSharedUsers()) {
+        optionals.set(3);
+      }
+      if (struct.isSetSharedPublic()) {
+        optionals.set(4);
+      }
+      if (struct.isSetCollectionName()) {
+        optionals.set(5);
+      }
+      if (struct.isSetCollectionDescription()) {
+        optionals.set(6);
+      }
+      if (struct.isSetFileIdList()) {
+        optionals.set(7);
+      }
+      oprot.writeBitSet(optionals, 8);
+      if (struct.isSetCollectionId()) {
+        oprot.writeString(struct.collectionId);
+      }
+      if (struct.isSetGatewayId()) {
+        oprot.writeString(struct.gatewayId);
+      }
+      if (struct.isSetUsername()) {
+        oprot.writeString(struct.username);
+      }
+      if (struct.isSetSharedUsers()) {
+        {
+          oprot.writeI32(struct.sharedUsers.size());
+          for (String _iter8 : struct.sharedUsers)
+          {
+            oprot.writeString(_iter8);
+          }
+        }
+      }
+      if (struct.isSetSharedPublic()) {
+        oprot.writeBool(struct.sharedPublic);
+      }
+      if (struct.isSetCollectionName()) {
+        oprot.writeString(struct.collectionName);
+      }
+      if (struct.isSetCollectionDescription()) {
+        oprot.writeString(struct.collectionDescription);
+      }
+      if (struct.isSetFileIdList()) {
+        {
+          oprot.writeI32(struct.fileIdList.size());
+          for (String _iter9 : struct.fileIdList)
+          {
+            oprot.writeString(_iter9);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, FileCollectionModel struct)
throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(8);
+      if (incoming.get(0)) {
+        struct.collectionId = iprot.readString();
+        struct.setCollectionIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.gatewayId = iprot.readString();
+        struct.setGatewayIdIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.username = iprot.readString();
+        struct.setUsernameIsSet(true);
+      }
+      if (incoming.get(3)) {
+        {
+          org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
+          struct.sharedUsers = new ArrayList<String>(_list10.size);
+          String _elem11;
+          for (int _i12 = 0; _i12 < _list10.size; ++_i12)
+          {
+            _elem11 = iprot.readString();
+            struct.sharedUsers.add(_elem11);
+          }
+        }
+        struct.setSharedUsersIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.sharedPublic = iprot.readBool();
+        struct.setSharedPublicIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.collectionName = iprot.readString();
+        struct.setCollectionNameIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.collectionDescription = iprot.readString();
+        struct.setCollectionDescriptionIsSet(true);
+      }
+      if (incoming.get(7)) {
+        {
+          org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
+          struct.fileIdList = new ArrayList<String>(_list13.size);
+          String _elem14;
+          for (int _i15 = 0; _i15 < _list13.size; ++_i15)
+          {
+            _elem14 = iprot.readString();
+            struct.fileIdList.add(_elem14);
+          }
+        }
+        struct.setFileIdListIsSet(true);
+      }
+    }
+  }
+
+}
+


Mime
View raw message