| /** |
| * 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.18.1) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.airavata.model.workspace; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) |
| @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)") |
| public class Project implements org.apache.thrift.TBase<Project, Project._Fields>, java.io.Serializable, Cloneable, Comparable<Project> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Project"); |
| |
| private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectID", org.apache.thrift.protocol.TType.STRING, (short)1); |
| private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)2); |
| 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)3); |
| 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)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 CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)6); |
| 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)7); |
| private static final org.apache.thrift.protocol.TField SHARED_GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedGroups", org.apache.thrift.protocol.TType.LIST, (short)8); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ProjectStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ProjectTupleSchemeFactory(); |
| |
| private @org.apache.thrift.annotation.Nullable java.lang.String projectID; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String owner; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String gatewayId; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String name; // required |
| private @org.apache.thrift.annotation.Nullable java.lang.String description; // optional |
| private long creationTime; // optional |
| private @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> sharedUsers; // optional |
| private @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> sharedGroups; // 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 { |
| PROJECT_ID((short)1, "projectID"), |
| OWNER((short)2, "owner"), |
| GATEWAY_ID((short)3, "gatewayId"), |
| NAME((short)4, "name"), |
| DESCRIPTION((short)5, "description"), |
| CREATION_TIME((short)6, "creationTime"), |
| SHARED_USERS((short)7, "sharedUsers"), |
| SHARED_GROUPS((short)8, "sharedGroups"); |
| |
| 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. |
| */ |
| @org.apache.thrift.annotation.Nullable |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // PROJECT_ID |
| return PROJECT_ID; |
| case 2: // OWNER |
| return OWNER; |
| case 3: // GATEWAY_ID |
| return GATEWAY_ID; |
| case 4: // NAME |
| return NAME; |
| case 5: // DESCRIPTION |
| return DESCRIPTION; |
| case 6: // CREATION_TIME |
| return CREATION_TIME; |
| case 7: // SHARED_USERS |
| return SHARED_USERS; |
| case 8: // SHARED_GROUPS |
| return SHARED_GROUPS; |
| 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. |
| */ |
| @org.apache.thrift.annotation.Nullable |
| 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; |
| } |
| |
| @Override |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| @Override |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| private static final int __CREATIONTIME_ISSET_ID = 0; |
| private byte __isset_bitfield = 0; |
| private static final _Fields optionals[] = {_Fields.DESCRIPTION,_Fields.CREATION_TIME,_Fields.SHARED_USERS,_Fields.SHARED_GROUPS}; |
| 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.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectID", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| 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.REQUIRED, |
| 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.REQUIRED, |
| 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.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); |
| 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_GROUPS, new org.apache.thrift.meta_data.FieldMetaData("sharedGroups", 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(Project.class, metaDataMap); |
| } |
| |
| public Project() { |
| this.projectID = "DO_NOT_SET_AT_CLIENTS"; |
| |
| } |
| |
| public Project( |
| java.lang.String projectID, |
| java.lang.String owner, |
| java.lang.String gatewayId, |
| java.lang.String name) |
| { |
| this(); |
| this.projectID = projectID; |
| this.owner = owner; |
| this.gatewayId = gatewayId; |
| this.name = name; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public Project(Project other) { |
| __isset_bitfield = other.__isset_bitfield; |
| if (other.isSetProjectID()) { |
| this.projectID = other.projectID; |
| } |
| if (other.isSetOwner()) { |
| this.owner = other.owner; |
| } |
| if (other.isSetGatewayId()) { |
| this.gatewayId = other.gatewayId; |
| } |
| if (other.isSetName()) { |
| this.name = other.name; |
| } |
| if (other.isSetDescription()) { |
| this.description = other.description; |
| } |
| this.creationTime = other.creationTime; |
| if (other.isSetSharedUsers()) { |
| java.util.List<java.lang.String> __this__sharedUsers = new java.util.ArrayList<java.lang.String>(other.sharedUsers); |
| this.sharedUsers = __this__sharedUsers; |
| } |
| if (other.isSetSharedGroups()) { |
| java.util.List<java.lang.String> __this__sharedGroups = new java.util.ArrayList<java.lang.String>(other.sharedGroups); |
| this.sharedGroups = __this__sharedGroups; |
| } |
| } |
| |
| @Override |
| public Project deepCopy() { |
| return new Project(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.projectID = "DO_NOT_SET_AT_CLIENTS"; |
| |
| this.owner = null; |
| this.gatewayId = null; |
| this.name = null; |
| this.description = null; |
| setCreationTimeIsSet(false); |
| this.creationTime = 0; |
| this.sharedUsers = null; |
| this.sharedGroups = null; |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getProjectID() { |
| return this.projectID; |
| } |
| |
| public void setProjectID(@org.apache.thrift.annotation.Nullable java.lang.String projectID) { |
| this.projectID = projectID; |
| } |
| |
| public void unsetProjectID() { |
| this.projectID = null; |
| } |
| |
| /** Returns true if field projectID is set (has been assigned a value) and false otherwise */ |
| public boolean isSetProjectID() { |
| return this.projectID != null; |
| } |
| |
| public void setProjectIDIsSet(boolean value) { |
| if (!value) { |
| this.projectID = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getOwner() { |
| return this.owner; |
| } |
| |
| public void setOwner(@org.apache.thrift.annotation.Nullable java.lang.String owner) { |
| this.owner = owner; |
| } |
| |
| public void unsetOwner() { |
| this.owner = null; |
| } |
| |
| /** Returns true if field owner is set (has been assigned a value) and false otherwise */ |
| public boolean isSetOwner() { |
| return this.owner != null; |
| } |
| |
| public void setOwnerIsSet(boolean value) { |
| if (!value) { |
| this.owner = null; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getGatewayId() { |
| return this.gatewayId; |
| } |
| |
| public void setGatewayId(@org.apache.thrift.annotation.Nullable java.lang.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; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getName() { |
| return this.name; |
| } |
| |
| public void setName(@org.apache.thrift.annotation.Nullable 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; |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.lang.String getDescription() { |
| return this.description; |
| } |
| |
| public void setDescription(@org.apache.thrift.annotation.Nullable 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 long getCreationTime() { |
| return this.creationTime; |
| } |
| |
| public void setCreationTime(long creationTime) { |
| this.creationTime = creationTime; |
| setCreationTimeIsSet(true); |
| } |
| |
| public void unsetCreationTime() { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID); |
| } |
| |
| /** Returns true if field creationTime is set (has been assigned a value) and false otherwise */ |
| public boolean isSetCreationTime() { |
| return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID); |
| } |
| |
| public void setCreationTimeIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value); |
| } |
| |
| public int getSharedUsersSize() { |
| return (this.sharedUsers == null) ? 0 : this.sharedUsers.size(); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.Iterator<java.lang.String> getSharedUsersIterator() { |
| return (this.sharedUsers == null) ? null : this.sharedUsers.iterator(); |
| } |
| |
| public void addToSharedUsers(java.lang.String elem) { |
| if (this.sharedUsers == null) { |
| this.sharedUsers = new java.util.ArrayList<java.lang.String>(); |
| } |
| this.sharedUsers.add(elem); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.List<java.lang.String> getSharedUsers() { |
| return this.sharedUsers; |
| } |
| |
| public void setSharedUsers(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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 int getSharedGroupsSize() { |
| return (this.sharedGroups == null) ? 0 : this.sharedGroups.size(); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.Iterator<java.lang.String> getSharedGroupsIterator() { |
| return (this.sharedGroups == null) ? null : this.sharedGroups.iterator(); |
| } |
| |
| public void addToSharedGroups(java.lang.String elem) { |
| if (this.sharedGroups == null) { |
| this.sharedGroups = new java.util.ArrayList<java.lang.String>(); |
| } |
| this.sharedGroups.add(elem); |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| public java.util.List<java.lang.String> getSharedGroups() { |
| return this.sharedGroups; |
| } |
| |
| public void setSharedGroups(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> sharedGroups) { |
| this.sharedGroups = sharedGroups; |
| } |
| |
| public void unsetSharedGroups() { |
| this.sharedGroups = null; |
| } |
| |
| /** Returns true if field sharedGroups is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSharedGroups() { |
| return this.sharedGroups != null; |
| } |
| |
| public void setSharedGroupsIsSet(boolean value) { |
| if (!value) { |
| this.sharedGroups = null; |
| } |
| } |
| |
| @Override |
| public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { |
| switch (field) { |
| case PROJECT_ID: |
| if (value == null) { |
| unsetProjectID(); |
| } else { |
| setProjectID((java.lang.String)value); |
| } |
| break; |
| |
| case OWNER: |
| if (value == null) { |
| unsetOwner(); |
| } else { |
| setOwner((java.lang.String)value); |
| } |
| break; |
| |
| case GATEWAY_ID: |
| if (value == null) { |
| unsetGatewayId(); |
| } else { |
| setGatewayId((java.lang.String)value); |
| } |
| break; |
| |
| case NAME: |
| if (value == null) { |
| unsetName(); |
| } else { |
| setName((java.lang.String)value); |
| } |
| break; |
| |
| case DESCRIPTION: |
| if (value == null) { |
| unsetDescription(); |
| } else { |
| setDescription((java.lang.String)value); |
| } |
| break; |
| |
| case CREATION_TIME: |
| if (value == null) { |
| unsetCreationTime(); |
| } else { |
| setCreationTime((java.lang.Long)value); |
| } |
| break; |
| |
| case SHARED_USERS: |
| if (value == null) { |
| unsetSharedUsers(); |
| } else { |
| setSharedUsers((java.util.List<java.lang.String>)value); |
| } |
| break; |
| |
| case SHARED_GROUPS: |
| if (value == null) { |
| unsetSharedGroups(); |
| } else { |
| setSharedGroups((java.util.List<java.lang.String>)value); |
| } |
| break; |
| |
| } |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| @Override |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case PROJECT_ID: |
| return getProjectID(); |
| |
| case OWNER: |
| return getOwner(); |
| |
| case GATEWAY_ID: |
| return getGatewayId(); |
| |
| case NAME: |
| return getName(); |
| |
| case DESCRIPTION: |
| return getDescription(); |
| |
| case CREATION_TIME: |
| return getCreationTime(); |
| |
| case SHARED_USERS: |
| return getSharedUsers(); |
| |
| case SHARED_GROUPS: |
| return getSharedGroups(); |
| |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| @Override |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case PROJECT_ID: |
| return isSetProjectID(); |
| case OWNER: |
| return isSetOwner(); |
| case GATEWAY_ID: |
| return isSetGatewayId(); |
| case NAME: |
| return isSetName(); |
| case DESCRIPTION: |
| return isSetDescription(); |
| case CREATION_TIME: |
| return isSetCreationTime(); |
| case SHARED_USERS: |
| return isSetSharedUsers(); |
| case SHARED_GROUPS: |
| return isSetSharedGroups(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that instanceof Project) |
| return this.equals((Project)that); |
| return false; |
| } |
| |
| public boolean equals(Project that) { |
| if (that == null) |
| return false; |
| if (this == that) |
| return true; |
| |
| boolean this_present_projectID = true && this.isSetProjectID(); |
| boolean that_present_projectID = true && that.isSetProjectID(); |
| if (this_present_projectID || that_present_projectID) { |
| if (!(this_present_projectID && that_present_projectID)) |
| return false; |
| if (!this.projectID.equals(that.projectID)) |
| return false; |
| } |
| |
| boolean this_present_owner = true && this.isSetOwner(); |
| boolean that_present_owner = true && that.isSetOwner(); |
| if (this_present_owner || that_present_owner) { |
| if (!(this_present_owner && that_present_owner)) |
| return false; |
| if (!this.owner.equals(that.owner)) |
| 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_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_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_creationTime = true && this.isSetCreationTime(); |
| boolean that_present_creationTime = true && that.isSetCreationTime(); |
| if (this_present_creationTime || that_present_creationTime) { |
| if (!(this_present_creationTime && that_present_creationTime)) |
| return false; |
| if (this.creationTime != that.creationTime) |
| 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_sharedGroups = true && this.isSetSharedGroups(); |
| boolean that_present_sharedGroups = true && that.isSetSharedGroups(); |
| if (this_present_sharedGroups || that_present_sharedGroups) { |
| if (!(this_present_sharedGroups && that_present_sharedGroups)) |
| return false; |
| if (!this.sharedGroups.equals(that.sharedGroups)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| int hashCode = 1; |
| |
| hashCode = hashCode * 8191 + ((isSetProjectID()) ? 131071 : 524287); |
| if (isSetProjectID()) |
| hashCode = hashCode * 8191 + projectID.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetOwner()) ? 131071 : 524287); |
| if (isSetOwner()) |
| hashCode = hashCode * 8191 + owner.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287); |
| if (isSetGatewayId()) |
| hashCode = hashCode * 8191 + gatewayId.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); |
| if (isSetName()) |
| hashCode = hashCode * 8191 + name.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287); |
| if (isSetDescription()) |
| hashCode = hashCode * 8191 + description.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287); |
| if (isSetCreationTime()) |
| hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime); |
| |
| hashCode = hashCode * 8191 + ((isSetSharedUsers()) ? 131071 : 524287); |
| if (isSetSharedUsers()) |
| hashCode = hashCode * 8191 + sharedUsers.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetSharedGroups()) ? 131071 : 524287); |
| if (isSetSharedGroups()) |
| hashCode = hashCode * 8191 + sharedGroups.hashCode(); |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(Project other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.compare(isSetProjectID(), other.isSetProjectID()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetProjectID()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetOwner(), other.isSetOwner()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetOwner()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetGatewayId(), 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 = java.lang.Boolean.compare(isSetName(), 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.compare(isSetDescription(), 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.compare(isSetCreationTime(), other.isSetCreationTime()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetCreationTime()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.compare(isSetSharedUsers(), 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 = java.lang.Boolean.compare(isSetSharedGroups(), other.isSetSharedGroups()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSharedGroups()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sharedGroups, other.sharedGroups); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| @org.apache.thrift.annotation.Nullable |
| @Override |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| @Override |
| 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("Project("); |
| boolean first = true; |
| |
| sb.append("projectID:"); |
| if (this.projectID == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.projectID); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("owner:"); |
| if (this.owner == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.owner); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("gatewayId:"); |
| if (this.gatewayId == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.gatewayId); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("name:"); |
| if (this.name == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.name); |
| } |
| 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 (isSetCreationTime()) { |
| if (!first) sb.append(", "); |
| sb.append("creationTime:"); |
| sb.append(this.creationTime); |
| 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 (isSetSharedGroups()) { |
| if (!first) sb.append(", "); |
| sb.append("sharedGroups:"); |
| if (this.sharedGroups == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.sharedGroups); |
| } |
| first = false; |
| } |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (!isSetProjectID()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetOwner()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'owner' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetGatewayId()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetName()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString()); |
| } |
| |
| // 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 { |
| // 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 ProjectStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public ProjectStandardScheme getScheme() { |
| return new ProjectStandardScheme(); |
| } |
| } |
| |
| private static class ProjectStandardScheme extends org.apache.thrift.scheme.StandardScheme<Project> { |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol iprot, Project 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: // PROJECT_ID |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.projectID = iprot.readString(); |
| struct.setProjectIDIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // OWNER |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.owner = iprot.readString(); |
| struct.setOwnerIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // 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 4: // 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 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: // CREATION_TIME |
| if (schemeField.type == org.apache.thrift.protocol.TType.I64) { |
| struct.creationTime = iprot.readI64(); |
| struct.setCreationTimeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 7: // SHARED_USERS |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); |
| struct.sharedUsers = new java.util.ArrayList<java.lang.String>(_list0.size); |
| @org.apache.thrift.annotation.Nullable java.lang.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 8: // SHARED_GROUPS |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); |
| struct.sharedGroups = new java.util.ArrayList<java.lang.String>(_list3.size); |
| @org.apache.thrift.annotation.Nullable java.lang.String _elem4; |
| for (int _i5 = 0; _i5 < _list3.size; ++_i5) |
| { |
| _elem4 = iprot.readString(); |
| struct.sharedGroups.add(_elem4); |
| } |
| iprot.readListEnd(); |
| } |
| struct.setSharedGroupsIsSet(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(); |
| } |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol oprot, Project struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.projectID != null) { |
| oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC); |
| oprot.writeString(struct.projectID); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.owner != null) { |
| oprot.writeFieldBegin(OWNER_FIELD_DESC); |
| oprot.writeString(struct.owner); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.gatewayId != null) { |
| oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); |
| oprot.writeString(struct.gatewayId); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.name != null) { |
| oprot.writeFieldBegin(NAME_FIELD_DESC); |
| oprot.writeString(struct.name); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.description != null) { |
| if (struct.isSetDescription()) { |
| oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); |
| oprot.writeString(struct.description); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.isSetCreationTime()) { |
| oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC); |
| oprot.writeI64(struct.creationTime); |
| 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 (java.lang.String _iter6 : struct.sharedUsers) |
| { |
| oprot.writeString(_iter6); |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.sharedGroups != null) { |
| if (struct.isSetSharedGroups()) { |
| oprot.writeFieldBegin(SHARED_GROUPS_FIELD_DESC); |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sharedGroups.size())); |
| for (java.lang.String _iter7 : struct.sharedGroups) |
| { |
| oprot.writeString(_iter7); |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class ProjectTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| @Override |
| public ProjectTupleScheme getScheme() { |
| return new ProjectTupleScheme(); |
| } |
| } |
| |
| private static class ProjectTupleScheme extends org.apache.thrift.scheme.TupleScheme<Project> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| oprot.writeString(struct.projectID); |
| oprot.writeString(struct.owner); |
| oprot.writeString(struct.gatewayId); |
| oprot.writeString(struct.name); |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetDescription()) { |
| optionals.set(0); |
| } |
| if (struct.isSetCreationTime()) { |
| optionals.set(1); |
| } |
| if (struct.isSetSharedUsers()) { |
| optionals.set(2); |
| } |
| if (struct.isSetSharedGroups()) { |
| optionals.set(3); |
| } |
| oprot.writeBitSet(optionals, 4); |
| if (struct.isSetDescription()) { |
| oprot.writeString(struct.description); |
| } |
| if (struct.isSetCreationTime()) { |
| oprot.writeI64(struct.creationTime); |
| } |
| if (struct.isSetSharedUsers()) { |
| { |
| oprot.writeI32(struct.sharedUsers.size()); |
| for (java.lang.String _iter8 : struct.sharedUsers) |
| { |
| oprot.writeString(_iter8); |
| } |
| } |
| } |
| if (struct.isSetSharedGroups()) { |
| { |
| oprot.writeI32(struct.sharedGroups.size()); |
| for (java.lang.String _iter9 : struct.sharedGroups) |
| { |
| oprot.writeString(_iter9); |
| } |
| } |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, Project struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| struct.projectID = iprot.readString(); |
| struct.setProjectIDIsSet(true); |
| struct.owner = iprot.readString(); |
| struct.setOwnerIsSet(true); |
| struct.gatewayId = iprot.readString(); |
| struct.setGatewayIdIsSet(true); |
| struct.name = iprot.readString(); |
| struct.setNameIsSet(true); |
| java.util.BitSet incoming = iprot.readBitSet(4); |
| if (incoming.get(0)) { |
| struct.description = iprot.readString(); |
| struct.setDescriptionIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.creationTime = iprot.readI64(); |
| struct.setCreationTimeIsSet(true); |
| } |
| if (incoming.get(2)) { |
| { |
| org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); |
| struct.sharedUsers = new java.util.ArrayList<java.lang.String>(_list10.size); |
| @org.apache.thrift.annotation.Nullable java.lang.String _elem11; |
| for (int _i12 = 0; _i12 < _list10.size; ++_i12) |
| { |
| _elem11 = iprot.readString(); |
| struct.sharedUsers.add(_elem11); |
| } |
| } |
| struct.setSharedUsersIsSet(true); |
| } |
| if (incoming.get(3)) { |
| { |
| org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); |
| struct.sharedGroups = new java.util.ArrayList<java.lang.String>(_list13.size); |
| @org.apache.thrift.annotation.Nullable java.lang.String _elem14; |
| for (int _i15 = 0; _i15 < _list13.size; ++_i15) |
| { |
| _elem14 = iprot.readString(); |
| struct.sharedGroups.add(_elem14); |
| } |
| } |
| struct.setSharedGroupsIsSet(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(); |
| } |
| } |
| |