org.apache.airavata.model.workspace.Project Maven / Gradle / Ivy
/**
* 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.workspace;
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-07-13")
public class Project implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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 NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", 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 CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)5);
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)6);
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)7);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new ProjectStandardSchemeFactory());
schemes.put(TupleScheme.class, new ProjectTupleSchemeFactory());
}
private String projectID; // required
private String owner; // required
private String name; // required
private String description; // optional
private long creationTime; // optional
private List sharedUsers; // optional
private List 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"),
NAME((short)3, "name"),
DESCRIPTION((short)4, "description"),
CREATION_TIME((short)5, "creationTime"),
SHARED_USERS((short)6, "sharedUsers"),
SHARED_GROUPS((short)7, "sharedGroups");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PROJECT_ID
return PROJECT_ID;
case 2: // OWNER
return OWNER;
case 3: // NAME
return NAME;
case 4: // DESCRIPTION
return DESCRIPTION;
case 5: // CREATION_TIME
return CREATION_TIME;
case 6: // SHARED_USERS
return SHARED_USERS;
case 7: // 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 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 __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 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.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.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 = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Project.class, metaDataMap);
}
public Project() {
this.projectID = "DO_NOT_SET_AT_CLIENTS";
}
public Project(
String projectID,
String owner,
String name)
{
this();
this.projectID = projectID;
this.owner = owner;
this.name = name;
}
/**
* Performs a deep copy on other.
*/
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.isSetName()) {
this.name = other.name;
}
if (other.isSetDescription()) {
this.description = other.description;
}
this.creationTime = other.creationTime;
if (other.isSetSharedUsers()) {
List __this__sharedUsers = new ArrayList(other.sharedUsers);
this.sharedUsers = __this__sharedUsers;
}
if (other.isSetSharedGroups()) {
List __this__sharedGroups = new ArrayList(other.sharedGroups);
this.sharedGroups = __this__sharedGroups;
}
}
public Project deepCopy() {
return new Project(this);
}
@Override
public void clear() {
this.projectID = "DO_NOT_SET_AT_CLIENTS";
this.owner = null;
this.name = null;
this.description = null;
setCreationTimeIsSet(false);
this.creationTime = 0;
this.sharedUsers = null;
this.sharedGroups = null;
}
public String getProjectID() {
return this.projectID;
}
public void setProjectID(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;
}
}
public String getOwner() {
return this.owner;
}
public void setOwner(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;
}
}
public String getName() {
return this.name;
}
public void setName(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 String getDescription() {
return this.description;
}
public void setDescription(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 = 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 EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
}
public void setCreationTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
}
public int getSharedUsersSize() {
return (this.sharedUsers == null) ? 0 : this.sharedUsers.size();
}
public java.util.Iterator getSharedUsersIterator() {
return (this.sharedUsers == null) ? null : this.sharedUsers.iterator();
}
public void addToSharedUsers(String elem) {
if (this.sharedUsers == null) {
this.sharedUsers = new ArrayList();
}
this.sharedUsers.add(elem);
}
public List getSharedUsers() {
return this.sharedUsers;
}
public void setSharedUsers(List 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();
}
public java.util.Iterator getSharedGroupsIterator() {
return (this.sharedGroups == null) ? null : this.sharedGroups.iterator();
}
public void addToSharedGroups(String elem) {
if (this.sharedGroups == null) {
this.sharedGroups = new ArrayList();
}
this.sharedGroups.add(elem);
}
public List getSharedGroups() {
return this.sharedGroups;
}
public void setSharedGroups(List 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;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PROJECT_ID:
if (value == null) {
unsetProjectID();
} else {
setProjectID((String)value);
}
break;
case OWNER:
if (value == null) {
unsetOwner();
} else {
setOwner((String)value);
}
break;
case NAME:
if (value == null) {
unsetName();
} else {
setName((String)value);
}
break;
case DESCRIPTION:
if (value == null) {
unsetDescription();
} else {
setDescription((String)value);
}
break;
case CREATION_TIME:
if (value == null) {
unsetCreationTime();
} else {
setCreationTime((Long)value);
}
break;
case SHARED_USERS:
if (value == null) {
unsetSharedUsers();
} else {
setSharedUsers((List)value);
}
break;
case SHARED_GROUPS:
if (value == null) {
unsetSharedGroups();
} else {
setSharedGroups((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PROJECT_ID:
return getProjectID();
case OWNER:
return getOwner();
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 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 PROJECT_ID:
return isSetProjectID();
case OWNER:
return isSetOwner();
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 IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof Project)
return this.equals((Project)that);
return false;
}
public boolean equals(Project that) {
if (that == null)
return false;
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_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() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy