com.evernote.edam.type
Class User

java.lang.Object
  extended by com.evernote.edam.type.User
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<User>, org.apache.thrift.TBase<User._Fields>

public class User
extends java.lang.Object
implements org.apache.thrift.TBase<User._Fields>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<User>

This represents the information about a single user account.

id
The unique numeric identifier for the account, which will not change for the lifetime of the account.
username
The name that the user provides to log in to their account. In the future, this may be empty for some accounts if their login process is indirect (e.g. via social networks, etc.). May only contain a-z, 0-9, or '-', and may not start or end with the '-'
Length: EDAM_USER_USERNAME_LEN_MIN - EDAM_USER_USERNAME_LEN_MAX
Regex: EDAM_USER_USERNAME_REGEX
email
The email address registered for the user. Must comply with RFC 2821 and RFC 2822.
Length: EDAM_EMAIL_LEN_MIN - EDAM_EMAIL_LEN_MAX
Regex: EDAM_EMAIL_REGEX
name
The printable name of the user, which may be a combination of given and family names. This is used instead of separate "first" and "last" names due to variations in international name format/order. May not start or end with a whitespace character. May contain any character but carriage return or newline (Unicode classes Zl and Zp).
Length: EDAM_USER_NAME_LEN_MIN - EDAM_USER_NAME_LEN_MAX
Regex: EDAM_USER_NAME_REGEX
timezone
The zone ID for the user's default location. If present, this may be used to localize the display of any timestamp for which no other timezone is available - for example, an note that arrives via a micro-browser may not contain enough information to display its local time, so this default timezone may be assigned to the note. The format must be encoded as a standard zone ID such as "America/Los_Angeles" or "GMT+08:00"
Length: EDAM_TIMEZONE_LEN_MIN - EDAM_TIMEZONE_LEN_MAX
Regex: EDAM_TIMEZONE_REGEX
privilege
The level of access permitted for the user.
created
The date and time when this user account was created in the service.
updated
The date and time when this user account was last modified in the service.
deleted
If the account has been deleted from the system (e.g. as the result of a legal request by the user), the date and time of the deletion will be represented here. If not, this value will not be set.
active
If the user account is available for login and synchronization, this flag will be set to true.
shardId
The name of the virtual server that manages the state of this user. This value is used internally to determine which system should service requests about this user's data.
attributes
If present, this will contain a list of the attributes for this user account.
accounting
Bookkeeping information for the user's subscription.

See Also:
Serialized Form

Nested Class Summary
static class User._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static java.util.Map<User._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 
Constructor Summary
User()
           
User(User other)
          Performs a deep copy on other.
 
Method Summary
 User clone()
          Deprecated. 
 int compareTo(User other)
           
 User deepCopy()
           
 boolean equals(java.lang.Object that)
           
 boolean equals(User that)
           
 Accounting getAccounting()
           
 UserAttributes getAttributes()
           
 long getCreated()
           
 long getDeleted()
           
 java.lang.String getEmail()
           
 java.lang.Object getFieldValue(int fieldId)
           
 java.lang.Object getFieldValue(User._Fields field)
           
 int getId()
           
 java.lang.String getName()
           
 PrivilegeLevel getPrivilege()
           
 java.lang.String getShardId()
           
 java.lang.String getTimezone()
           
 long getUpdated()
           
 java.lang.String getUsername()
           
 int hashCode()
           
 boolean isActive()
           
 boolean isSet(int fieldID)
           
 boolean isSet(User._Fields field)
          Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
 boolean isSetAccounting()
          Returns true if field accounting is set (has been asigned a value) and false otherwise
 boolean isSetActive()
          Returns true if field active is set (has been asigned a value) and false otherwise
 boolean isSetAttributes()
          Returns true if field attributes is set (has been asigned a value) and false otherwise
 boolean isSetCreated()
          Returns true if field created is set (has been asigned a value) and false otherwise
 boolean isSetDeleted()
          Returns true if field deleted is set (has been asigned a value) and false otherwise
 boolean isSetEmail()
          Returns true if field email is set (has been asigned a value) and false otherwise
 boolean isSetId()
          Returns true if field id is set (has been asigned a value) and false otherwise
 boolean isSetName()
          Returns true if field name is set (has been asigned a value) and false otherwise
 boolean isSetPrivilege()
          Returns true if field privilege is set (has been asigned a value) and false otherwise
 boolean isSetShardId()
          Returns true if field shardId is set (has been asigned a value) and false otherwise
 boolean isSetTimezone()
          Returns true if field timezone is set (has been asigned a value) and false otherwise
 boolean isSetUpdated()
          Returns true if field updated is set (has been asigned a value) and false otherwise
 boolean isSetUsername()
          Returns true if field username is set (has been asigned a value) and false otherwise
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 void setAccounting(Accounting accounting)
           
 void setAccountingIsSet(boolean value)
           
 void setActive(boolean active)
           
 void setActiveIsSet(boolean value)
           
 void setAttributes(UserAttributes attributes)
           
 void setAttributesIsSet(boolean value)
           
 void setCreated(long created)
           
 void setCreatedIsSet(boolean value)
           
 void setDeleted(long deleted)
           
 void setDeletedIsSet(boolean value)
           
 void setEmail(java.lang.String email)
           
 void setEmailIsSet(boolean value)
           
 void setFieldValue(int fieldID, java.lang.Object value)
           
 void setFieldValue(User._Fields field, java.lang.Object value)
           
 void setId(int id)
           
 void setIdIsSet(boolean value)
           
 void setName(java.lang.String name)
           
 void setNameIsSet(boolean value)
           
 void setPrivilege(PrivilegeLevel privilege)
           
 void setPrivilegeIsSet(boolean value)
           
 void setShardId(java.lang.String shardId)
           
 void setShardIdIsSet(boolean value)
           
 void setTimezone(java.lang.String timezone)
           
 void setTimezoneIsSet(boolean value)
           
 void setUpdated(long updated)
           
 void setUpdatedIsSet(boolean value)
           
 void setUsername(java.lang.String username)
           
 void setUsernameIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetAccounting()
           
 void unsetActive()
           
 void unsetAttributes()
           
 void unsetCreated()
           
 void unsetDeleted()
           
 void unsetEmail()
           
 void unsetId()
           
 void unsetName()
           
 void unsetPrivilege()
           
 void unsetShardId()
           
 void unsetTimezone()
           
 void unsetUpdated()
           
 void unsetUsername()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

metaDataMap

public static final java.util.Map<User._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

User

public User()

User

public User(User other)
Performs a deep copy on other.

Method Detail

deepCopy

public User deepCopy()
Specified by:
deepCopy in interface org.apache.thrift.TBase<User._Fields>

clone

@Deprecated
public User clone()
Deprecated. 

Overrides:
clone in class java.lang.Object

getId

public int getId()

setId

public void setId(int id)

unsetId

public void unsetId()

isSetId

public boolean isSetId()
Returns true if field id is set (has been asigned a value) and false otherwise


setIdIsSet

public void setIdIsSet(boolean value)

getUsername

public java.lang.String getUsername()

setUsername

public void setUsername(java.lang.String username)

unsetUsername

public void unsetUsername()

isSetUsername

public boolean isSetUsername()
Returns true if field username is set (has been asigned a value) and false otherwise


setUsernameIsSet

public void setUsernameIsSet(boolean value)

getEmail

public java.lang.String getEmail()

setEmail

public void setEmail(java.lang.String email)

unsetEmail

public void unsetEmail()

isSetEmail

public boolean isSetEmail()
Returns true if field email is set (has been asigned a value) and false otherwise


setEmailIsSet

public void setEmailIsSet(boolean value)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

unsetName

public void unsetName()

isSetName

public boolean isSetName()
Returns true if field name is set (has been asigned a value) and false otherwise


setNameIsSet

public void setNameIsSet(boolean value)

getTimezone

public java.lang.String getTimezone()

setTimezone

public void setTimezone(java.lang.String timezone)

unsetTimezone

public void unsetTimezone()

isSetTimezone

public boolean isSetTimezone()
Returns true if field timezone is set (has been asigned a value) and false otherwise


setTimezoneIsSet

public void setTimezoneIsSet(boolean value)

getPrivilege

public PrivilegeLevel getPrivilege()
See Also:
PrivilegeLevel

setPrivilege

public void setPrivilege(PrivilegeLevel privilege)
See Also:
PrivilegeLevel

unsetPrivilege

public void unsetPrivilege()

isSetPrivilege

public boolean isSetPrivilege()
Returns true if field privilege is set (has been asigned a value) and false otherwise


setPrivilegeIsSet

public void setPrivilegeIsSet(boolean value)

getCreated

public long getCreated()

setCreated

public void setCreated(long created)

unsetCreated

public void unsetCreated()

isSetCreated

public boolean isSetCreated()
Returns true if field created is set (has been asigned a value) and false otherwise


setCreatedIsSet

public void setCreatedIsSet(boolean value)

getUpdated

public long getUpdated()

setUpdated

public void setUpdated(long updated)

unsetUpdated

public void unsetUpdated()

isSetUpdated

public boolean isSetUpdated()
Returns true if field updated is set (has been asigned a value) and false otherwise


setUpdatedIsSet

public void setUpdatedIsSet(boolean value)

getDeleted

public long getDeleted()

setDeleted

public void setDeleted(long deleted)

unsetDeleted

public void unsetDeleted()

isSetDeleted

public boolean isSetDeleted()
Returns true if field deleted is set (has been asigned a value) and false otherwise


setDeletedIsSet

public void setDeletedIsSet(boolean value)

isActive

public boolean isActive()

setActive

public void setActive(boolean active)

unsetActive

public void unsetActive()

isSetActive

public boolean isSetActive()
Returns true if field active is set (has been asigned a value) and false otherwise


setActiveIsSet

public void setActiveIsSet(boolean value)

getShardId

public java.lang.String getShardId()

setShardId

public void setShardId(java.lang.String shardId)

unsetShardId

public void unsetShardId()

isSetShardId

public boolean isSetShardId()
Returns true if field shardId is set (has been asigned a value) and false otherwise


setShardIdIsSet

public void setShardIdIsSet(boolean value)

getAttributes

public UserAttributes getAttributes()

setAttributes

public void setAttributes(UserAttributes attributes)

unsetAttributes

public void unsetAttributes()

isSetAttributes

public boolean isSetAttributes()
Returns true if field attributes is set (has been asigned a value) and false otherwise


setAttributesIsSet

public void setAttributesIsSet(boolean value)

getAccounting

public Accounting getAccounting()

setAccounting

public void setAccounting(Accounting accounting)

unsetAccounting

public void unsetAccounting()

isSetAccounting

public boolean isSetAccounting()
Returns true if field accounting is set (has been asigned a value) and false otherwise


setAccountingIsSet

public void setAccountingIsSet(boolean value)

setFieldValue

public void setFieldValue(User._Fields field,
                          java.lang.Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<User._Fields>

setFieldValue

public void setFieldValue(int fieldID,
                          java.lang.Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<User._Fields>

getFieldValue

public java.lang.Object getFieldValue(User._Fields field)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<User._Fields>

getFieldValue

public java.lang.Object getFieldValue(int fieldId)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<User._Fields>

isSet

public boolean isSet(User._Fields field)
Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise

Specified by:
isSet in interface org.apache.thrift.TBase<User._Fields>

isSet

public boolean isSet(int fieldID)
Specified by:
isSet in interface org.apache.thrift.TBase<User._Fields>

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(User that)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(User other)
Specified by:
compareTo in interface java.lang.Comparable<User>

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<User._Fields>
Throws:
org.apache.thrift.TException

write

public void write(org.apache.thrift.protocol.TProtocol oprot)
           throws org.apache.thrift.TException
Specified by:
write in interface org.apache.thrift.TBase<User._Fields>
Throws:
org.apache.thrift.TException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

validate

public void validate()
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException