com.evernote.edam.type
Class Notebook

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

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

A unique container for a set of notes.

guid
The unique identifier of this notebook.
Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
Regex: EDAM_GUID_REGEX
name
A sequence of characters representing the name of the notebook. May be changed by clients, but the account may not contain two notebooks with names that are equal via a case-insensitive comparison. Can't begin or end with a space.
Length: EDAM_NOTEBOOK_NAME_LEN_MIN - EDAM_NOTEBOOK_NAME_LEN_MAX
Regex: EDAM_NOTEBOOK_NAME_REGEX
updateSequenceNum
A number identifying the last transaction to modify the state of this object. The USN values are sequential within an account, and can be used to compare the order of modifications within the service.
defaultNotebook
If true, this notebook should be used for new notes whenever the user has not (or cannot) specify a desired target notebook. For example, if a note is submitted via SMTP email. The service will maintain at most one defaultNotebook per account. If a second notebook is created or updated with defaultNotebook set to true, the service will automatically update the prior notebook's defaultNotebook field to false. If the default notebook is deleted (i.e. "active" set to false), the "defaultNotebook" field will be set to false by the service. If the account has no default notebook set, the service will use the most recent notebook as the default.
serviceCreated
The time when this notebook was created on the service. This will be set on the service during creation, and the service will provide this value when it returns a Notebook to a client. The service will ignore this value if it is sent by clients.
serviceUpdated
The time when this notebook was last modified on the service. This will be set on the service during creation, and the service will provide this value when it returns a Notebook to a client. The service will ignore this value if it is sent by clients.
publishing
If the Notebook has been opened for public access, or business users shared with their business (i.e. if 'published' is set to true), then this will point to the set of publishing information for the Notebook (URI, description, etc.). A Notebook cannot be published without providing this information, but it will persist for later use if publishing is ever disabled on the Notebook. Clients that do not wish to change the publishing behavior of a Notebook should not set this value when calling NoteStore.updateNotebook().
published
If this is set to true, then the Notebook will be accessible either to the public, or for business users to their business, via the 'publishing' specification, which must also be set. If this is set to false, the Notebook will not be available to the public (or business). Clients that do not wish to change the publishing behavior of a Notebook should not set this value when calling NoteStore.updateNotebook().
stack
If this is set, then the notebook is visually contained within a stack of notebooks with this name. All notebooks in the same account with the same 'stack' field are considered to be in the same stack. Notebooks with no stack set are "top level" and not contained within a stack.
sharedNotebookIds
DEPRECATED - replaced by sharedNotebooks.
sharedNotebooks
The list of recipients to whom this notebook has been shared (one SharedNotebook object per recipient email address). This field will be unset if you do not have permission to access this data. If you are accessing the notebook as the owner or via a shared notebook that is modifiable, then you have access to this data and the value will be set. This field is read-only. Clients may not make changes to shared notebooks via this field.
businessNotebook
If the notebook is part of a business account and has been published to the business library, this will contain information for the library listing. The presence or absence of this field is not a reliable test of whether a given notebook is in fact a business notebook - the field is only used when a notebook is or has been published to the business library.
contact
Intended for use with Business accounts, this field identifies the user who has been designated as the "contact". For notebooks created in business accounts, the server will automatically set this value to the user who created the notebook unless Notebook.contact.username has been set, in which that value will be used. When updating a notebook, it is common to leave Notebook.contact field unset, indicating that no change to the value is being requested and that the existing value, if any, should be preserved.

See Also:
Serialized Form

Constructor Summary
Notebook()
           
Notebook(Notebook other)
          Performs a deep copy on other.
 
Method Summary
 void addToSharedNotebookIds(long elem)
           
 void addToSharedNotebooks(SharedNotebook elem)
           
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(Notebook other)
           
 Notebook deepCopy()
          Creates a deep copy of the object.
 boolean equals(Notebook that)
           
 boolean equals(java.lang.Object that)
           
 BusinessNotebook getBusinessNotebook()
           
 User getContact()
           
 java.lang.String getGuid()
           
 java.lang.String getName()
           
 Publishing getPublishing()
           
 NotebookRestrictions getRestrictions()
           
 long getServiceCreated()
           
 long getServiceUpdated()
           
 java.util.List<java.lang.Long> getSharedNotebookIds()
           
 java.util.Iterator<java.lang.Long> getSharedNotebookIdsIterator()
           
 int getSharedNotebookIdsSize()
           
 java.util.List<SharedNotebook> getSharedNotebooks()
           
 java.util.Iterator<SharedNotebook> getSharedNotebooksIterator()
           
 int getSharedNotebooksSize()
           
 java.lang.String getStack()
           
 int getUpdateSequenceNum()
           
 int hashCode()
           
 boolean isDefaultNotebook()
           
 boolean isPublished()
           
 boolean isSetBusinessNotebook()
          Returns true if field businessNotebook is set (has been asigned a value) and false otherwise
 boolean isSetContact()
          Returns true if field contact is set (has been asigned a value) and false otherwise
 boolean isSetDefaultNotebook()
          Returns true if field defaultNotebook is set (has been asigned a value) and false otherwise
 boolean isSetGuid()
          Returns true if field guid 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 isSetPublished()
          Returns true if field published is set (has been asigned a value) and false otherwise
 boolean isSetPublishing()
          Returns true if field publishing is set (has been asigned a value) and false otherwise
 boolean isSetRestrictions()
          Returns true if field restrictions 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 isSetSharedNotebookIds()
          Returns true if field sharedNotebookIds is set (has been asigned a value) and false otherwise
 boolean isSetSharedNotebooks()
          Returns true if field sharedNotebooks is set (has been asigned a value) and false otherwise
 boolean isSetStack()
          Returns true if field stack is set (has been asigned a value) and false otherwise
 boolean isSetUpdateSequenceNum()
          Returns true if field updateSequenceNum 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 setBusinessNotebook(BusinessNotebook businessNotebook)
           
 void setBusinessNotebookIsSet(boolean value)
           
 void setContact(User contact)
           
 void setContactIsSet(boolean value)
           
 void setDefaultNotebook(boolean defaultNotebook)
           
 void setDefaultNotebookIsSet(boolean value)
           
 void setGuid(java.lang.String guid)
           
 void setGuidIsSet(boolean value)
           
 void setName(java.lang.String name)
           
 void setNameIsSet(boolean value)
           
 void setPublished(boolean published)
           
 void setPublishedIsSet(boolean value)
           
 void setPublishing(Publishing publishing)
           
 void setPublishingIsSet(boolean value)
           
 void setRestrictions(NotebookRestrictions restrictions)
           
 void setRestrictionsIsSet(boolean value)
           
 void setServiceCreated(long serviceCreated)
           
 void setServiceCreatedIsSet(boolean value)
           
 void setServiceUpdated(long serviceUpdated)
           
 void setServiceUpdatedIsSet(boolean value)
           
 void setSharedNotebookIds(java.util.List<java.lang.Long> sharedNotebookIds)
           
 void setSharedNotebookIdsIsSet(boolean value)
           
 void setSharedNotebooks(java.util.List<SharedNotebook> sharedNotebooks)
           
 void setSharedNotebooksIsSet(boolean value)
           
 void setStack(java.lang.String stack)
           
 void setStackIsSet(boolean value)
           
 void setUpdateSequenceNum(int updateSequenceNum)
           
 void setUpdateSequenceNumIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetBusinessNotebook()
           
 void unsetContact()
           
 void unsetDefaultNotebook()
           
 void unsetGuid()
           
 void unsetName()
           
 void unsetPublished()
           
 void unsetPublishing()
           
 void unsetRestrictions()
           
 void unsetServiceCreated()
           
 void unsetServiceUpdated()
           
 void unsetSharedNotebookIds()
           
 void unsetSharedNotebooks()
           
 void unsetStack()
           
 void unsetUpdateSequenceNum()
           
 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

Notebook

public Notebook()

Notebook

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

Method Detail

deepCopy

public Notebook 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<Notebook>

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<Notebook>

getGuid

public java.lang.String getGuid()

setGuid

public void setGuid(java.lang.String guid)

unsetGuid

public void unsetGuid()

isSetGuid

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


setGuidIsSet

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

getUpdateSequenceNum

public int getUpdateSequenceNum()

setUpdateSequenceNum

public void setUpdateSequenceNum(int updateSequenceNum)

unsetUpdateSequenceNum

public void unsetUpdateSequenceNum()

isSetUpdateSequenceNum

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


setUpdateSequenceNumIsSet

public void setUpdateSequenceNumIsSet(boolean value)

isDefaultNotebook

public boolean isDefaultNotebook()

setDefaultNotebook

public void setDefaultNotebook(boolean defaultNotebook)

unsetDefaultNotebook

public void unsetDefaultNotebook()

isSetDefaultNotebook

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


setDefaultNotebookIsSet

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

getPublishing

public Publishing getPublishing()

setPublishing

public void setPublishing(Publishing publishing)

unsetPublishing

public void unsetPublishing()

isSetPublishing

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


setPublishingIsSet

public void setPublishingIsSet(boolean value)

isPublished

public boolean isPublished()

setPublished

public void setPublished(boolean published)

unsetPublished

public void unsetPublished()

isSetPublished

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


setPublishedIsSet

public void setPublishedIsSet(boolean value)

getStack

public java.lang.String getStack()

setStack

public void setStack(java.lang.String stack)

unsetStack

public void unsetStack()

isSetStack

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


setStackIsSet

public void setStackIsSet(boolean value)

getSharedNotebookIdsSize

public int getSharedNotebookIdsSize()

getSharedNotebookIdsIterator

public java.util.Iterator<java.lang.Long> getSharedNotebookIdsIterator()

addToSharedNotebookIds

public void addToSharedNotebookIds(long elem)

getSharedNotebookIds

public java.util.List<java.lang.Long> getSharedNotebookIds()

setSharedNotebookIds

public void setSharedNotebookIds(java.util.List<java.lang.Long> sharedNotebookIds)

unsetSharedNotebookIds

public void unsetSharedNotebookIds()

isSetSharedNotebookIds

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


setSharedNotebookIdsIsSet

public void setSharedNotebookIdsIsSet(boolean value)

getSharedNotebooksSize

public int getSharedNotebooksSize()

getSharedNotebooksIterator

public java.util.Iterator<SharedNotebook> getSharedNotebooksIterator()

addToSharedNotebooks

public void addToSharedNotebooks(SharedNotebook elem)

getSharedNotebooks

public java.util.List<SharedNotebook> getSharedNotebooks()

setSharedNotebooks

public void setSharedNotebooks(java.util.List<SharedNotebook> sharedNotebooks)

unsetSharedNotebooks

public void unsetSharedNotebooks()

isSetSharedNotebooks

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


setSharedNotebooksIsSet

public void setSharedNotebooksIsSet(boolean value)

getBusinessNotebook

public BusinessNotebook getBusinessNotebook()

setBusinessNotebook

public void setBusinessNotebook(BusinessNotebook businessNotebook)

unsetBusinessNotebook

public void unsetBusinessNotebook()

isSetBusinessNotebook

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


setBusinessNotebookIsSet

public void setBusinessNotebookIsSet(boolean value)

getContact

public User getContact()

setContact

public void setContact(User contact)

unsetContact

public void unsetContact()

isSetContact

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


setContactIsSet

public void setContactIsSet(boolean value)

getRestrictions

public NotebookRestrictions getRestrictions()

setRestrictions

public void setRestrictions(NotebookRestrictions restrictions)

unsetRestrictions

public void unsetRestrictions()

isSetRestrictions

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


setRestrictionsIsSet

public void setRestrictionsIsSet(boolean value)

equals

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

equals

public boolean equals(Notebook that)

hashCode

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

compareTo

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

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<Notebook>
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<Notebook>
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