com.evernote.edam.type
Class SharedNotebook

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

public class SharedNotebook
extends java.lang.Object
implements com.evernote.thrift.TBase<SharedNotebook>, java.io.Serializable, java.lang.Cloneable

Shared notebooks represent a relationship between a notebook and a single share invitation recipient.

id
the primary identifier of the share
userId
the user id of the owner of the notebook
notebookGuid
the GUID of the associated notebook shared.
email
the email address of the recipient - used by the notebook owner to identify who they shared with.
notebookModifiable
(DEPRECATED) a flag indicating the share is read/write -otherwise it's read only. This field is deprecated in favor of the new "privilege" field.
requireLogin
(DEPRECATED) indicates that a user must login to access the share. This field is deprecated and will be "true" for all new shared notebooks. It is read-only and ignored when creating or modifying a shared notebook, except that a shared notebook can be modified to require login. See "allowPreview" for information on privileges and shared notebooks.
serviceCreated
the date the owner first created the share with the specific email address
serviceUpdated
the date the shared notebook was last updated on the service. This will be updated when authenticateToSharedNotebook is called the first time with a shared notebook requiring login (i.e. when the username is bound to that shared notebook).
username
the username of the user who can access this share. Once it's assigned it cannot be changed.
privilege
The privilege level granted to the notebook, activity stream, and invitations. See the corresponding enumeration for details.
allowPreview
Whether or not to grant "READ_NOTEBOOK" privilege without an authentication token, for authenticateToSharedNotebook(...). With the change to "requireLogin" always being true for new shared notebooks, this is the only way to access a shared notebook without an authorization token. This setting expires after the first use of authenticateToSharedNotebook(...) with a valid authentication token.
recipientSettings
Settings intended for use only by the recipient of this shared notebook. You should skip setting this value unless you want to change the value contained inside the structure, and only if you are the recipient.

See Also:
Serialized Form

Constructor Summary
SharedNotebook()
           
SharedNotebook(SharedNotebook other)
          Performs a deep copy on other.
 
Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(SharedNotebook other)
           
 SharedNotebook deepCopy()
          Creates a deep copy of the object.
 boolean equals(java.lang.Object that)
           
 boolean equals(SharedNotebook that)
           
 java.lang.String getEmail()
           
 long getId()
           
 java.lang.String getNotebookGuid()
           
 SharedNotebookPrivilegeLevel getPrivilege()
           
 SharedNotebookRecipientSettings getRecipientSettings()
           
 long getServiceCreated()
           
 long getServiceUpdated()
           
 java.lang.String getShareKey()
           
 int getUserId()
           
 java.lang.String getUsername()
           
 int hashCode()
           
 boolean isAllowPreview()
           
 boolean isNotebookModifiable()
           
 boolean isRequireLogin()
           
 boolean isSetAllowPreview()
          Returns true if field allowPreview 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 isSetNotebookGuid()
          Returns true if field notebookGuid is set (has been asigned a value) and false otherwise
 boolean isSetNotebookModifiable()
          Returns true if field notebookModifiable 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 isSetRecipientSettings()
          Returns true if field recipientSettings is set (has been asigned a value) and false otherwise
 boolean isSetRequireLogin()
          Returns true if field requireLogin is set (has been asigned a value) and false otherwise
 boolean isSetServiceCreated()
          Returns true if field serviceCreated is set (has been asigned a value) and false otherwise
 boolean isSetServiceUpdated()
          Returns true if field serviceUpdated is set (has been asigned a value) and false otherwise
 boolean isSetShareKey()
          Returns true if field shareKey is set (has been asigned a value) and false otherwise
 boolean isSetUserId()
          Returns true if field userId 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(com.evernote.thrift.protocol.TProtocol iprot)
          Reads an instance of the object from the given protocol.
 void setAllowPreview(boolean allowPreview)
           
 void setAllowPreviewIsSet(boolean value)
           
 void setEmail(java.lang.String email)
           
 void setEmailIsSet(boolean value)
           
 void setId(long id)
           
 void setIdIsSet(boolean value)
           
 void setNotebookGuid(java.lang.String notebookGuid)
           
 void setNotebookGuidIsSet(boolean value)
           
 void setNotebookModifiable(boolean notebookModifiable)
           
 void setNotebookModifiableIsSet(boolean value)
           
 void setPrivilege(SharedNotebookPrivilegeLevel privilege)
           
 void setPrivilegeIsSet(boolean value)
           
 void setRecipientSettings(SharedNotebookRecipientSettings recipientSettings)
           
 void setRecipientSettingsIsSet(boolean value)
           
 void setRequireLogin(boolean requireLogin)
           
 void setRequireLoginIsSet(boolean value)
           
 void setServiceCreated(long serviceCreated)
           
 void setServiceCreatedIsSet(boolean value)
           
 void setServiceUpdated(long serviceUpdated)
           
 void setServiceUpdatedIsSet(boolean value)
           
 void setShareKey(java.lang.String shareKey)
           
 void setShareKeyIsSet(boolean value)
           
 void setUserId(int userId)
           
 void setUserIdIsSet(boolean value)
           
 void setUsername(java.lang.String username)
           
 void setUsernameIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetAllowPreview()
           
 void unsetEmail()
           
 void unsetId()
           
 void unsetNotebookGuid()
           
 void unsetNotebookModifiable()
           
 void unsetPrivilege()
           
 void unsetRecipientSettings()
           
 void unsetRequireLogin()
           
 void unsetServiceCreated()
           
 void unsetServiceUpdated()
           
 void unsetShareKey()
           
 void unsetUserId()
           
 void unsetUsername()
           
 void validate()
           
 void write(com.evernote.thrift.protocol.TProtocol oprot)
          Writes the object to the given protocol.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedNotebook

public SharedNotebook()

SharedNotebook

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

Method Detail

deepCopy

public SharedNotebook deepCopy()
Description copied from interface: com.evernote.thrift.TBase
Creates a deep copy of the object.

Specified by:
deepCopy in interface com.evernote.thrift.TBase<SharedNotebook>

clear

public void clear()
Description copied from interface: com.evernote.thrift.TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface com.evernote.thrift.TBase<SharedNotebook>

getId

public long getId()

setId

public void setId(long 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)

getUserId

public int getUserId()

setUserId

public void setUserId(int userId)

unsetUserId

public void unsetUserId()

isSetUserId

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


setUserIdIsSet

public void setUserIdIsSet(boolean value)

getNotebookGuid

public java.lang.String getNotebookGuid()

setNotebookGuid

public void setNotebookGuid(java.lang.String notebookGuid)

unsetNotebookGuid

public void unsetNotebookGuid()

isSetNotebookGuid

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


setNotebookGuidIsSet

public void setNotebookGuidIsSet(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)

isNotebookModifiable

public boolean isNotebookModifiable()

setNotebookModifiable

public void setNotebookModifiable(boolean notebookModifiable)

unsetNotebookModifiable

public void unsetNotebookModifiable()

isSetNotebookModifiable

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


setNotebookModifiableIsSet

public void setNotebookModifiableIsSet(boolean value)

isRequireLogin

public boolean isRequireLogin()

setRequireLogin

public void setRequireLogin(boolean requireLogin)

unsetRequireLogin

public void unsetRequireLogin()

isSetRequireLogin

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


setRequireLoginIsSet

public void setRequireLoginIsSet(boolean value)

getServiceCreated

public long getServiceCreated()

setServiceCreated

public void setServiceCreated(long serviceCreated)

unsetServiceCreated

public void unsetServiceCreated()

isSetServiceCreated

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


setServiceCreatedIsSet

public void setServiceCreatedIsSet(boolean value)

getServiceUpdated

public long getServiceUpdated()

setServiceUpdated

public void setServiceUpdated(long serviceUpdated)

unsetServiceUpdated

public void unsetServiceUpdated()

isSetServiceUpdated

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


setServiceUpdatedIsSet

public void setServiceUpdatedIsSet(boolean value)

getShareKey

public java.lang.String getShareKey()

setShareKey

public void setShareKey(java.lang.String shareKey)

unsetShareKey

public void unsetShareKey()

isSetShareKey

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


setShareKeyIsSet

public void setShareKeyIsSet(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)

getPrivilege

public SharedNotebookPrivilegeLevel getPrivilege()
See Also:
SharedNotebookPrivilegeLevel

setPrivilege

public void setPrivilege(SharedNotebookPrivilegeLevel privilege)
See Also:
SharedNotebookPrivilegeLevel

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)

isAllowPreview

public boolean isAllowPreview()

setAllowPreview

public void setAllowPreview(boolean allowPreview)

unsetAllowPreview

public void unsetAllowPreview()

isSetAllowPreview

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


setAllowPreviewIsSet

public void setAllowPreviewIsSet(boolean value)

getRecipientSettings

public SharedNotebookRecipientSettings getRecipientSettings()

setRecipientSettings

public void setRecipientSettings(SharedNotebookRecipientSettings recipientSettings)

unsetRecipientSettings

public void unsetRecipientSettings()

isSetRecipientSettings

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


setRecipientSettingsIsSet

public void setRecipientSettingsIsSet(boolean value)

equals

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

equals

public boolean equals(SharedNotebook that)

hashCode

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

compareTo

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

read

public void read(com.evernote.thrift.protocol.TProtocol iprot)
          throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Reads an instance of the object from the given protocol.

Specified by:
read in interface com.evernote.thrift.TBase<SharedNotebook>
Parameters:
iprot - Input protocol
Throws:
com.evernote.thrift.TException

write

public void write(com.evernote.thrift.protocol.TProtocol oprot)
           throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Writes the object to the given protocol.

Specified by:
write in interface com.evernote.thrift.TBase<SharedNotebook>
Parameters:
oprot - Output protocol
Throws:
com.evernote.thrift.TException

toString

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

validate

public void validate()
              throws com.evernote.thrift.TException
Throws:
com.evernote.thrift.TException