| /** |
| * 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.10.0) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.airavata.model.group; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) |
| @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") |
| public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupModel._Fields>, java.io.Serializable, Cloneable, Comparable<GroupModel> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupModel"); |
| |
| private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); |
| private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); |
| 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)3); |
| 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)4); |
| private static final org.apache.thrift.protocol.TField MEMBERS_FIELD_DESC = new org.apache.thrift.protocol.TField("members", org.apache.thrift.protocol.TType.LIST, (short)5); |
| private static final org.apache.thrift.protocol.TField ADMINS_FIELD_DESC = new org.apache.thrift.protocol.TField("admins", org.apache.thrift.protocol.TType.LIST, (short)6); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GroupModelStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GroupModelTupleSchemeFactory(); |
| |
| private java.lang.String id; // optional |
| private java.lang.String name; // optional |
| private java.lang.String ownerId; // optional |
| private java.lang.String description; // optional |
| private java.util.List<java.lang.String> members; // optional |
| private java.util.List<java.lang.String> admins; // 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 { |
| ID((short)1, "id"), |
| NAME((short)2, "name"), |
| OWNER_ID((short)3, "ownerId"), |
| DESCRIPTION((short)4, "description"), |
| MEMBERS((short)5, "members"), |
| /** |
| * Note: each admin must also be a member of the group. |
| */ |
| ADMINS((short)6, "admins"); |
| |
| private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); |
| |
| static { |
| for (_Fields field : java.util.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: // ID |
| return ID; |
| case 2: // NAME |
| return NAME; |
| case 3: // OWNER_ID |
| return OWNER_ID; |
| case 4: // DESCRIPTION |
| return DESCRIPTION; |
| case 5: // MEMBERS |
| return MEMBERS; |
| case 6: // ADMINS |
| return ADMINS; |
| 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 java.lang.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(java.lang.String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final java.lang.String _fieldName; |
| |
| _Fields(short thriftId, java.lang.String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| private static final _Fields optionals[] = {_Fields.ID,_Fields.NAME,_Fields.OWNER_ID,_Fields.DESCRIPTION,_Fields.MEMBERS,_Fields.ADMINS}; |
| public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| 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))); |
| tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.MEMBERS, new org.apache.thrift.meta_data.FieldMetaData("members", 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.ADMINS, new org.apache.thrift.meta_data.FieldMetaData("admins", 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 = java.util.Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GroupModel.class, metaDataMap); |
| } |
| |
| public GroupModel() { |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public GroupModel(GroupModel other) { |
| if (other.isSetId()) { |
| this.id = other.id; |
| } |
| if (other.isSetName()) { |
| this.name = other.name; |
| } |
| if (other.isSetOwnerId()) { |
| this.ownerId = other.ownerId; |
| } |
| if (other.isSetDescription()) { |
| this.description = other.description; |
| } |
| if (other.isSetMembers()) { |
| java.util.List<java.lang.String> __this__members = new java.util.ArrayList<java.lang.String>(other.members); |
| this.members = __this__members; |
| } |
| if (other.isSetAdmins()) { |
| java.util.List<java.lang.String> __this__admins = new java.util.ArrayList<java.lang.String>(other.admins); |
| this.admins = __this__admins; |
| } |
| } |
| |
| public GroupModel deepCopy() { |
| return new GroupModel(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.id = null; |
| this.name = null; |
| this.ownerId = null; |
| this.description = null; |
| this.members = null; |
| this.admins = null; |
| } |
| |
| public java.lang.String getId() { |
| return this.id; |
| } |
| |
| public void setId(java.lang.String id) { |
| this.id = id; |
| } |
| |
| public void unsetId() { |
| this.id = null; |
| } |
| |
| /** Returns true if field id is set (has been assigned a value) and false otherwise */ |
| public boolean isSetId() { |
| return this.id != null; |
| } |
| |
| public void setIdIsSet(boolean value) { |
| if (!value) { |
| this.id = null; |
| } |
| } |
| |
| public java.lang.String getName() { |
| return this.name; |
| } |
| |
| public void setName(java.lang.String name) { |
| this.name = name; |
| } |
| |
| public void unsetName() { |
| this.name = null; |
| } |
| |
| /** Returns true if field name is set (has been assigned a value) and false otherwise */ |
| public boolean isSetName() { |
| return this.name != null; |
| } |
| |
| public void setNameIsSet(boolean value) { |
| if (!value) { |
| this.name = null; |
| } |
| } |
| |
| public java.lang.String getOwnerId() { |
| return this.ownerId; |
| } |
| |
| public void setOwnerId(java.lang.String ownerId) { |
| this.ownerId = ownerId; |
| } |
| |
| 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 java.lang.String getDescription() { |
| return this.description; |
| } |
| |
| public void setDescription(java.lang.String description) { |
| this.description = description; |
| } |
| |
| 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 getMembersSize() { |
| return (this.members == null) ? 0 : this.members.size(); |
| } |
| |
| public java.util.Iterator<java.lang.String> getMembersIterator() { |
| return (this.members == null) ? null : this.members.iterator(); |
| } |
| |
| public void addToMembers(java.lang.String elem) { |
| if (this.members == null) { |
| this.members = new java.util.ArrayList<java.lang.String>(); |
| } |
| this.members.add(elem); |
| } |
| |
| public java.util.List<java.lang.String> getMembers() { |
| return this.members; |
| } |
| |
| public void setMembers(java.util.List<java.lang.String> members) { |
| this.members = members; |
| } |
| |
| public void unsetMembers() { |
| this.members = null; |
| } |
| |
| /** Returns true if field members is set (has been assigned a value) and false otherwise */ |
| public boolean isSetMembers() { |
| return this.members != null; |
| } |
| |
| public void setMembersIsSet(boolean value) { |
| if (!value) { |
| this.members = null; |
| } |
| } |
| |
| public int getAdminsSize() { |
| return (this.admins == null) ? 0 : this.admins.size(); |
| } |
| |
| public java.util.Iterator<java.lang.String> getAdminsIterator() { |
| return (this.admins == null) ? null : this.admins.iterator(); |
| } |
| |
| public void addToAdmins(java.lang.String elem) { |
| if (this.admins == null) { |
| this.admins = new java.util.ArrayList<java.lang.String>(); |
| } |
| this.admins.add(elem); |
| } |
| |
| /** |
| * Note: each admin must also be a member of the group. |
| */ |
| public java.util.List<java.lang.String> getAdmins() { |
| return this.admins; |
| } |
| |
| /** |
| * Note: each admin must also be a member of the group. |
| */ |
| public void setAdmins(java.util.List<java.lang.String> admins) { |
| this.admins = admins; |
| } |
| |
| public void unsetAdmins() { |
| this.admins = null; |
| } |
| |
| /** Returns true if field admins is set (has been assigned a value) and false otherwise */ |
| public boolean isSetAdmins() { |
| return this.admins != null; |
| } |
| |
| public void setAdminsIsSet(boolean value) { |
| if (!value) { |
| this.admins = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, java.lang.Object value) { |
| switch (field) { |
| case ID: |
| if (value == null) { |
| unsetId(); |
| } else { |
| setId((java.lang.String)value); |
| } |
| break; |
| |
| case NAME: |
| if (value == null) { |
| unsetName(); |
| } else { |
| setName((java.lang.String)value); |
| } |
| break; |
| |
| case OWNER_ID: |
| if (value == null) { |
| unsetOwnerId(); |
| } else { |
| setOwnerId((java.lang.String)value); |
| } |
| break; |
| |
| case DESCRIPTION: |
| if (value == null) { |
| unsetDescription(); |
| } else { |
| setDescription((java.lang.String)value); |
| } |
| break; |
| |
| case MEMBERS: |
| if (value == null) { |
| unsetMembers(); |
| } else { |
| setMembers((java.util.List<java.lang.String>)value); |
| } |
| break; |
| |
| case ADMINS: |
| if (value == null) { |
| unsetAdmins(); |
| } else { |
| setAdmins((java.util.List<java.lang.String>)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case ID: |
| return getId(); |
| |
| case NAME: |
| return getName(); |
| |
| case OWNER_ID: |
| return getOwnerId(); |
| |
| case DESCRIPTION: |
| return getDescription(); |
| |
| case MEMBERS: |
| return getMembers(); |
| |
| case ADMINS: |
| return getAdmins(); |
| |
| } |
| throw new java.lang.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 java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case ID: |
| return isSetId(); |
| case NAME: |
| return isSetName(); |
| case OWNER_ID: |
| return isSetOwnerId(); |
| case DESCRIPTION: |
| return isSetDescription(); |
| case MEMBERS: |
| return isSetMembers(); |
| case ADMINS: |
| return isSetAdmins(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof GroupModel) |
| return this.equals((GroupModel)that); |
| return false; |
| } |
| |
| public boolean equals(GroupModel that) { |
| if (that == null) |
| return false; |
| if (this == that) |
| return true; |
| |
| boolean this_present_id = true && this.isSetId(); |
| boolean that_present_id = true && that.isSetId(); |
| if (this_present_id || that_present_id) { |
| if (!(this_present_id && that_present_id)) |
| return false; |
| if (!this.id.equals(that.id)) |
| return false; |
| } |
| |
| boolean this_present_name = true && this.isSetName(); |
| boolean that_present_name = true && that.isSetName(); |
| if (this_present_name || that_present_name) { |
| if (!(this_present_name && that_present_name)) |
| return false; |
| if (!this.name.equals(that.name)) |
| 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_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_members = true && this.isSetMembers(); |
| boolean that_present_members = true && that.isSetMembers(); |
| if (this_present_members || that_present_members) { |
| if (!(this_present_members && that_present_members)) |
| return false; |
| if (!this.members.equals(that.members)) |
| return false; |
| } |
| |
| boolean this_present_admins = true && this.isSetAdmins(); |
| boolean that_present_admins = true && that.isSetAdmins(); |
| if (this_present_admins || that_present_admins) { |
| if (!(this_present_admins && that_present_admins)) |
| return false; |
| if (!this.admins.equals(that.admins)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| int hashCode = 1; |
| |
| hashCode = hashCode * 8191 + ((isSetId()) ? 131071 : 524287); |
| if (isSetId()) |
| hashCode = hashCode * 8191 + id.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); |
| if (isSetName()) |
| hashCode = hashCode * 8191 + name.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetOwnerId()) ? 131071 : 524287); |
| if (isSetOwnerId()) |
| hashCode = hashCode * 8191 + ownerId.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287); |
| if (isSetDescription()) |
| hashCode = hashCode * 8191 + description.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetMembers()) ? 131071 : 524287); |
| if (isSetMembers()) |
| hashCode = hashCode * 8191 + members.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetAdmins()) ? 131071 : 524287); |
| if (isSetAdmins()) |
| hashCode = hashCode * 8191 + admins.hashCode(); |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(GroupModel other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(other.isSetId()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetId()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.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 = java.lang.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 = java.lang.Boolean.valueOf(isSetMembers()).compareTo(other.isSetMembers()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetMembers()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.members, other.members); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetAdmins()).compareTo(other.isSetAdmins()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetAdmins()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.admins, other.admins); |
| 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 { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| scheme(oprot).write(oprot, this); |
| } |
| |
| @Override |
| public java.lang.String toString() { |
| java.lang.StringBuilder sb = new java.lang.StringBuilder("GroupModel("); |
| boolean first = true; |
| |
| if (isSetId()) { |
| sb.append("id:"); |
| if (this.id == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.id); |
| } |
| first = false; |
| } |
| if (isSetName()) { |
| if (!first) sb.append(", "); |
| sb.append("name:"); |
| if (this.name == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.name); |
| } |
| 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; |
| } |
| if (isSetDescription()) { |
| if (!first) sb.append(", "); |
| sb.append("description:"); |
| if (this.description == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.description); |
| } |
| first = false; |
| } |
| if (isSetMembers()) { |
| if (!first) sb.append(", "); |
| sb.append("members:"); |
| if (this.members == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.members); |
| } |
| first = false; |
| } |
| if (isSetAdmins()) { |
| if (!first) sb.append(", "); |
| sb.append("admins:"); |
| if (this.admins == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.admins); |
| } |
| 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, java.lang.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 GroupModelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public GroupModelStandardScheme getScheme() { |
| return new GroupModelStandardScheme(); |
| } |
| } |
| |
| private static class GroupModelStandardScheme extends org.apache.thrift.scheme.StandardScheme<GroupModel> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, GroupModel 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: // ID |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.id = iprot.readString(); |
| struct.setIdIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.name = iprot.readString(); |
| struct.setNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // 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 4: // 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 5: // MEMBERS |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); |
| struct.members = new java.util.ArrayList<java.lang.String>(_list0.size); |
| java.lang.String _elem1; |
| for (int _i2 = 0; _i2 < _list0.size; ++_i2) |
| { |
| _elem1 = iprot.readString(); |
| struct.members.add(_elem1); |
| } |
| iprot.readListEnd(); |
| } |
| struct.setMembersIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 6: // ADMINS |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); |
| struct.admins = new java.util.ArrayList<java.lang.String>(_list3.size); |
| java.lang.String _elem4; |
| for (int _i5 = 0; _i5 < _list3.size; ++_i5) |
| { |
| _elem4 = iprot.readString(); |
| struct.admins.add(_elem4); |
| } |
| iprot.readListEnd(); |
| } |
| struct.setAdminsIsSet(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, GroupModel struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.id != null) { |
| if (struct.isSetId()) { |
| oprot.writeFieldBegin(ID_FIELD_DESC); |
| oprot.writeString(struct.id); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.name != null) { |
| if (struct.isSetName()) { |
| oprot.writeFieldBegin(NAME_FIELD_DESC); |
| oprot.writeString(struct.name); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.ownerId != null) { |
| if (struct.isSetOwnerId()) { |
| oprot.writeFieldBegin(OWNER_ID_FIELD_DESC); |
| oprot.writeString(struct.ownerId); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.description != null) { |
| if (struct.isSetDescription()) { |
| oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); |
| oprot.writeString(struct.description); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.members != null) { |
| if (struct.isSetMembers()) { |
| oprot.writeFieldBegin(MEMBERS_FIELD_DESC); |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.members.size())); |
| for (java.lang.String _iter6 : struct.members) |
| { |
| oprot.writeString(_iter6); |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.admins != null) { |
| if (struct.isSetAdmins()) { |
| oprot.writeFieldBegin(ADMINS_FIELD_DESC); |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.admins.size())); |
| for (java.lang.String _iter7 : struct.admins) |
| { |
| oprot.writeString(_iter7); |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class GroupModelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public GroupModelTupleScheme getScheme() { |
| return new GroupModelTupleScheme(); |
| } |
| } |
| |
| private static class GroupModelTupleScheme extends org.apache.thrift.scheme.TupleScheme<GroupModel> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, GroupModel struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetId()) { |
| optionals.set(0); |
| } |
| if (struct.isSetName()) { |
| optionals.set(1); |
| } |
| if (struct.isSetOwnerId()) { |
| optionals.set(2); |
| } |
| if (struct.isSetDescription()) { |
| optionals.set(3); |
| } |
| if (struct.isSetMembers()) { |
| optionals.set(4); |
| } |
| if (struct.isSetAdmins()) { |
| optionals.set(5); |
| } |
| oprot.writeBitSet(optionals, 6); |
| if (struct.isSetId()) { |
| oprot.writeString(struct.id); |
| } |
| if (struct.isSetName()) { |
| oprot.writeString(struct.name); |
| } |
| if (struct.isSetOwnerId()) { |
| oprot.writeString(struct.ownerId); |
| } |
| if (struct.isSetDescription()) { |
| oprot.writeString(struct.description); |
| } |
| if (struct.isSetMembers()) { |
| { |
| oprot.writeI32(struct.members.size()); |
| for (java.lang.String _iter8 : struct.members) |
| { |
| oprot.writeString(_iter8); |
| } |
| } |
| } |
| if (struct.isSetAdmins()) { |
| { |
| oprot.writeI32(struct.admins.size()); |
| for (java.lang.String _iter9 : struct.admins) |
| { |
| oprot.writeString(_iter9); |
| } |
| } |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, GroupModel struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| java.util.BitSet incoming = iprot.readBitSet(6); |
| if (incoming.get(0)) { |
| struct.id = iprot.readString(); |
| struct.setIdIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.name = iprot.readString(); |
| struct.setNameIsSet(true); |
| } |
| if (incoming.get(2)) { |
| struct.ownerId = iprot.readString(); |
| struct.setOwnerIdIsSet(true); |
| } |
| if (incoming.get(3)) { |
| struct.description = iprot.readString(); |
| struct.setDescriptionIsSet(true); |
| } |
| if (incoming.get(4)) { |
| { |
| org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); |
| struct.members = new java.util.ArrayList<java.lang.String>(_list10.size); |
| java.lang.String _elem11; |
| for (int _i12 = 0; _i12 < _list10.size; ++_i12) |
| { |
| _elem11 = iprot.readString(); |
| struct.members.add(_elem11); |
| } |
| } |
| struct.setMembersIsSet(true); |
| } |
| if (incoming.get(5)) { |
| { |
| org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); |
| struct.admins = new java.util.ArrayList<java.lang.String>(_list13.size); |
| java.lang.String _elem14; |
| for (int _i15 = 0; _i15 < _list13.size; ++_i15) |
| { |
| _elem14 = iprot.readString(); |
| struct.admins.add(_elem14); |
| } |
| } |
| struct.setAdminsIsSet(true); |
| } |
| } |
| } |
| |
| private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { |
| return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); |
| } |
| } |
| |