com.evernote.edam.userstore
Class AuthenticationResult

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

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

When an authentication (or re-authentication) is performed, this structure provides the result to the client.

currentTime:
The server-side date and time when this result was generated.
authenticationToken:
Holds an opaque, ASCII-encoded token that can be used by the client to perform actions on a NoteStore.
expiration:
Holds the server-side date and time when the authentication token will expire. This time can be compared to "currentTime" to produce an expiration time that can be reconciled with the client's local clock.
user:
Holds the information about the account which was authenticated if this was a full authentication. May be absent if this particular authentication did not require user information.
publicUserInfo:
If this authentication result was achieved without full permissions to access the full User structure, this field may be set to give back a more limited public set of data.

See Also:
Serialized Form

Nested Class Summary
static class AuthenticationResult._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static java.util.Map<AuthenticationResult._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 
Constructor Summary
AuthenticationResult()
           
AuthenticationResult(AuthenticationResult other)
          Performs a deep copy on other.
AuthenticationResult(long currentTime, java.lang.String authenticationToken, long expiration)
           
 
Method Summary
 AuthenticationResult clone()
          Deprecated. 
 int compareTo(AuthenticationResult other)
           
 AuthenticationResult deepCopy()
           
 boolean equals(AuthenticationResult that)
           
 boolean equals(java.lang.Object that)
           
 java.lang.String getAuthenticationToken()
           
 long getCurrentTime()
           
 long getExpiration()
           
 java.lang.Object getFieldValue(AuthenticationResult._Fields field)
           
 java.lang.Object getFieldValue(int fieldId)
           
 PublicUserInfo getPublicUserInfo()
           
 User getUser()
           
 int hashCode()
           
 boolean isSet(AuthenticationResult._Fields field)
          Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
 boolean isSet(int fieldID)
           
 boolean isSetAuthenticationToken()
          Returns true if field authenticationToken is set (has been asigned a value) and false otherwise
 boolean isSetCurrentTime()
          Returns true if field currentTime is set (has been asigned a value) and false otherwise
 boolean isSetExpiration()
          Returns true if field expiration is set (has been asigned a value) and false otherwise
 boolean isSetPublicUserInfo()
          Returns true if field publicUserInfo is set (has been asigned a value) and false otherwise
 boolean isSetUser()
          Returns true if field user is set (has been asigned a value) and false otherwise
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 void setAuthenticationToken(java.lang.String authenticationToken)
           
 void setAuthenticationTokenIsSet(boolean value)
           
 void setCurrentTime(long currentTime)
           
 void setCurrentTimeIsSet(boolean value)
           
 void setExpiration(long expiration)
           
 void setExpirationIsSet(boolean value)
           
 void setFieldValue(AuthenticationResult._Fields field, java.lang.Object value)
           
 void setFieldValue(int fieldID, java.lang.Object value)
           
 void setPublicUserInfo(PublicUserInfo publicUserInfo)
           
 void setPublicUserInfoIsSet(boolean value)
           
 void setUser(User user)
           
 void setUserIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetAuthenticationToken()
           
 void unsetCurrentTime()
           
 void unsetExpiration()
           
 void unsetPublicUserInfo()
           
 void unsetUser()
           
 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<AuthenticationResult._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

AuthenticationResult

public AuthenticationResult()

AuthenticationResult

public AuthenticationResult(long currentTime,
                            java.lang.String authenticationToken,
                            long expiration)

AuthenticationResult

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

Method Detail

deepCopy

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

clone

@Deprecated
public AuthenticationResult clone()
Deprecated. 

Overrides:
clone in class java.lang.Object

getCurrentTime

public long getCurrentTime()

setCurrentTime

public void setCurrentTime(long currentTime)

unsetCurrentTime

public void unsetCurrentTime()

isSetCurrentTime

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


setCurrentTimeIsSet

public void setCurrentTimeIsSet(boolean value)

getAuthenticationToken

public java.lang.String getAuthenticationToken()

setAuthenticationToken

public void setAuthenticationToken(java.lang.String authenticationToken)

unsetAuthenticationToken

public void unsetAuthenticationToken()

isSetAuthenticationToken

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


setAuthenticationTokenIsSet

public void setAuthenticationTokenIsSet(boolean value)

getExpiration

public long getExpiration()

setExpiration

public void setExpiration(long expiration)

unsetExpiration

public void unsetExpiration()

isSetExpiration

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


setExpirationIsSet

public void setExpirationIsSet(boolean value)

getUser

public User getUser()

setUser

public void setUser(User user)

unsetUser

public void unsetUser()

isSetUser

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


setUserIsSet

public void setUserIsSet(boolean value)

getPublicUserInfo

public PublicUserInfo getPublicUserInfo()

setPublicUserInfo

public void setPublicUserInfo(PublicUserInfo publicUserInfo)

unsetPublicUserInfo

public void unsetPublicUserInfo()

isSetPublicUserInfo

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


setPublicUserInfoIsSet

public void setPublicUserInfoIsSet(boolean value)

setFieldValue

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

setFieldValue

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

getFieldValue

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

getFieldValue

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

isSet

public boolean isSet(AuthenticationResult._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<AuthenticationResult._Fields>

isSet

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

equals

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

equals

public boolean equals(AuthenticationResult that)

hashCode

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

compareTo

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

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<AuthenticationResult._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<AuthenticationResult._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