org.apache.airavata.model.user.UserProfile 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.user;
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"})
/**
* * A structure holding the user profile and its child models.
* *
* * Notes:
* * The model does not include passwords as it is assumed an external identity provider is used to authenticate user.
* * References:
* * NSF Demographic Information - http://www.nsf.gov/pubs/2000/00form1225/00form1225.doc
* * LDAP Schema - https://tools.ietf.org/html/rfc4519
* * SCIM 2.0 - https://tools.ietf.org/html/rfc7643
* *
* * userModelVersion:
* * Version number of profile
* *
* * airavataInternalUserId:
* * internal to Airavata, not intended to be used outside of the Airavata platform or possibly by gateways
* * (that is, never shown to users), never reassigned, REQUIRED
* *
* * userId:
* * Externally assertable unique identifier. SAML (primarly in higher education, academic) tends to keep
* * user name less opaque. OpenID Connect maintains them to be opaque.
* *
* * emails:
* * Email identifier are Verified, REQUIRED and MULTIVALUED
* *
* * userName:
* * Name-based identifiers can be multivalues. To keep it simple, Airavata will make it a string.
* * In the future these can be enumerated as:
* * Official name (as asserted possibly by some external identity provider)
* * Prefered name (as asserted or suggested by user directly)
* * Components:
* * givenName
* * surname (familyName)
* * displayName (often asserted by user to handle things like middle names, suffix, prefix, and the like)
* *
* * orcidId: ORCID ID - http://orcid.org/about/what-is-orcid)
* *
* * phones: Telephone MULTIVALUED
* *
* * country: Country of Residance
* *
* * nationality Countries of citizenship
* *
* * comments:
* * Free-form information (treated as opaque by Airavata and simply passed to resource).
* *
* * labeledURI:
* * Google Scholar, Web of Science, ACS, e.t.c
* *
* * timeZone:
* * User’s preferred timezone - IANA Timezone Databases - http://www.iana.org/time-zones.
* *
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-07-13")
public class UserProfile 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("UserProfile");
private static final org.apache.thrift.protocol.TField USER_MODEL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("userModelVersion", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField AIRAVATA_INTERNAL_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataInternalUserId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField EMAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("emails", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField ORCID_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orcidId", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField PHONES_FIELD_DESC = new org.apache.thrift.protocol.TField("phones", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.protocol.TField COUNTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("country", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField NATIONALITY_FIELD_DESC = new org.apache.thrift.protocol.TField("nationality", org.apache.thrift.protocol.TType.LIST, (short)9);
private static final org.apache.thrift.protocol.TField HOME_ORGANIZATION_FIELD_DESC = new org.apache.thrift.protocol.TField("homeOrganization", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField ORGINATION_AFFILIATION_FIELD_DESC = new org.apache.thrift.protocol.TField("orginationAffiliation", org.apache.thrift.protocol.TType.STRING, (short)11);
private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.STRING, (short)12);
private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.STRING, (short)13);
private static final org.apache.thrift.protocol.TField VALID_UNTIL_FIELD_DESC = new org.apache.thrift.protocol.TField("validUntil", org.apache.thrift.protocol.TType.STRING, (short)14);
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("State", org.apache.thrift.protocol.TType.I32, (short)15);
private static final org.apache.thrift.protocol.TField COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("comments", org.apache.thrift.protocol.TType.STRING, (short)16);
private static final org.apache.thrift.protocol.TField LABELED_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("labeledURI", org.apache.thrift.protocol.TType.LIST, (short)17);
private static final org.apache.thrift.protocol.TField GPG_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("gpgKey", org.apache.thrift.protocol.TType.STRING, (short)18);
private static final org.apache.thrift.protocol.TField TIME_ZONE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeZone", org.apache.thrift.protocol.TType.STRING, (short)19);
private static final org.apache.thrift.protocol.TField NSF_DEMOGRAPHICS_FIELD_DESC = new org.apache.thrift.protocol.TField("nsfDemographics", org.apache.thrift.protocol.TType.STRUCT, (short)20);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new UserProfileStandardSchemeFactory());
schemes.put(TupleScheme.class, new UserProfileTupleSchemeFactory());
}
private String userModelVersion; // required
private String airavataInternalUserId; // required
private String userId; // required
private List emails; // required
private String userName; // optional
private String orcidId; // optional
private List phones; // optional
private String country; // optional
private List nationality; // optional
private String homeOrganization; // optional
private String orginationAffiliation; // optional
private String creationTime; // required
private String lastAccessTime; // required
private String validUntil; // required
private Status State; // required
private String comments; // optional
private List labeledURI; // optional
private String gpgKey; // optional
private String timeZone; // optional
private NSFDemographics nsfDemographics; // 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 {
USER_MODEL_VERSION((short)1, "userModelVersion"),
AIRAVATA_INTERNAL_USER_ID((short)2, "airavataInternalUserId"),
USER_ID((short)3, "userId"),
EMAILS((short)4, "emails"),
USER_NAME((short)5, "userName"),
ORCID_ID((short)6, "orcidId"),
PHONES((short)7, "phones"),
COUNTRY((short)8, "country"),
NATIONALITY((short)9, "nationality"),
HOME_ORGANIZATION((short)10, "homeOrganization"),
ORGINATION_AFFILIATION((short)11, "orginationAffiliation"),
CREATION_TIME((short)12, "creationTime"),
LAST_ACCESS_TIME((short)13, "lastAccessTime"),
VALID_UNTIL((short)14, "validUntil"),
/**
*
* @see Status
*/
STATE((short)15, "State"),
COMMENTS((short)16, "comments"),
LABELED_URI((short)17, "labeledURI"),
GPG_KEY((short)18, "gpgKey"),
TIME_ZONE((short)19, "timeZone"),
NSF_DEMOGRAPHICS((short)20, "nsfDemographics");
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: // USER_MODEL_VERSION
return USER_MODEL_VERSION;
case 2: // AIRAVATA_INTERNAL_USER_ID
return AIRAVATA_INTERNAL_USER_ID;
case 3: // USER_ID
return USER_ID;
case 4: // EMAILS
return EMAILS;
case 5: // USER_NAME
return USER_NAME;
case 6: // ORCID_ID
return ORCID_ID;
case 7: // PHONES
return PHONES;
case 8: // COUNTRY
return COUNTRY;
case 9: // NATIONALITY
return NATIONALITY;
case 10: // HOME_ORGANIZATION
return HOME_ORGANIZATION;
case 11: // ORGINATION_AFFILIATION
return ORGINATION_AFFILIATION;
case 12: // CREATION_TIME
return CREATION_TIME;
case 13: // LAST_ACCESS_TIME
return LAST_ACCESS_TIME;
case 14: // VALID_UNTIL
return VALID_UNTIL;
case 15: // STATE
return STATE;
case 16: // COMMENTS
return COMMENTS;
case 17: // LABELED_URI
return LABELED_URI;
case 18: // GPG_KEY
return GPG_KEY;
case 19: // TIME_ZONE
return TIME_ZONE;
case 20: // NSF_DEMOGRAPHICS
return NSF_DEMOGRAPHICS;
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 _Fields optionals[] = {_Fields.USER_NAME,_Fields.ORCID_ID,_Fields.PHONES,_Fields.COUNTRY,_Fields.NATIONALITY,_Fields.HOME_ORGANIZATION,_Fields.ORGINATION_AFFILIATION,_Fields.COMMENTS,_Fields.LABELED_URI,_Fields.GPG_KEY,_Fields.TIME_ZONE,_Fields.NSF_DEMOGRAPHICS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.USER_MODEL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("userModelVersion", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.AIRAVATA_INTERNAL_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataInternalUserId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EMAILS, new org.apache.thrift.meta_data.FieldMetaData("emails", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.USER_NAME, 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.ORCID_ID, new org.apache.thrift.meta_data.FieldMetaData("orcidId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PHONES, new org.apache.thrift.meta_data.FieldMetaData("phones", 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.COUNTRY, new org.apache.thrift.meta_data.FieldMetaData("country", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NATIONALITY, new org.apache.thrift.meta_data.FieldMetaData("nationality", 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.HOME_ORGANIZATION, new org.apache.thrift.meta_data.FieldMetaData("homeOrganization", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ORGINATION_AFFILIATION, new org.apache.thrift.meta_data.FieldMetaData("orginationAffiliation", 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.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LAST_ACCESS_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastAccessTime", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.VALID_UNTIL, new org.apache.thrift.meta_data.FieldMetaData("validUntil", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("State", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Status.class)));
tmpMap.put(_Fields.COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("comments", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LABELED_URI, new org.apache.thrift.meta_data.FieldMetaData("labeledURI", 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.GPG_KEY, new org.apache.thrift.meta_data.FieldMetaData("gpgKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TIME_ZONE, new org.apache.thrift.meta_data.FieldMetaData("timeZone", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NSF_DEMOGRAPHICS, new org.apache.thrift.meta_data.FieldMetaData("nsfDemographics", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NSFDemographics.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserProfile.class, metaDataMap);
}
public UserProfile() {
this.userModelVersion = "1.0";
this.airavataInternalUserId = "DO_NOT_SET_AT_CLIENTS";
}
public UserProfile(
String userModelVersion,
String airavataInternalUserId,
String userId,
List emails,
String creationTime,
String lastAccessTime,
String validUntil,
Status State)
{
this();
this.userModelVersion = userModelVersion;
this.airavataInternalUserId = airavataInternalUserId;
this.userId = userId;
this.emails = emails;
this.creationTime = creationTime;
this.lastAccessTime = lastAccessTime;
this.validUntil = validUntil;
this.State = State;
}
/**
* Performs a deep copy on other.
*/
public UserProfile(UserProfile other) {
if (other.isSetUserModelVersion()) {
this.userModelVersion = other.userModelVersion;
}
if (other.isSetAiravataInternalUserId()) {
this.airavataInternalUserId = other.airavataInternalUserId;
}
if (other.isSetUserId()) {
this.userId = other.userId;
}
if (other.isSetEmails()) {
List __this__emails = new ArrayList(other.emails);
this.emails = __this__emails;
}
if (other.isSetUserName()) {
this.userName = other.userName;
}
if (other.isSetOrcidId()) {
this.orcidId = other.orcidId;
}
if (other.isSetPhones()) {
List __this__phones = new ArrayList(other.phones);
this.phones = __this__phones;
}
if (other.isSetCountry()) {
this.country = other.country;
}
if (other.isSetNationality()) {
List __this__nationality = new ArrayList(other.nationality);
this.nationality = __this__nationality;
}
if (other.isSetHomeOrganization()) {
this.homeOrganization = other.homeOrganization;
}
if (other.isSetOrginationAffiliation()) {
this.orginationAffiliation = other.orginationAffiliation;
}
if (other.isSetCreationTime()) {
this.creationTime = other.creationTime;
}
if (other.isSetLastAccessTime()) {
this.lastAccessTime = other.lastAccessTime;
}
if (other.isSetValidUntil()) {
this.validUntil = other.validUntil;
}
if (other.isSetState()) {
this.State = other.State;
}
if (other.isSetComments()) {
this.comments = other.comments;
}
if (other.isSetLabeledURI()) {
List __this__labeledURI = new ArrayList(other.labeledURI);
this.labeledURI = __this__labeledURI;
}
if (other.isSetGpgKey()) {
this.gpgKey = other.gpgKey;
}
if (other.isSetTimeZone()) {
this.timeZone = other.timeZone;
}
if (other.isSetNsfDemographics()) {
this.nsfDemographics = new NSFDemographics(other.nsfDemographics);
}
}
public UserProfile deepCopy() {
return new UserProfile(this);
}
@Override
public void clear() {
this.userModelVersion = "1.0";
this.airavataInternalUserId = "DO_NOT_SET_AT_CLIENTS";
this.userId = null;
this.emails = null;
this.userName = null;
this.orcidId = null;
this.phones = null;
this.country = null;
this.nationality = null;
this.homeOrganization = null;
this.orginationAffiliation = null;
this.creationTime = null;
this.lastAccessTime = null;
this.validUntil = null;
this.State = null;
this.comments = null;
this.labeledURI = null;
this.gpgKey = null;
this.timeZone = null;
this.nsfDemographics = null;
}
public String getUserModelVersion() {
return this.userModelVersion;
}
public void setUserModelVersion(String userModelVersion) {
this.userModelVersion = userModelVersion;
}
public void unsetUserModelVersion() {
this.userModelVersion = null;
}
/** Returns true if field userModelVersion is set (has been assigned a value) and false otherwise */
public boolean isSetUserModelVersion() {
return this.userModelVersion != null;
}
public void setUserModelVersionIsSet(boolean value) {
if (!value) {
this.userModelVersion = null;
}
}
public String getAiravataInternalUserId() {
return this.airavataInternalUserId;
}
public void setAiravataInternalUserId(String airavataInternalUserId) {
this.airavataInternalUserId = airavataInternalUserId;
}
public void unsetAiravataInternalUserId() {
this.airavataInternalUserId = null;
}
/** Returns true if field airavataInternalUserId is set (has been assigned a value) and false otherwise */
public boolean isSetAiravataInternalUserId() {
return this.airavataInternalUserId != null;
}
public void setAiravataInternalUserIdIsSet(boolean value) {
if (!value) {
this.airavataInternalUserId = null;
}
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public void unsetUserId() {
this.userId = null;
}
/** Returns true if field userId is set (has been assigned a value) and false otherwise */
public boolean isSetUserId() {
return this.userId != null;
}
public void setUserIdIsSet(boolean value) {
if (!value) {
this.userId = null;
}
}
public int getEmailsSize() {
return (this.emails == null) ? 0 : this.emails.size();
}
public java.util.Iterator getEmailsIterator() {
return (this.emails == null) ? null : this.emails.iterator();
}
public void addToEmails(String elem) {
if (this.emails == null) {
this.emails = new ArrayList();
}
this.emails.add(elem);
}
public List getEmails() {
return this.emails;
}
public void setEmails(List emails) {
this.emails = emails;
}
public void unsetEmails() {
this.emails = null;
}
/** Returns true if field emails is set (has been assigned a value) and false otherwise */
public boolean isSetEmails() {
return this.emails != null;
}
public void setEmailsIsSet(boolean value) {
if (!value) {
this.emails = 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 String getOrcidId() {
return this.orcidId;
}
public void setOrcidId(String orcidId) {
this.orcidId = orcidId;
}
public void unsetOrcidId() {
this.orcidId = null;
}
/** Returns true if field orcidId is set (has been assigned a value) and false otherwise */
public boolean isSetOrcidId() {
return this.orcidId != null;
}
public void setOrcidIdIsSet(boolean value) {
if (!value) {
this.orcidId = null;
}
}
public int getPhonesSize() {
return (this.phones == null) ? 0 : this.phones.size();
}
public java.util.Iterator getPhonesIterator() {
return (this.phones == null) ? null : this.phones.iterator();
}
public void addToPhones(String elem) {
if (this.phones == null) {
this.phones = new ArrayList();
}
this.phones.add(elem);
}
public List getPhones() {
return this.phones;
}
public void setPhones(List phones) {
this.phones = phones;
}
public void unsetPhones() {
this.phones = null;
}
/** Returns true if field phones is set (has been assigned a value) and false otherwise */
public boolean isSetPhones() {
return this.phones != null;
}
public void setPhonesIsSet(boolean value) {
if (!value) {
this.phones = null;
}
}
public String getCountry() {
return this.country;
}
public void setCountry(String country) {
this.country = country;
}
public void unsetCountry() {
this.country = null;
}
/** Returns true if field country is set (has been assigned a value) and false otherwise */
public boolean isSetCountry() {
return this.country != null;
}
public void setCountryIsSet(boolean value) {
if (!value) {
this.country = null;
}
}
public int getNationalitySize() {
return (this.nationality == null) ? 0 : this.nationality.size();
}
public java.util.Iterator getNationalityIterator() {
return (this.nationality == null) ? null : this.nationality.iterator();
}
public void addToNationality(String elem) {
if (this.nationality == null) {
this.nationality = new ArrayList();
}
this.nationality.add(elem);
}
public List getNationality() {
return this.nationality;
}
public void setNationality(List nationality) {
this.nationality = nationality;
}
public void unsetNationality() {
this.nationality = null;
}
/** Returns true if field nationality is set (has been assigned a value) and false otherwise */
public boolean isSetNationality() {
return this.nationality != null;
}
public void setNationalityIsSet(boolean value) {
if (!value) {
this.nationality = null;
}
}
public String getHomeOrganization() {
return this.homeOrganization;
}
public void setHomeOrganization(String homeOrganization) {
this.homeOrganization = homeOrganization;
}
public void unsetHomeOrganization() {
this.homeOrganization = null;
}
/** Returns true if field homeOrganization is set (has been assigned a value) and false otherwise */
public boolean isSetHomeOrganization() {
return this.homeOrganization != null;
}
public void setHomeOrganizationIsSet(boolean value) {
if (!value) {
this.homeOrganization = null;
}
}
public String getOrginationAffiliation() {
return this.orginationAffiliation;
}
public void setOrginationAffiliation(String orginationAffiliation) {
this.orginationAffiliation = orginationAffiliation;
}
public void unsetOrginationAffiliation() {
this.orginationAffiliation = null;
}
/** Returns true if field orginationAffiliation is set (has been assigned a value) and false otherwise */
public boolean isSetOrginationAffiliation() {
return this.orginationAffiliation != null;
}
public void setOrginationAffiliationIsSet(boolean value) {
if (!value) {
this.orginationAffiliation = null;
}
}
public String getCreationTime() {
return this.creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public void unsetCreationTime() {
this.creationTime = null;
}
/** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
public boolean isSetCreationTime() {
return this.creationTime != null;
}
public void setCreationTimeIsSet(boolean value) {
if (!value) {
this.creationTime = null;
}
}
public String getLastAccessTime() {
return this.lastAccessTime;
}
public void setLastAccessTime(String lastAccessTime) {
this.lastAccessTime = lastAccessTime;
}
public void unsetLastAccessTime() {
this.lastAccessTime = null;
}
/** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */
public boolean isSetLastAccessTime() {
return this.lastAccessTime != null;
}
public void setLastAccessTimeIsSet(boolean value) {
if (!value) {
this.lastAccessTime = null;
}
}
public String getValidUntil() {
return this.validUntil;
}
public void setValidUntil(String validUntil) {
this.validUntil = validUntil;
}
public void unsetValidUntil() {
this.validUntil = null;
}
/** Returns true if field validUntil is set (has been assigned a value) and false otherwise */
public boolean isSetValidUntil() {
return this.validUntil != null;
}
public void setValidUntilIsSet(boolean value) {
if (!value) {
this.validUntil = null;
}
}
/**
*
* @see Status
*/
public Status getState() {
return this.State;
}
/**
*
* @see Status
*/
public void setState(Status State) {
this.State = State;
}
public void unsetState() {
this.State = null;
}
/** Returns true if field State is set (has been assigned a value) and false otherwise */
public boolean isSetState() {
return this.State != null;
}
public void setStateIsSet(boolean value) {
if (!value) {
this.State = null;
}
}
public String getComments() {
return this.comments;
}
public void setComments(String comments) {
this.comments = comments;
}
public void unsetComments() {
this.comments = null;
}
/** Returns true if field comments is set (has been assigned a value) and false otherwise */
public boolean isSetComments() {
return this.comments != null;
}
public void setCommentsIsSet(boolean value) {
if (!value) {
this.comments = null;
}
}
public int getLabeledURISize() {
return (this.labeledURI == null) ? 0 : this.labeledURI.size();
}
public java.util.Iterator getLabeledURIIterator() {
return (this.labeledURI == null) ? null : this.labeledURI.iterator();
}
public void addToLabeledURI(String elem) {
if (this.labeledURI == null) {
this.labeledURI = new ArrayList();
}
this.labeledURI.add(elem);
}
public List getLabeledURI() {
return this.labeledURI;
}
public void setLabeledURI(List labeledURI) {
this.labeledURI = labeledURI;
}
public void unsetLabeledURI() {
this.labeledURI = null;
}
/** Returns true if field labeledURI is set (has been assigned a value) and false otherwise */
public boolean isSetLabeledURI() {
return this.labeledURI != null;
}
public void setLabeledURIIsSet(boolean value) {
if (!value) {
this.labeledURI = null;
}
}
public String getGpgKey() {
return this.gpgKey;
}
public void setGpgKey(String gpgKey) {
this.gpgKey = gpgKey;
}
public void unsetGpgKey() {
this.gpgKey = null;
}
/** Returns true if field gpgKey is set (has been assigned a value) and false otherwise */
public boolean isSetGpgKey() {
return this.gpgKey != null;
}
public void setGpgKeyIsSet(boolean value) {
if (!value) {
this.gpgKey = null;
}
}
public String getTimeZone() {
return this.timeZone;
}
public void setTimeZone(String timeZone) {
this.timeZone = timeZone;
}
public void unsetTimeZone() {
this.timeZone = null;
}
/** Returns true if field timeZone is set (has been assigned a value) and false otherwise */
public boolean isSetTimeZone() {
return this.timeZone != null;
}
public void setTimeZoneIsSet(boolean value) {
if (!value) {
this.timeZone = null;
}
}
public NSFDemographics getNsfDemographics() {
return this.nsfDemographics;
}
public void setNsfDemographics(NSFDemographics nsfDemographics) {
this.nsfDemographics = nsfDemographics;
}
public void unsetNsfDemographics() {
this.nsfDemographics = null;
}
/** Returns true if field nsfDemographics is set (has been assigned a value) and false otherwise */
public boolean isSetNsfDemographics() {
return this.nsfDemographics != null;
}
public void setNsfDemographicsIsSet(boolean value) {
if (!value) {
this.nsfDemographics = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_MODEL_VERSION:
if (value == null) {
unsetUserModelVersion();
} else {
setUserModelVersion((String)value);
}
break;
case AIRAVATA_INTERNAL_USER_ID:
if (value == null) {
unsetAiravataInternalUserId();
} else {
setAiravataInternalUserId((String)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((String)value);
}
break;
case EMAILS:
if (value == null) {
unsetEmails();
} else {
setEmails((List)value);
}
break;
case USER_NAME:
if (value == null) {
unsetUserName();
} else {
setUserName((String)value);
}
break;
case ORCID_ID:
if (value == null) {
unsetOrcidId();
} else {
setOrcidId((String)value);
}
break;
case PHONES:
if (value == null) {
unsetPhones();
} else {
setPhones((List)value);
}
break;
case COUNTRY:
if (value == null) {
unsetCountry();
} else {
setCountry((String)value);
}
break;
case NATIONALITY:
if (value == null) {
unsetNationality();
} else {
setNationality((List)value);
}
break;
case HOME_ORGANIZATION:
if (value == null) {
unsetHomeOrganization();
} else {
setHomeOrganization((String)value);
}
break;
case ORGINATION_AFFILIATION:
if (value == null) {
unsetOrginationAffiliation();
} else {
setOrginationAffiliation((String)value);
}
break;
case CREATION_TIME:
if (value == null) {
unsetCreationTime();
} else {
setCreationTime((String)value);
}
break;
case LAST_ACCESS_TIME:
if (value == null) {
unsetLastAccessTime();
} else {
setLastAccessTime((String)value);
}
break;
case VALID_UNTIL:
if (value == null) {
unsetValidUntil();
} else {
setValidUntil((String)value);
}
break;
case STATE:
if (value == null) {
unsetState();
} else {
setState((Status)value);
}
break;
case COMMENTS:
if (value == null) {
unsetComments();
} else {
setComments((String)value);
}
break;
case LABELED_URI:
if (value == null) {
unsetLabeledURI();
} else {
setLabeledURI((List)value);
}
break;
case GPG_KEY:
if (value == null) {
unsetGpgKey();
} else {
setGpgKey((String)value);
}
break;
case TIME_ZONE:
if (value == null) {
unsetTimeZone();
} else {
setTimeZone((String)value);
}
break;
case NSF_DEMOGRAPHICS:
if (value == null) {
unsetNsfDemographics();
} else {
setNsfDemographics((NSFDemographics)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_MODEL_VERSION:
return getUserModelVersion();
case AIRAVATA_INTERNAL_USER_ID:
return getAiravataInternalUserId();
case USER_ID:
return getUserId();
case EMAILS:
return getEmails();
case USER_NAME:
return getUserName();
case ORCID_ID:
return getOrcidId();
case PHONES:
return getPhones();
case COUNTRY:
return getCountry();
case NATIONALITY:
return getNationality();
case HOME_ORGANIZATION:
return getHomeOrganization();
case ORGINATION_AFFILIATION:
return getOrginationAffiliation();
case CREATION_TIME:
return getCreationTime();
case LAST_ACCESS_TIME:
return getLastAccessTime();
case VALID_UNTIL:
return getValidUntil();
case STATE:
return getState();
case COMMENTS:
return getComments();
case LABELED_URI:
return getLabeledURI();
case GPG_KEY:
return getGpgKey();
case TIME_ZONE:
return getTimeZone();
case NSF_DEMOGRAPHICS:
return getNsfDemographics();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case USER_MODEL_VERSION:
return isSetUserModelVersion();
case AIRAVATA_INTERNAL_USER_ID:
return isSetAiravataInternalUserId();
case USER_ID:
return isSetUserId();
case EMAILS:
return isSetEmails();
case USER_NAME:
return isSetUserName();
case ORCID_ID:
return isSetOrcidId();
case PHONES:
return isSetPhones();
case COUNTRY:
return isSetCountry();
case NATIONALITY:
return isSetNationality();
case HOME_ORGANIZATION:
return isSetHomeOrganization();
case ORGINATION_AFFILIATION:
return isSetOrginationAffiliation();
case CREATION_TIME:
return isSetCreationTime();
case LAST_ACCESS_TIME:
return isSetLastAccessTime();
case VALID_UNTIL:
return isSetValidUntil();
case STATE:
return isSetState();
case COMMENTS:
return isSetComments();
case LABELED_URI:
return isSetLabeledURI();
case GPG_KEY:
return isSetGpgKey();
case TIME_ZONE:
return isSetTimeZone();
case NSF_DEMOGRAPHICS:
return isSetNsfDemographics();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof UserProfile)
return this.equals((UserProfile)that);
return false;
}
public boolean equals(UserProfile that) {
if (that == null)
return false;
boolean this_present_userModelVersion = true && this.isSetUserModelVersion();
boolean that_present_userModelVersion = true && that.isSetUserModelVersion();
if (this_present_userModelVersion || that_present_userModelVersion) {
if (!(this_present_userModelVersion && that_present_userModelVersion))
return false;
if (!this.userModelVersion.equals(that.userModelVersion))
return false;
}
boolean this_present_airavataInternalUserId = true && this.isSetAiravataInternalUserId();
boolean that_present_airavataInternalUserId = true && that.isSetAiravataInternalUserId();
if (this_present_airavataInternalUserId || that_present_airavataInternalUserId) {
if (!(this_present_airavataInternalUserId && that_present_airavataInternalUserId))
return false;
if (!this.airavataInternalUserId.equals(that.airavataInternalUserId))
return false;
}
boolean this_present_userId = true && this.isSetUserId();
boolean that_present_userId = true && that.isSetUserId();
if (this_present_userId || that_present_userId) {
if (!(this_present_userId && that_present_userId))
return false;
if (!this.userId.equals(that.userId))
return false;
}
boolean this_present_emails = true && this.isSetEmails();
boolean that_present_emails = true && that.isSetEmails();
if (this_present_emails || that_present_emails) {
if (!(this_present_emails && that_present_emails))
return false;
if (!this.emails.equals(that.emails))
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_orcidId = true && this.isSetOrcidId();
boolean that_present_orcidId = true && that.isSetOrcidId();
if (this_present_orcidId || that_present_orcidId) {
if (!(this_present_orcidId && that_present_orcidId))
return false;
if (!this.orcidId.equals(that.orcidId))
return false;
}
boolean this_present_phones = true && this.isSetPhones();
boolean that_present_phones = true && that.isSetPhones();
if (this_present_phones || that_present_phones) {
if (!(this_present_phones && that_present_phones))
return false;
if (!this.phones.equals(that.phones))
return false;
}
boolean this_present_country = true && this.isSetCountry();
boolean that_present_country = true && that.isSetCountry();
if (this_present_country || that_present_country) {
if (!(this_present_country && that_present_country))
return false;
if (!this.country.equals(that.country))
return false;
}
boolean this_present_nationality = true && this.isSetNationality();
boolean that_present_nationality = true && that.isSetNationality();
if (this_present_nationality || that_present_nationality) {
if (!(this_present_nationality && that_present_nationality))
return false;
if (!this.nationality.equals(that.nationality))
return false;
}
boolean this_present_homeOrganization = true && this.isSetHomeOrganization();
boolean that_present_homeOrganization = true && that.isSetHomeOrganization();
if (this_present_homeOrganization || that_present_homeOrganization) {
if (!(this_present_homeOrganization && that_present_homeOrganization))
return false;
if (!this.homeOrganization.equals(that.homeOrganization))
return false;
}
boolean this_present_orginationAffiliation = true && this.isSetOrginationAffiliation();
boolean that_present_orginationAffiliation = true && that.isSetOrginationAffiliation();
if (this_present_orginationAffiliation || that_present_orginationAffiliation) {
if (!(this_present_orginationAffiliation && that_present_orginationAffiliation))
return false;
if (!this.orginationAffiliation.equals(that.orginationAffiliation))
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.equals(that.creationTime))
return false;
}
boolean this_present_lastAccessTime = true && this.isSetLastAccessTime();
boolean that_present_lastAccessTime = true && that.isSetLastAccessTime();
if (this_present_lastAccessTime || that_present_lastAccessTime) {
if (!(this_present_lastAccessTime && that_present_lastAccessTime))
return false;
if (!this.lastAccessTime.equals(that.lastAccessTime))
return false;
}
boolean this_present_validUntil = true && this.isSetValidUntil();
boolean that_present_validUntil = true && that.isSetValidUntil();
if (this_present_validUntil || that_present_validUntil) {
if (!(this_present_validUntil && that_present_validUntil))
return false;
if (!this.validUntil.equals(that.validUntil))
return false;
}
boolean this_present_State = true && this.isSetState();
boolean that_present_State = true && that.isSetState();
if (this_present_State || that_present_State) {
if (!(this_present_State && that_present_State))
return false;
if (!this.State.equals(that.State))
return false;
}
boolean this_present_comments = true && this.isSetComments();
boolean that_present_comments = true && that.isSetComments();
if (this_present_comments || that_present_comments) {
if (!(this_present_comments && that_present_comments))
return false;
if (!this.comments.equals(that.comments))
return false;
}
boolean this_present_labeledURI = true && this.isSetLabeledURI();
boolean that_present_labeledURI = true && that.isSetLabeledURI();
if (this_present_labeledURI || that_present_labeledURI) {
if (!(this_present_labeledURI && that_present_labeledURI))
return false;
if (!this.labeledURI.equals(that.labeledURI))
return false;
}
boolean this_present_gpgKey = true && this.isSetGpgKey();
boolean that_present_gpgKey = true && that.isSetGpgKey();
if (this_present_gpgKey || that_present_gpgKey) {
if (!(this_present_gpgKey && that_present_gpgKey))
return false;
if (!this.gpgKey.equals(that.gpgKey))
return false;
}
boolean this_present_timeZone = true && this.isSetTimeZone();
boolean that_present_timeZone = true && that.isSetTimeZone();
if (this_present_timeZone || that_present_timeZone) {
if (!(this_present_timeZone && that_present_timeZone))
return false;
if (!this.timeZone.equals(that.timeZone))
return false;
}
boolean this_present_nsfDemographics = true && this.isSetNsfDemographics();
boolean that_present_nsfDemographics = true && that.isSetNsfDemographics();
if (this_present_nsfDemographics || that_present_nsfDemographics) {
if (!(this_present_nsfDemographics && that_present_nsfDemographics))
return false;
if (!this.nsfDemographics.equals(that.nsfDemographics))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy