Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package com.evernote.edam.notestore;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import com.evernote.thrift.*;
import com.evernote.thrift.protocol.*;
/**
* This structure is given out by the NoteStore when a client asks to
* receive the current state of an account. The client asks for the server's
* state one chunk at a time in order to allow clients to retrieve the state
* of a large account without needing to transfer the entire account in
* a single message.
*
* The server always gives SyncChunks using an ascending series of Update
* Sequence Numbers (USNs).
*
*
*
currentTime
*
* The server's current date and time.
*
*
*
chunkHighUSN
*
* The highest USN for any of the data objects represented
* in this sync chunk. If there are no objects in the chunk, this will not be
* set.
*
*
*
updateCount
*
* The total number of updates that have been performed in
* the service for this account. This is equal to the highest USN within the
* account at the point that this SyncChunk was generated. If updateCount
* and chunkHighUSN are identical, that means that this is the last chunk
* in the account ... there is no more recent information.
*
*
*
notes
*
* If present, this is a list of non-expunged notes that
* have a USN in this chunk. This will include notes that are "deleted"
* but not expunged (i.e. in the trash). The notes will include their list
* of tags and resources, but the resource content and recognition data
* will not be supplied.
*
*
*
notebooks
*
* If present, this is a list of non-expunged notebooks that
* have a USN in this chunk. This will include notebooks that are "deleted"
* but not expunged (i.e. in the trash).
*
*
*
tags
*
* If present, this is a list of the non-expunged tags that have a
* USN in this chunk.
*
*
*
searches
*
* If present, this is a list of non-expunged searches that
* have a USN in this chunk.
*
*
*
resources
*
* If present, this is a list of the non-expunged resources
* that have a USN in this chunk. This will include the metadata for each
* resource, but not its binary contents or recognition data, which must be
* retrieved separately.
*
*
*
expungedNotes
*
* If present, the GUIDs of all of the notes that were
* permanently expunged in this chunk.
*
*
*
expungedNotebooks
*
* If present, the GUIDs of all of the notebooks that
* were permanently expunged in this chunk. When a notebook is expunged,
* this implies that all of its child notes (and their resources) were
* also expunged.
*
*
*
expungedTags
*
* If present, the GUIDs of all of the tags that were
* permanently expunged in this chunk.
*
*
*
expungedSearches
*
* If present, the GUIDs of all of the saved searches
* that were permanently expunged in this chunk.
*
*
*
linkedNotebooks
*
* If present, this is a list of non-expunged LinkedNotebooks that
* have a USN in this chunk.
*
*
*
expungedLinkedNotebooks
*
* If present, the GUIDs of all of the LinkedNotebooks
* that were permanently expunged in this chunk.
*
*
*/
public class SyncChunk implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("SyncChunk");
private static final TField CURRENT_TIME_FIELD_DESC = new TField("currentTime", TType.I64, (short)1);
private static final TField CHUNK_HIGH_USN_FIELD_DESC = new TField("chunkHighUSN", TType.I32, (short)2);
private static final TField UPDATE_COUNT_FIELD_DESC = new TField("updateCount", TType.I32, (short)3);
private static final TField NOTES_FIELD_DESC = new TField("notes", TType.LIST, (short)4);
private static final TField NOTEBOOKS_FIELD_DESC = new TField("notebooks", TType.LIST, (short)5);
private static final TField TAGS_FIELD_DESC = new TField("tags", TType.LIST, (short)6);
private static final TField SEARCHES_FIELD_DESC = new TField("searches", TType.LIST, (short)7);
private static final TField RESOURCES_FIELD_DESC = new TField("resources", TType.LIST, (short)8);
private static final TField EXPUNGED_NOTES_FIELD_DESC = new TField("expungedNotes", TType.LIST, (short)9);
private static final TField EXPUNGED_NOTEBOOKS_FIELD_DESC = new TField("expungedNotebooks", TType.LIST, (short)10);
private static final TField EXPUNGED_TAGS_FIELD_DESC = new TField("expungedTags", TType.LIST, (short)11);
private static final TField EXPUNGED_SEARCHES_FIELD_DESC = new TField("expungedSearches", TType.LIST, (short)12);
private static final TField LINKED_NOTEBOOKS_FIELD_DESC = new TField("linkedNotebooks", TType.LIST, (short)13);
private static final TField EXPUNGED_LINKED_NOTEBOOKS_FIELD_DESC = new TField("expungedLinkedNotebooks", TType.LIST, (short)14);
private long currentTime;
private int chunkHighUSN;
private int updateCount;
private List notes;
private List notebooks;
private List tags;
private List searches;
private List resources;
private List expungedNotes;
private List expungedNotebooks;
private List expungedTags;
private List expungedSearches;
private List linkedNotebooks;
private List expungedLinkedNotebooks;
// isset id assignments
private static final int __CURRENTTIME_ISSET_ID = 0;
private static final int __CHUNKHIGHUSN_ISSET_ID = 1;
private static final int __UPDATECOUNT_ISSET_ID = 2;
private boolean[] __isset_vector = new boolean[3];
public SyncChunk() {
}
public SyncChunk(
long currentTime,
int updateCount)
{
this();
this.currentTime = currentTime;
setCurrentTimeIsSet(true);
this.updateCount = updateCount;
setUpdateCountIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public SyncChunk(SyncChunk other) {
System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
this.currentTime = other.currentTime;
this.chunkHighUSN = other.chunkHighUSN;
this.updateCount = other.updateCount;
if (other.isSetNotes()) {
List __this__notes = new ArrayList();
for (com.evernote.edam.type.Note other_element : other.notes) {
__this__notes.add(new com.evernote.edam.type.Note(other_element));
}
this.notes = __this__notes;
}
if (other.isSetNotebooks()) {
List __this__notebooks = new ArrayList();
for (com.evernote.edam.type.Notebook other_element : other.notebooks) {
__this__notebooks.add(new com.evernote.edam.type.Notebook(other_element));
}
this.notebooks = __this__notebooks;
}
if (other.isSetTags()) {
List __this__tags = new ArrayList();
for (com.evernote.edam.type.Tag other_element : other.tags) {
__this__tags.add(new com.evernote.edam.type.Tag(other_element));
}
this.tags = __this__tags;
}
if (other.isSetSearches()) {
List __this__searches = new ArrayList();
for (com.evernote.edam.type.SavedSearch other_element : other.searches) {
__this__searches.add(new com.evernote.edam.type.SavedSearch(other_element));
}
this.searches = __this__searches;
}
if (other.isSetResources()) {
List __this__resources = new ArrayList();
for (com.evernote.edam.type.Resource other_element : other.resources) {
__this__resources.add(new com.evernote.edam.type.Resource(other_element));
}
this.resources = __this__resources;
}
if (other.isSetExpungedNotes()) {
List __this__expungedNotes = new ArrayList();
for (String other_element : other.expungedNotes) {
__this__expungedNotes.add(other_element);
}
this.expungedNotes = __this__expungedNotes;
}
if (other.isSetExpungedNotebooks()) {
List __this__expungedNotebooks = new ArrayList();
for (String other_element : other.expungedNotebooks) {
__this__expungedNotebooks.add(other_element);
}
this.expungedNotebooks = __this__expungedNotebooks;
}
if (other.isSetExpungedTags()) {
List __this__expungedTags = new ArrayList();
for (String other_element : other.expungedTags) {
__this__expungedTags.add(other_element);
}
this.expungedTags = __this__expungedTags;
}
if (other.isSetExpungedSearches()) {
List __this__expungedSearches = new ArrayList();
for (String other_element : other.expungedSearches) {
__this__expungedSearches.add(other_element);
}
this.expungedSearches = __this__expungedSearches;
}
if (other.isSetLinkedNotebooks()) {
List __this__linkedNotebooks = new ArrayList();
for (com.evernote.edam.type.LinkedNotebook other_element : other.linkedNotebooks) {
__this__linkedNotebooks.add(new com.evernote.edam.type.LinkedNotebook(other_element));
}
this.linkedNotebooks = __this__linkedNotebooks;
}
if (other.isSetExpungedLinkedNotebooks()) {
List __this__expungedLinkedNotebooks = new ArrayList();
for (String other_element : other.expungedLinkedNotebooks) {
__this__expungedLinkedNotebooks.add(other_element);
}
this.expungedLinkedNotebooks = __this__expungedLinkedNotebooks;
}
}
public SyncChunk deepCopy() {
return new SyncChunk(this);
}
public void clear() {
setCurrentTimeIsSet(false);
this.currentTime = 0;
setChunkHighUSNIsSet(false);
this.chunkHighUSN = 0;
setUpdateCountIsSet(false);
this.updateCount = 0;
this.notes = null;
this.notebooks = null;
this.tags = null;
this.searches = null;
this.resources = null;
this.expungedNotes = null;
this.expungedNotebooks = null;
this.expungedTags = null;
this.expungedSearches = null;
this.linkedNotebooks = null;
this.expungedLinkedNotebooks = null;
}
public long getCurrentTime() {
return this.currentTime;
}
public void setCurrentTime(long currentTime) {
this.currentTime = currentTime;
setCurrentTimeIsSet(true);
}
public void unsetCurrentTime() {
__isset_vector[__CURRENTTIME_ISSET_ID] = false;
}
/** Returns true if field currentTime is set (has been asigned a value) and false otherwise */
public boolean isSetCurrentTime() {
return __isset_vector[__CURRENTTIME_ISSET_ID];
}
public void setCurrentTimeIsSet(boolean value) {
__isset_vector[__CURRENTTIME_ISSET_ID] = value;
}
public int getChunkHighUSN() {
return this.chunkHighUSN;
}
public void setChunkHighUSN(int chunkHighUSN) {
this.chunkHighUSN = chunkHighUSN;
setChunkHighUSNIsSet(true);
}
public void unsetChunkHighUSN() {
__isset_vector[__CHUNKHIGHUSN_ISSET_ID] = false;
}
/** Returns true if field chunkHighUSN is set (has been asigned a value) and false otherwise */
public boolean isSetChunkHighUSN() {
return __isset_vector[__CHUNKHIGHUSN_ISSET_ID];
}
public void setChunkHighUSNIsSet(boolean value) {
__isset_vector[__CHUNKHIGHUSN_ISSET_ID] = value;
}
public int getUpdateCount() {
return this.updateCount;
}
public void setUpdateCount(int updateCount) {
this.updateCount = updateCount;
setUpdateCountIsSet(true);
}
public void unsetUpdateCount() {
__isset_vector[__UPDATECOUNT_ISSET_ID] = false;
}
/** Returns true if field updateCount is set (has been asigned a value) and false otherwise */
public boolean isSetUpdateCount() {
return __isset_vector[__UPDATECOUNT_ISSET_ID];
}
public void setUpdateCountIsSet(boolean value) {
__isset_vector[__UPDATECOUNT_ISSET_ID] = value;
}
public int getNotesSize() {
return (this.notes == null) ? 0 : this.notes.size();
}
public java.util.Iterator getNotesIterator() {
return (this.notes == null) ? null : this.notes.iterator();
}
public void addToNotes(com.evernote.edam.type.Note elem) {
if (this.notes == null) {
this.notes = new ArrayList();
}
this.notes.add(elem);
}
public List getNotes() {
return this.notes;
}
public void setNotes(List notes) {
this.notes = notes;
}
public void unsetNotes() {
this.notes = null;
}
/** Returns true if field notes is set (has been asigned a value) and false otherwise */
public boolean isSetNotes() {
return this.notes != null;
}
public void setNotesIsSet(boolean value) {
if (!value) {
this.notes = null;
}
}
public int getNotebooksSize() {
return (this.notebooks == null) ? 0 : this.notebooks.size();
}
public java.util.Iterator getNotebooksIterator() {
return (this.notebooks == null) ? null : this.notebooks.iterator();
}
public void addToNotebooks(com.evernote.edam.type.Notebook elem) {
if (this.notebooks == null) {
this.notebooks = new ArrayList();
}
this.notebooks.add(elem);
}
public List getNotebooks() {
return this.notebooks;
}
public void setNotebooks(List notebooks) {
this.notebooks = notebooks;
}
public void unsetNotebooks() {
this.notebooks = null;
}
/** Returns true if field notebooks is set (has been asigned a value) and false otherwise */
public boolean isSetNotebooks() {
return this.notebooks != null;
}
public void setNotebooksIsSet(boolean value) {
if (!value) {
this.notebooks = null;
}
}
public int getTagsSize() {
return (this.tags == null) ? 0 : this.tags.size();
}
public java.util.Iterator getTagsIterator() {
return (this.tags == null) ? null : this.tags.iterator();
}
public void addToTags(com.evernote.edam.type.Tag elem) {
if (this.tags == null) {
this.tags = new ArrayList();
}
this.tags.add(elem);
}
public List getTags() {
return this.tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public void unsetTags() {
this.tags = null;
}
/** Returns true if field tags is set (has been asigned a value) and false otherwise */
public boolean isSetTags() {
return this.tags != null;
}
public void setTagsIsSet(boolean value) {
if (!value) {
this.tags = null;
}
}
public int getSearchesSize() {
return (this.searches == null) ? 0 : this.searches.size();
}
public java.util.Iterator getSearchesIterator() {
return (this.searches == null) ? null : this.searches.iterator();
}
public void addToSearches(com.evernote.edam.type.SavedSearch elem) {
if (this.searches == null) {
this.searches = new ArrayList();
}
this.searches.add(elem);
}
public List getSearches() {
return this.searches;
}
public void setSearches(List searches) {
this.searches = searches;
}
public void unsetSearches() {
this.searches = null;
}
/** Returns true if field searches is set (has been asigned a value) and false otherwise */
public boolean isSetSearches() {
return this.searches != null;
}
public void setSearchesIsSet(boolean value) {
if (!value) {
this.searches = null;
}
}
public int getResourcesSize() {
return (this.resources == null) ? 0 : this.resources.size();
}
public java.util.Iterator getResourcesIterator() {
return (this.resources == null) ? null : this.resources.iterator();
}
public void addToResources(com.evernote.edam.type.Resource elem) {
if (this.resources == null) {
this.resources = new ArrayList();
}
this.resources.add(elem);
}
public List getResources() {
return this.resources;
}
public void setResources(List resources) {
this.resources = resources;
}
public void unsetResources() {
this.resources = null;
}
/** Returns true if field resources is set (has been asigned a value) and false otherwise */
public boolean isSetResources() {
return this.resources != null;
}
public void setResourcesIsSet(boolean value) {
if (!value) {
this.resources = null;
}
}
public int getExpungedNotesSize() {
return (this.expungedNotes == null) ? 0 : this.expungedNotes.size();
}
public java.util.Iterator getExpungedNotesIterator() {
return (this.expungedNotes == null) ? null : this.expungedNotes.iterator();
}
public void addToExpungedNotes(String elem) {
if (this.expungedNotes == null) {
this.expungedNotes = new ArrayList();
}
this.expungedNotes.add(elem);
}
public List getExpungedNotes() {
return this.expungedNotes;
}
public void setExpungedNotes(List expungedNotes) {
this.expungedNotes = expungedNotes;
}
public void unsetExpungedNotes() {
this.expungedNotes = null;
}
/** Returns true if field expungedNotes is set (has been asigned a value) and false otherwise */
public boolean isSetExpungedNotes() {
return this.expungedNotes != null;
}
public void setExpungedNotesIsSet(boolean value) {
if (!value) {
this.expungedNotes = null;
}
}
public int getExpungedNotebooksSize() {
return (this.expungedNotebooks == null) ? 0 : this.expungedNotebooks.size();
}
public java.util.Iterator getExpungedNotebooksIterator() {
return (this.expungedNotebooks == null) ? null : this.expungedNotebooks.iterator();
}
public void addToExpungedNotebooks(String elem) {
if (this.expungedNotebooks == null) {
this.expungedNotebooks = new ArrayList();
}
this.expungedNotebooks.add(elem);
}
public List getExpungedNotebooks() {
return this.expungedNotebooks;
}
public void setExpungedNotebooks(List expungedNotebooks) {
this.expungedNotebooks = expungedNotebooks;
}
public void unsetExpungedNotebooks() {
this.expungedNotebooks = null;
}
/** Returns true if field expungedNotebooks is set (has been asigned a value) and false otherwise */
public boolean isSetExpungedNotebooks() {
return this.expungedNotebooks != null;
}
public void setExpungedNotebooksIsSet(boolean value) {
if (!value) {
this.expungedNotebooks = null;
}
}
public int getExpungedTagsSize() {
return (this.expungedTags == null) ? 0 : this.expungedTags.size();
}
public java.util.Iterator getExpungedTagsIterator() {
return (this.expungedTags == null) ? null : this.expungedTags.iterator();
}
public void addToExpungedTags(String elem) {
if (this.expungedTags == null) {
this.expungedTags = new ArrayList();
}
this.expungedTags.add(elem);
}
public List getExpungedTags() {
return this.expungedTags;
}
public void setExpungedTags(List expungedTags) {
this.expungedTags = expungedTags;
}
public void unsetExpungedTags() {
this.expungedTags = null;
}
/** Returns true if field expungedTags is set (has been asigned a value) and false otherwise */
public boolean isSetExpungedTags() {
return this.expungedTags != null;
}
public void setExpungedTagsIsSet(boolean value) {
if (!value) {
this.expungedTags = null;
}
}
public int getExpungedSearchesSize() {
return (this.expungedSearches == null) ? 0 : this.expungedSearches.size();
}
public java.util.Iterator getExpungedSearchesIterator() {
return (this.expungedSearches == null) ? null : this.expungedSearches.iterator();
}
public void addToExpungedSearches(String elem) {
if (this.expungedSearches == null) {
this.expungedSearches = new ArrayList();
}
this.expungedSearches.add(elem);
}
public List getExpungedSearches() {
return this.expungedSearches;
}
public void setExpungedSearches(List expungedSearches) {
this.expungedSearches = expungedSearches;
}
public void unsetExpungedSearches() {
this.expungedSearches = null;
}
/** Returns true if field expungedSearches is set (has been asigned a value) and false otherwise */
public boolean isSetExpungedSearches() {
return this.expungedSearches != null;
}
public void setExpungedSearchesIsSet(boolean value) {
if (!value) {
this.expungedSearches = null;
}
}
public int getLinkedNotebooksSize() {
return (this.linkedNotebooks == null) ? 0 : this.linkedNotebooks.size();
}
public java.util.Iterator getLinkedNotebooksIterator() {
return (this.linkedNotebooks == null) ? null : this.linkedNotebooks.iterator();
}
public void addToLinkedNotebooks(com.evernote.edam.type.LinkedNotebook elem) {
if (this.linkedNotebooks == null) {
this.linkedNotebooks = new ArrayList();
}
this.linkedNotebooks.add(elem);
}
public List getLinkedNotebooks() {
return this.linkedNotebooks;
}
public void setLinkedNotebooks(List linkedNotebooks) {
this.linkedNotebooks = linkedNotebooks;
}
public void unsetLinkedNotebooks() {
this.linkedNotebooks = null;
}
/** Returns true if field linkedNotebooks is set (has been asigned a value) and false otherwise */
public boolean isSetLinkedNotebooks() {
return this.linkedNotebooks != null;
}
public void setLinkedNotebooksIsSet(boolean value) {
if (!value) {
this.linkedNotebooks = null;
}
}
public int getExpungedLinkedNotebooksSize() {
return (this.expungedLinkedNotebooks == null) ? 0 : this.expungedLinkedNotebooks.size();
}
public java.util.Iterator getExpungedLinkedNotebooksIterator() {
return (this.expungedLinkedNotebooks == null) ? null : this.expungedLinkedNotebooks.iterator();
}
public void addToExpungedLinkedNotebooks(String elem) {
if (this.expungedLinkedNotebooks == null) {
this.expungedLinkedNotebooks = new ArrayList();
}
this.expungedLinkedNotebooks.add(elem);
}
public List getExpungedLinkedNotebooks() {
return this.expungedLinkedNotebooks;
}
public void setExpungedLinkedNotebooks(List expungedLinkedNotebooks) {
this.expungedLinkedNotebooks = expungedLinkedNotebooks;
}
public void unsetExpungedLinkedNotebooks() {
this.expungedLinkedNotebooks = null;
}
/** Returns true if field expungedLinkedNotebooks is set (has been asigned a value) and false otherwise */
public boolean isSetExpungedLinkedNotebooks() {
return this.expungedLinkedNotebooks != null;
}
public void setExpungedLinkedNotebooksIsSet(boolean value) {
if (!value) {
this.expungedLinkedNotebooks = null;
}
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof SyncChunk)
return this.equals((SyncChunk)that);
return false;
}
public boolean equals(SyncChunk that) {
if (that == null)
return false;
boolean this_present_currentTime = true;
boolean that_present_currentTime = true;
if (this_present_currentTime || that_present_currentTime) {
if (!(this_present_currentTime && that_present_currentTime))
return false;
if (this.currentTime != that.currentTime)
return false;
}
boolean this_present_chunkHighUSN = true && this.isSetChunkHighUSN();
boolean that_present_chunkHighUSN = true && that.isSetChunkHighUSN();
if (this_present_chunkHighUSN || that_present_chunkHighUSN) {
if (!(this_present_chunkHighUSN && that_present_chunkHighUSN))
return false;
if (this.chunkHighUSN != that.chunkHighUSN)
return false;
}
boolean this_present_updateCount = true;
boolean that_present_updateCount = true;
if (this_present_updateCount || that_present_updateCount) {
if (!(this_present_updateCount && that_present_updateCount))
return false;
if (this.updateCount != that.updateCount)
return false;
}
boolean this_present_notes = true && this.isSetNotes();
boolean that_present_notes = true && that.isSetNotes();
if (this_present_notes || that_present_notes) {
if (!(this_present_notes && that_present_notes))
return false;
if (!this.notes.equals(that.notes))
return false;
}
boolean this_present_notebooks = true && this.isSetNotebooks();
boolean that_present_notebooks = true && that.isSetNotebooks();
if (this_present_notebooks || that_present_notebooks) {
if (!(this_present_notebooks && that_present_notebooks))
return false;
if (!this.notebooks.equals(that.notebooks))
return false;
}
boolean this_present_tags = true && this.isSetTags();
boolean that_present_tags = true && that.isSetTags();
if (this_present_tags || that_present_tags) {
if (!(this_present_tags && that_present_tags))
return false;
if (!this.tags.equals(that.tags))
return false;
}
boolean this_present_searches = true && this.isSetSearches();
boolean that_present_searches = true && that.isSetSearches();
if (this_present_searches || that_present_searches) {
if (!(this_present_searches && that_present_searches))
return false;
if (!this.searches.equals(that.searches))
return false;
}
boolean this_present_resources = true && this.isSetResources();
boolean that_present_resources = true && that.isSetResources();
if (this_present_resources || that_present_resources) {
if (!(this_present_resources && that_present_resources))
return false;
if (!this.resources.equals(that.resources))
return false;
}
boolean this_present_expungedNotes = true && this.isSetExpungedNotes();
boolean that_present_expungedNotes = true && that.isSetExpungedNotes();
if (this_present_expungedNotes || that_present_expungedNotes) {
if (!(this_present_expungedNotes && that_present_expungedNotes))
return false;
if (!this.expungedNotes.equals(that.expungedNotes))
return false;
}
boolean this_present_expungedNotebooks = true && this.isSetExpungedNotebooks();
boolean that_present_expungedNotebooks = true && that.isSetExpungedNotebooks();
if (this_present_expungedNotebooks || that_present_expungedNotebooks) {
if (!(this_present_expungedNotebooks && that_present_expungedNotebooks))
return false;
if (!this.expungedNotebooks.equals(that.expungedNotebooks))
return false;
}
boolean this_present_expungedTags = true && this.isSetExpungedTags();
boolean that_present_expungedTags = true && that.isSetExpungedTags();
if (this_present_expungedTags || that_present_expungedTags) {
if (!(this_present_expungedTags && that_present_expungedTags))
return false;
if (!this.expungedTags.equals(that.expungedTags))
return false;
}
boolean this_present_expungedSearches = true && this.isSetExpungedSearches();
boolean that_present_expungedSearches = true && that.isSetExpungedSearches();
if (this_present_expungedSearches || that_present_expungedSearches) {
if (!(this_present_expungedSearches && that_present_expungedSearches))
return false;
if (!this.expungedSearches.equals(that.expungedSearches))
return false;
}
boolean this_present_linkedNotebooks = true && this.isSetLinkedNotebooks();
boolean that_present_linkedNotebooks = true && that.isSetLinkedNotebooks();
if (this_present_linkedNotebooks || that_present_linkedNotebooks) {
if (!(this_present_linkedNotebooks && that_present_linkedNotebooks))
return false;
if (!this.linkedNotebooks.equals(that.linkedNotebooks))
return false;
}
boolean this_present_expungedLinkedNotebooks = true && this.isSetExpungedLinkedNotebooks();
boolean that_present_expungedLinkedNotebooks = true && that.isSetExpungedLinkedNotebooks();
if (this_present_expungedLinkedNotebooks || that_present_expungedLinkedNotebooks) {
if (!(this_present_expungedLinkedNotebooks && that_present_expungedLinkedNotebooks))
return false;
if (!this.expungedLinkedNotebooks.equals(that.expungedLinkedNotebooks))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(SyncChunk other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
SyncChunk typedOther = (SyncChunk)other;
lastComparison = Boolean.valueOf(isSetCurrentTime()).compareTo(typedOther.isSetCurrentTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCurrentTime()) { lastComparison = TBaseHelper.compareTo(this.currentTime, typedOther.currentTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetChunkHighUSN()).compareTo(typedOther.isSetChunkHighUSN());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetChunkHighUSN()) { lastComparison = TBaseHelper.compareTo(this.chunkHighUSN, typedOther.chunkHighUSN);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUpdateCount()).compareTo(typedOther.isSetUpdateCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpdateCount()) { lastComparison = TBaseHelper.compareTo(this.updateCount, typedOther.updateCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNotes()).compareTo(typedOther.isSetNotes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNotes()) { lastComparison = TBaseHelper.compareTo(this.notes, typedOther.notes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNotebooks()).compareTo(typedOther.isSetNotebooks());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNotebooks()) { lastComparison = TBaseHelper.compareTo(this.notebooks, typedOther.notebooks);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTags()).compareTo(typedOther.isSetTags());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTags()) { lastComparison = TBaseHelper.compareTo(this.tags, typedOther.tags);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSearches()).compareTo(typedOther.isSetSearches());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSearches()) { lastComparison = TBaseHelper.compareTo(this.searches, typedOther.searches);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetResources()).compareTo(typedOther.isSetResources());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResources()) { lastComparison = TBaseHelper.compareTo(this.resources, typedOther.resources);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExpungedNotes()).compareTo(typedOther.isSetExpungedNotes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpungedNotes()) { lastComparison = TBaseHelper.compareTo(this.expungedNotes, typedOther.expungedNotes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExpungedNotebooks()).compareTo(typedOther.isSetExpungedNotebooks());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpungedNotebooks()) { lastComparison = TBaseHelper.compareTo(this.expungedNotebooks, typedOther.expungedNotebooks);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExpungedTags()).compareTo(typedOther.isSetExpungedTags());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpungedTags()) { lastComparison = TBaseHelper.compareTo(this.expungedTags, typedOther.expungedTags);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExpungedSearches()).compareTo(typedOther.isSetExpungedSearches());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpungedSearches()) { lastComparison = TBaseHelper.compareTo(this.expungedSearches, typedOther.expungedSearches);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLinkedNotebooks()).compareTo(typedOther.isSetLinkedNotebooks());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLinkedNotebooks()) { lastComparison = TBaseHelper.compareTo(this.linkedNotebooks, typedOther.linkedNotebooks);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetExpungedLinkedNotebooks()).compareTo(typedOther.isSetExpungedLinkedNotebooks());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpungedLinkedNotebooks()) { lastComparison = TBaseHelper.compareTo(this.expungedLinkedNotebooks, typedOther.expungedLinkedNotebooks);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case 1: // CURRENT_TIME
if (field.type == TType.I64) {
this.currentTime = iprot.readI64();
setCurrentTimeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // CHUNK_HIGH_USN
if (field.type == TType.I32) {
this.chunkHighUSN = iprot.readI32();
setChunkHighUSNIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // UPDATE_COUNT
if (field.type == TType.I32) {
this.updateCount = iprot.readI32();
setUpdateCountIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // NOTES
if (field.type == TType.LIST) {
{
TList _list0 = iprot.readListBegin();
this.notes = new ArrayList(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
com.evernote.edam.type.Note _elem2;
_elem2 = new com.evernote.edam.type.Note();
_elem2.read(iprot);
this.notes.add(_elem2);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 5: // NOTEBOOKS
if (field.type == TType.LIST) {
{
TList _list3 = iprot.readListBegin();
this.notebooks = new ArrayList(_list3.size);
for (int _i4 = 0; _i4 < _list3.size; ++_i4)
{
com.evernote.edam.type.Notebook _elem5;
_elem5 = new com.evernote.edam.type.Notebook();
_elem5.read(iprot);
this.notebooks.add(_elem5);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 6: // TAGS
if (field.type == TType.LIST) {
{
TList _list6 = iprot.readListBegin();
this.tags = new ArrayList(_list6.size);
for (int _i7 = 0; _i7 < _list6.size; ++_i7)
{
com.evernote.edam.type.Tag _elem8;
_elem8 = new com.evernote.edam.type.Tag();
_elem8.read(iprot);
this.tags.add(_elem8);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 7: // SEARCHES
if (field.type == TType.LIST) {
{
TList _list9 = iprot.readListBegin();
this.searches = new ArrayList(_list9.size);
for (int _i10 = 0; _i10 < _list9.size; ++_i10)
{
com.evernote.edam.type.SavedSearch _elem11;
_elem11 = new com.evernote.edam.type.SavedSearch();
_elem11.read(iprot);
this.searches.add(_elem11);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 8: // RESOURCES
if (field.type == TType.LIST) {
{
TList _list12 = iprot.readListBegin();
this.resources = new ArrayList(_list12.size);
for (int _i13 = 0; _i13 < _list12.size; ++_i13)
{
com.evernote.edam.type.Resource _elem14;
_elem14 = new com.evernote.edam.type.Resource();
_elem14.read(iprot);
this.resources.add(_elem14);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 9: // EXPUNGED_NOTES
if (field.type == TType.LIST) {
{
TList _list15 = iprot.readListBegin();
this.expungedNotes = new ArrayList(_list15.size);
for (int _i16 = 0; _i16 < _list15.size; ++_i16)
{
String _elem17;
_elem17 = iprot.readString();
this.expungedNotes.add(_elem17);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 10: // EXPUNGED_NOTEBOOKS
if (field.type == TType.LIST) {
{
TList _list18 = iprot.readListBegin();
this.expungedNotebooks = new ArrayList(_list18.size);
for (int _i19 = 0; _i19 < _list18.size; ++_i19)
{
String _elem20;
_elem20 = iprot.readString();
this.expungedNotebooks.add(_elem20);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 11: // EXPUNGED_TAGS
if (field.type == TType.LIST) {
{
TList _list21 = iprot.readListBegin();
this.expungedTags = new ArrayList(_list21.size);
for (int _i22 = 0; _i22 < _list21.size; ++_i22)
{
String _elem23;
_elem23 = iprot.readString();
this.expungedTags.add(_elem23);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 12: // EXPUNGED_SEARCHES
if (field.type == TType.LIST) {
{
TList _list24 = iprot.readListBegin();
this.expungedSearches = new ArrayList(_list24.size);
for (int _i25 = 0; _i25 < _list24.size; ++_i25)
{
String _elem26;
_elem26 = iprot.readString();
this.expungedSearches.add(_elem26);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 13: // LINKED_NOTEBOOKS
if (field.type == TType.LIST) {
{
TList _list27 = iprot.readListBegin();
this.linkedNotebooks = new ArrayList(_list27.size);
for (int _i28 = 0; _i28 < _list27.size; ++_i28)
{
com.evernote.edam.type.LinkedNotebook _elem29;
_elem29 = new com.evernote.edam.type.LinkedNotebook();
_elem29.read(iprot);
this.linkedNotebooks.add(_elem29);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 14: // EXPUNGED_LINKED_NOTEBOOKS
if (field.type == TType.LIST) {
{
TList _list30 = iprot.readListBegin();
this.expungedLinkedNotebooks = new ArrayList(_list30.size);
for (int _i31 = 0; _i31 < _list30.size; ++_i31)
{
String _elem32;
_elem32 = iprot.readString();
this.expungedLinkedNotebooks.add(_elem32);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
validate();
}
public void write(TProtocol oprot) throws TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(CURRENT_TIME_FIELD_DESC);
oprot.writeI64(this.currentTime);
oprot.writeFieldEnd();
if (isSetChunkHighUSN()) {
oprot.writeFieldBegin(CHUNK_HIGH_USN_FIELD_DESC);
oprot.writeI32(this.chunkHighUSN);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(UPDATE_COUNT_FIELD_DESC);
oprot.writeI32(this.updateCount);
oprot.writeFieldEnd();
if (this.notes != null) {
if (isSetNotes()) {
oprot.writeFieldBegin(NOTES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.notes.size()));
for (com.evernote.edam.type.Note _iter33 : this.notes)
{
_iter33.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.notebooks != null) {
if (isSetNotebooks()) {
oprot.writeFieldBegin(NOTEBOOKS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.notebooks.size()));
for (com.evernote.edam.type.Notebook _iter34 : this.notebooks)
{
_iter34.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.tags != null) {
if (isSetTags()) {
oprot.writeFieldBegin(TAGS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.tags.size()));
for (com.evernote.edam.type.Tag _iter35 : this.tags)
{
_iter35.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.searches != null) {
if (isSetSearches()) {
oprot.writeFieldBegin(SEARCHES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.searches.size()));
for (com.evernote.edam.type.SavedSearch _iter36 : this.searches)
{
_iter36.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.resources != null) {
if (isSetResources()) {
oprot.writeFieldBegin(RESOURCES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.resources.size()));
for (com.evernote.edam.type.Resource _iter37 : this.resources)
{
_iter37.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.expungedNotes != null) {
if (isSetExpungedNotes()) {
oprot.writeFieldBegin(EXPUNGED_NOTES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.expungedNotes.size()));
for (String _iter38 : this.expungedNotes)
{
oprot.writeString(_iter38);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.expungedNotebooks != null) {
if (isSetExpungedNotebooks()) {
oprot.writeFieldBegin(EXPUNGED_NOTEBOOKS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.expungedNotebooks.size()));
for (String _iter39 : this.expungedNotebooks)
{
oprot.writeString(_iter39);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.expungedTags != null) {
if (isSetExpungedTags()) {
oprot.writeFieldBegin(EXPUNGED_TAGS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.expungedTags.size()));
for (String _iter40 : this.expungedTags)
{
oprot.writeString(_iter40);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.expungedSearches != null) {
if (isSetExpungedSearches()) {
oprot.writeFieldBegin(EXPUNGED_SEARCHES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.expungedSearches.size()));
for (String _iter41 : this.expungedSearches)
{
oprot.writeString(_iter41);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.linkedNotebooks != null) {
if (isSetLinkedNotebooks()) {
oprot.writeFieldBegin(LINKED_NOTEBOOKS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.linkedNotebooks.size()));
for (com.evernote.edam.type.LinkedNotebook _iter42 : this.linkedNotebooks)
{
_iter42.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.expungedLinkedNotebooks != null) {
if (isSetExpungedLinkedNotebooks()) {
oprot.writeFieldBegin(EXPUNGED_LINKED_NOTEBOOKS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.expungedLinkedNotebooks.size()));
for (String _iter43 : this.expungedLinkedNotebooks)
{
oprot.writeString(_iter43);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("SyncChunk(");
boolean first = true;
sb.append("currentTime:");
sb.append(this.currentTime);
first = false;
if (isSetChunkHighUSN()) {
if (!first) sb.append(", ");
sb.append("chunkHighUSN:");
sb.append(this.chunkHighUSN);
first = false;
}
if (!first) sb.append(", ");
sb.append("updateCount:");
sb.append(this.updateCount);
first = false;
if (isSetNotes()) {
if (!first) sb.append(", ");
sb.append("notes:");
if (this.notes == null) {
sb.append("null");
} else {
sb.append(this.notes);
}
first = false;
}
if (isSetNotebooks()) {
if (!first) sb.append(", ");
sb.append("notebooks:");
if (this.notebooks == null) {
sb.append("null");
} else {
sb.append(this.notebooks);
}
first = false;
}
if (isSetTags()) {
if (!first) sb.append(", ");
sb.append("tags:");
if (this.tags == null) {
sb.append("null");
} else {
sb.append(this.tags);
}
first = false;
}
if (isSetSearches()) {
if (!first) sb.append(", ");
sb.append("searches:");
if (this.searches == null) {
sb.append("null");
} else {
sb.append(this.searches);
}
first = false;
}
if (isSetResources()) {
if (!first) sb.append(", ");
sb.append("resources:");
if (this.resources == null) {
sb.append("null");
} else {
sb.append(this.resources);
}
first = false;
}
if (isSetExpungedNotes()) {
if (!first) sb.append(", ");
sb.append("expungedNotes:");
if (this.expungedNotes == null) {
sb.append("null");
} else {
sb.append(this.expungedNotes);
}
first = false;
}
if (isSetExpungedNotebooks()) {
if (!first) sb.append(", ");
sb.append("expungedNotebooks:");
if (this.expungedNotebooks == null) {
sb.append("null");
} else {
sb.append(this.expungedNotebooks);
}
first = false;
}
if (isSetExpungedTags()) {
if (!first) sb.append(", ");
sb.append("expungedTags:");
if (this.expungedTags == null) {
sb.append("null");
} else {
sb.append(this.expungedTags);
}
first = false;
}
if (isSetExpungedSearches()) {
if (!first) sb.append(", ");
sb.append("expungedSearches:");
if (this.expungedSearches == null) {
sb.append("null");
} else {
sb.append(this.expungedSearches);
}
first = false;
}
if (isSetLinkedNotebooks()) {
if (!first) sb.append(", ");
sb.append("linkedNotebooks:");
if (this.linkedNotebooks == null) {
sb.append("null");
} else {
sb.append(this.linkedNotebooks);
}
first = false;
}
if (isSetExpungedLinkedNotebooks()) {
if (!first) sb.append(", ");
sb.append("expungedLinkedNotebooks:");
if (this.expungedLinkedNotebooks == null) {
sb.append("null");
} else {
sb.append(this.expungedLinkedNotebooks);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
if (!isSetCurrentTime()) {
throw new TProtocolException("Required field 'currentTime' is unset! Struct:" + toString());
}
if (!isSetUpdateCount()) {
throw new TProtocolException("Required field 'updateCount' is unset! Struct:" + toString());
}
}
}