com.evernote.edam.type.NoteAttributes Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package com.evernote.edam.type;
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.*;
/**
* The list of optional attributes that can be stored on a note.
*
* - subjectDate
* - time that the note refers to
*
*
* - latitude
* - the latitude where the note was taken
*
*
* - longitude
* - the longitude where the note was taken
*
*
* - altitude
* - the altitude where the note was taken
*
*
* - author
* - the author of the content of the note
*
* Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
*
*
* - source
* - the method that the note was added to the account, if the
* note wasn't directly authored in an Evernote desktop client.
*
* Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
*
*
* - sourceURL
* - the original location where the resource was hosted. For web clips,
* this will be the URL of the page that was clipped.
*
* Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
*
*
* - sourceApplication
* - an identifying string for the application that
* created this note. This string does not have a guaranteed syntax or
* structure -- it is intended for human inspection and tracking.
*
* Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
*
*
* - shareDate
* - The date and time when this note was directly shared via its own URL.
* This is only set on notes that were individually shared - it is independent
* of any notebook-level sharing of the containing notebook. This field
* is treated as "read-only" for clients; the server will ignore changes
* to this field from an external client.
*
*
* - reminderOrder
* - The set of notes with this parameter set are considered
* "reminders" and are to be treated specially by clients to give them
* higher UI prominence within a notebook. The value is used to sort
* the reminder notes within the notebook with higher values
* representing greater prominence. Outside of the context of a
* notebook, the value of this parameter is undefined. The value is
* not intended to be compared to the values of reminder notes in
* other notebooks. In order to allow clients to place a note at a
* higher precedence than other notes, you should never set a value
* greater than the current time (as defined for a Timetstamp). To
* place a note at higher precedence than existing notes, set the
* value to the current time as defined for a timestamp (milliseconds
* since the epoch). Synchronizing clients must remember the time when
* the update was performed, using the local clock on the client,
* and use that value when they later upload the note to the service.
* Clients must not set the reminderOrder to the reminderTime as the
* reminderTime could be in the future. Those two fields are never
* intended to be related. The correct value for reminderOrder field
* for new notes is the "current" time when the user indicated that
* the note is a reminder. Clients may implement a separate
* "sort by date" feature to show notes ordered by reminderTime.
* Whenever a reminderDoneTime or reminderTime is set but a
* reminderOrder is not set, the server will fill in the current
* server time for the reminderOrder field.
*
* - reminderDoneTime
* - The date and time when a user dismissed/"marked done" the reminder
* on the note. Users typically do not manually set this value directly
* as it is set to the time when the user dismissed/"marked done" the
* reminder.
*
* - reminderTime
* - The date and time a user has selected to be reminded of the note.
* A note with this value set is known as a "reminder" and the user can
* be reminded, via e-mail or client-specific notifications, of the note
* when the time is reached or about to be reached. When a user sets
* a reminder time on a note that has a reminder done time, and that
* reminder time is in the future, then the reminder done time should be
* cleared. This should happen regardless of any existing reminder time
* that may have previously existed on the note.
*
* - placeName
* - Allows the user to assign a human-readable location name associated
* with a note. Users may assign values like 'Home' and 'Work'. Place
* names may also be populated with values from geonames database
* (e.g., a restaurant name). Applications are encouraged to normalize values
* so that grouping values by place name provides a useful result. Applications
* MUST NOT automatically add place name values based on geolocation without
* confirmation from the user; that is, the value in this field should be
* more useful than a simple automated lookup based on the note's latitude
* and longitude.
*
* - contentClass
* - The class (or type) of note. This field is used to indicate to
* clients that special structured information is represented within
* the note such that special rules apply when making
* modifications. If contentClass is set and the client
* application does not specifically support the specified class,
* the client MUST treat the note as read-only. In this case, the
* client MAY modify the note's notebook and tags via the
* Note.notebookGuid and Note.tagGuids fields. The client MAY also
* modify the reminderOrder field as well as the reminderTime and
* reminderDoneTime fields.
*
Applications should set contentClass only when they are creating notes
* that contain structured information that needs to be maintained in order
* for the user to be able to use the note within that application.
* Setting contentClass makes a note read-only in other applications, so
* there is a trade-off when an application chooses to use contentClass.
* Applications that set contentClass when creating notes must use a contentClass
* string of the form CompanyName.ApplicationName to ensure uniqueness.
* Length restrictions: EDAM_NOTE_CONTENT_CLASS_LEN_MIN, EDAM_NOTE_CONTENT_CLASS_LEN_MAX
*
* Regex: EDAM_NOTE_CONTENT_CLASS_REGEX
*
*
* - applicationData
* - Provides a location for applications to store a relatively small
* (4kb) blob of data that is not meant to be visible to the user and
* that is opaque to the Evernote service. A single application may use at most
* one entry in this map, using its API consumer key as the map key. See the
* documentation for LazyMap for a description of when the actual map values
* are returned by the service.
*
To safely add or modify your application's entry in the map, use
* NoteStore.setNoteApplicationDataEntry. To safely remove your application's
* entry from the map, use NoteStore.unsetNoteApplicationDataEntry.
* Minimum length of a name (key): EDAM_APPLICATIONDATA_NAME_LEN_MIN
*
* Sum max size of key and value: EDAM_APPLICATIONDATA_ENTRY_LEN_MAX
*
* Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX
*
*
* - creatorId
* - The numeric user ID of the user who originally created the note.
*
* - lastEditedBy
* - An indication of who made the last change to the note. If you are
* accessing the note via a shared notebook to which you have modification
* rights, or if you are the owner of the notebook to which the note belongs,
* then you have access to the value. In this case, the value will be
* unset if the owner of the notebook containing the note was the last to
* make the modification, else it will be a string describing the
* guest who made the last edit. If you do not have access to this value,
* it will be left unset. This field is read-only by clients. The server
* will ignore all values set by clients into this field.
*
* - lastEditorId
* - The numeric user ID of the user described in lastEditedBy.
*
* - classifications
* - A map of classifications applied to the note by clients or by the
* Evernote service. The key is the string name of the classification type,
* and the value is a constant that begins with CLASSIFICATION_.
*
*
*/
public class NoteAttributes implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("NoteAttributes");
private static final TField SUBJECT_DATE_FIELD_DESC = new TField("subjectDate", TType.I64, (short)1);
private static final TField LATITUDE_FIELD_DESC = new TField("latitude", TType.DOUBLE, (short)10);
private static final TField LONGITUDE_FIELD_DESC = new TField("longitude", TType.DOUBLE, (short)11);
private static final TField ALTITUDE_FIELD_DESC = new TField("altitude", TType.DOUBLE, (short)12);
private static final TField AUTHOR_FIELD_DESC = new TField("author", TType.STRING, (short)13);
private static final TField SOURCE_FIELD_DESC = new TField("source", TType.STRING, (short)14);
private static final TField SOURCE_URL_FIELD_DESC = new TField("sourceURL", TType.STRING, (short)15);
private static final TField SOURCE_APPLICATION_FIELD_DESC = new TField("sourceApplication", TType.STRING, (short)16);
private static final TField SHARE_DATE_FIELD_DESC = new TField("shareDate", TType.I64, (short)17);
private static final TField REMINDER_ORDER_FIELD_DESC = new TField("reminderOrder", TType.I64, (short)18);
private static final TField REMINDER_DONE_TIME_FIELD_DESC = new TField("reminderDoneTime", TType.I64, (short)19);
private static final TField REMINDER_TIME_FIELD_DESC = new TField("reminderTime", TType.I64, (short)20);
private static final TField PLACE_NAME_FIELD_DESC = new TField("placeName", TType.STRING, (short)21);
private static final TField CONTENT_CLASS_FIELD_DESC = new TField("contentClass", TType.STRING, (short)22);
private static final TField APPLICATION_DATA_FIELD_DESC = new TField("applicationData", TType.STRUCT, (short)23);
private static final TField LAST_EDITED_BY_FIELD_DESC = new TField("lastEditedBy", TType.STRING, (short)24);
private static final TField CLASSIFICATIONS_FIELD_DESC = new TField("classifications", TType.MAP, (short)26);
private static final TField CREATOR_ID_FIELD_DESC = new TField("creatorId", TType.I32, (short)27);
private static final TField LAST_EDITOR_ID_FIELD_DESC = new TField("lastEditorId", TType.I32, (short)28);
private long subjectDate;
private double latitude;
private double longitude;
private double altitude;
private String author;
private String source;
private String sourceURL;
private String sourceApplication;
private long shareDate;
private long reminderOrder;
private long reminderDoneTime;
private long reminderTime;
private String placeName;
private String contentClass;
private LazyMap applicationData;
private String lastEditedBy;
private Map classifications;
private int creatorId;
private int lastEditorId;
// isset id assignments
private static final int __SUBJECTDATE_ISSET_ID = 0;
private static final int __LATITUDE_ISSET_ID = 1;
private static final int __LONGITUDE_ISSET_ID = 2;
private static final int __ALTITUDE_ISSET_ID = 3;
private static final int __SHAREDATE_ISSET_ID = 4;
private static final int __REMINDERORDER_ISSET_ID = 5;
private static final int __REMINDERDONETIME_ISSET_ID = 6;
private static final int __REMINDERTIME_ISSET_ID = 7;
private static final int __CREATORID_ISSET_ID = 8;
private static final int __LASTEDITORID_ISSET_ID = 9;
private boolean[] __isset_vector = new boolean[10];
public NoteAttributes() {
}
/**
* Performs a deep copy on other.
*/
public NoteAttributes(NoteAttributes other) {
System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
this.subjectDate = other.subjectDate;
this.latitude = other.latitude;
this.longitude = other.longitude;
this.altitude = other.altitude;
if (other.isSetAuthor()) {
this.author = other.author;
}
if (other.isSetSource()) {
this.source = other.source;
}
if (other.isSetSourceURL()) {
this.sourceURL = other.sourceURL;
}
if (other.isSetSourceApplication()) {
this.sourceApplication = other.sourceApplication;
}
this.shareDate = other.shareDate;
this.reminderOrder = other.reminderOrder;
this.reminderDoneTime = other.reminderDoneTime;
this.reminderTime = other.reminderTime;
if (other.isSetPlaceName()) {
this.placeName = other.placeName;
}
if (other.isSetContentClass()) {
this.contentClass = other.contentClass;
}
if (other.isSetApplicationData()) {
this.applicationData = new LazyMap(other.applicationData);
}
if (other.isSetLastEditedBy()) {
this.lastEditedBy = other.lastEditedBy;
}
if (other.isSetClassifications()) {
Map __this__classifications = new HashMap();
for (Map.Entry other_element : other.classifications.entrySet()) {
String other_element_key = other_element.getKey();
String other_element_value = other_element.getValue();
String __this__classifications_copy_key = other_element_key;
String __this__classifications_copy_value = other_element_value;
__this__classifications.put(__this__classifications_copy_key, __this__classifications_copy_value);
}
this.classifications = __this__classifications;
}
this.creatorId = other.creatorId;
this.lastEditorId = other.lastEditorId;
}
public NoteAttributes deepCopy() {
return new NoteAttributes(this);
}
public void clear() {
setSubjectDateIsSet(false);
this.subjectDate = 0;
setLatitudeIsSet(false);
this.latitude = 0.0;
setLongitudeIsSet(false);
this.longitude = 0.0;
setAltitudeIsSet(false);
this.altitude = 0.0;
this.author = null;
this.source = null;
this.sourceURL = null;
this.sourceApplication = null;
setShareDateIsSet(false);
this.shareDate = 0;
setReminderOrderIsSet(false);
this.reminderOrder = 0;
setReminderDoneTimeIsSet(false);
this.reminderDoneTime = 0;
setReminderTimeIsSet(false);
this.reminderTime = 0;
this.placeName = null;
this.contentClass = null;
this.applicationData = null;
this.lastEditedBy = null;
this.classifications = null;
setCreatorIdIsSet(false);
this.creatorId = 0;
setLastEditorIdIsSet(false);
this.lastEditorId = 0;
}
public long getSubjectDate() {
return this.subjectDate;
}
public void setSubjectDate(long subjectDate) {
this.subjectDate = subjectDate;
setSubjectDateIsSet(true);
}
public void unsetSubjectDate() {
__isset_vector[__SUBJECTDATE_ISSET_ID] = false;
}
/** Returns true if field subjectDate is set (has been asigned a value) and false otherwise */
public boolean isSetSubjectDate() {
return __isset_vector[__SUBJECTDATE_ISSET_ID];
}
public void setSubjectDateIsSet(boolean value) {
__isset_vector[__SUBJECTDATE_ISSET_ID] = value;
}
public double getLatitude() {
return this.latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
setLatitudeIsSet(true);
}
public void unsetLatitude() {
__isset_vector[__LATITUDE_ISSET_ID] = false;
}
/** Returns true if field latitude is set (has been asigned a value) and false otherwise */
public boolean isSetLatitude() {
return __isset_vector[__LATITUDE_ISSET_ID];
}
public void setLatitudeIsSet(boolean value) {
__isset_vector[__LATITUDE_ISSET_ID] = value;
}
public double getLongitude() {
return this.longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
setLongitudeIsSet(true);
}
public void unsetLongitude() {
__isset_vector[__LONGITUDE_ISSET_ID] = false;
}
/** Returns true if field longitude is set (has been asigned a value) and false otherwise */
public boolean isSetLongitude() {
return __isset_vector[__LONGITUDE_ISSET_ID];
}
public void setLongitudeIsSet(boolean value) {
__isset_vector[__LONGITUDE_ISSET_ID] = value;
}
public double getAltitude() {
return this.altitude;
}
public void setAltitude(double altitude) {
this.altitude = altitude;
setAltitudeIsSet(true);
}
public void unsetAltitude() {
__isset_vector[__ALTITUDE_ISSET_ID] = false;
}
/** Returns true if field altitude is set (has been asigned a value) and false otherwise */
public boolean isSetAltitude() {
return __isset_vector[__ALTITUDE_ISSET_ID];
}
public void setAltitudeIsSet(boolean value) {
__isset_vector[__ALTITUDE_ISSET_ID] = value;
}
public String getAuthor() {
return this.author;
}
public void setAuthor(String author) {
this.author = author;
}
public void unsetAuthor() {
this.author = null;
}
/** Returns true if field author is set (has been asigned a value) and false otherwise */
public boolean isSetAuthor() {
return this.author != null;
}
public void setAuthorIsSet(boolean value) {
if (!value) {
this.author = null;
}
}
public String getSource() {
return this.source;
}
public void setSource(String source) {
this.source = source;
}
public void unsetSource() {
this.source = null;
}
/** Returns true if field source is set (has been asigned a value) and false otherwise */
public boolean isSetSource() {
return this.source != null;
}
public void setSourceIsSet(boolean value) {
if (!value) {
this.source = null;
}
}
public String getSourceURL() {
return this.sourceURL;
}
public void setSourceURL(String sourceURL) {
this.sourceURL = sourceURL;
}
public void unsetSourceURL() {
this.sourceURL = null;
}
/** Returns true if field sourceURL is set (has been asigned a value) and false otherwise */
public boolean isSetSourceURL() {
return this.sourceURL != null;
}
public void setSourceURLIsSet(boolean value) {
if (!value) {
this.sourceURL = null;
}
}
public String getSourceApplication() {
return this.sourceApplication;
}
public void setSourceApplication(String sourceApplication) {
this.sourceApplication = sourceApplication;
}
public void unsetSourceApplication() {
this.sourceApplication = null;
}
/** Returns true if field sourceApplication is set (has been asigned a value) and false otherwise */
public boolean isSetSourceApplication() {
return this.sourceApplication != null;
}
public void setSourceApplicationIsSet(boolean value) {
if (!value) {
this.sourceApplication = null;
}
}
public long getShareDate() {
return this.shareDate;
}
public void setShareDate(long shareDate) {
this.shareDate = shareDate;
setShareDateIsSet(true);
}
public void unsetShareDate() {
__isset_vector[__SHAREDATE_ISSET_ID] = false;
}
/** Returns true if field shareDate is set (has been asigned a value) and false otherwise */
public boolean isSetShareDate() {
return __isset_vector[__SHAREDATE_ISSET_ID];
}
public void setShareDateIsSet(boolean value) {
__isset_vector[__SHAREDATE_ISSET_ID] = value;
}
public long getReminderOrder() {
return this.reminderOrder;
}
public void setReminderOrder(long reminderOrder) {
this.reminderOrder = reminderOrder;
setReminderOrderIsSet(true);
}
public void unsetReminderOrder() {
__isset_vector[__REMINDERORDER_ISSET_ID] = false;
}
/** Returns true if field reminderOrder is set (has been asigned a value) and false otherwise */
public boolean isSetReminderOrder() {
return __isset_vector[__REMINDERORDER_ISSET_ID];
}
public void setReminderOrderIsSet(boolean value) {
__isset_vector[__REMINDERORDER_ISSET_ID] = value;
}
public long getReminderDoneTime() {
return this.reminderDoneTime;
}
public void setReminderDoneTime(long reminderDoneTime) {
this.reminderDoneTime = reminderDoneTime;
setReminderDoneTimeIsSet(true);
}
public void unsetReminderDoneTime() {
__isset_vector[__REMINDERDONETIME_ISSET_ID] = false;
}
/** Returns true if field reminderDoneTime is set (has been asigned a value) and false otherwise */
public boolean isSetReminderDoneTime() {
return __isset_vector[__REMINDERDONETIME_ISSET_ID];
}
public void setReminderDoneTimeIsSet(boolean value) {
__isset_vector[__REMINDERDONETIME_ISSET_ID] = value;
}
public long getReminderTime() {
return this.reminderTime;
}
public void setReminderTime(long reminderTime) {
this.reminderTime = reminderTime;
setReminderTimeIsSet(true);
}
public void unsetReminderTime() {
__isset_vector[__REMINDERTIME_ISSET_ID] = false;
}
/** Returns true if field reminderTime is set (has been asigned a value) and false otherwise */
public boolean isSetReminderTime() {
return __isset_vector[__REMINDERTIME_ISSET_ID];
}
public void setReminderTimeIsSet(boolean value) {
__isset_vector[__REMINDERTIME_ISSET_ID] = value;
}
public String getPlaceName() {
return this.placeName;
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
}
public void unsetPlaceName() {
this.placeName = null;
}
/** Returns true if field placeName is set (has been asigned a value) and false otherwise */
public boolean isSetPlaceName() {
return this.placeName != null;
}
public void setPlaceNameIsSet(boolean value) {
if (!value) {
this.placeName = null;
}
}
public String getContentClass() {
return this.contentClass;
}
public void setContentClass(String contentClass) {
this.contentClass = contentClass;
}
public void unsetContentClass() {
this.contentClass = null;
}
/** Returns true if field contentClass is set (has been asigned a value) and false otherwise */
public boolean isSetContentClass() {
return this.contentClass != null;
}
public void setContentClassIsSet(boolean value) {
if (!value) {
this.contentClass = null;
}
}
public LazyMap getApplicationData() {
return this.applicationData;
}
public void setApplicationData(LazyMap applicationData) {
this.applicationData = applicationData;
}
public void unsetApplicationData() {
this.applicationData = null;
}
/** Returns true if field applicationData is set (has been asigned a value) and false otherwise */
public boolean isSetApplicationData() {
return this.applicationData != null;
}
public void setApplicationDataIsSet(boolean value) {
if (!value) {
this.applicationData = null;
}
}
public String getLastEditedBy() {
return this.lastEditedBy;
}
public void setLastEditedBy(String lastEditedBy) {
this.lastEditedBy = lastEditedBy;
}
public void unsetLastEditedBy() {
this.lastEditedBy = null;
}
/** Returns true if field lastEditedBy is set (has been asigned a value) and false otherwise */
public boolean isSetLastEditedBy() {
return this.lastEditedBy != null;
}
public void setLastEditedByIsSet(boolean value) {
if (!value) {
this.lastEditedBy = null;
}
}
public int getClassificationsSize() {
return (this.classifications == null) ? 0 : this.classifications.size();
}
public void putToClassifications(String key, String val) {
if (this.classifications == null) {
this.classifications = new HashMap();
}
this.classifications.put(key, val);
}
public Map getClassifications() {
return this.classifications;
}
public void setClassifications(Map classifications) {
this.classifications = classifications;
}
public void unsetClassifications() {
this.classifications = null;
}
/** Returns true if field classifications is set (has been asigned a value) and false otherwise */
public boolean isSetClassifications() {
return this.classifications != null;
}
public void setClassificationsIsSet(boolean value) {
if (!value) {
this.classifications = null;
}
}
public int getCreatorId() {
return this.creatorId;
}
public void setCreatorId(int creatorId) {
this.creatorId = creatorId;
setCreatorIdIsSet(true);
}
public void unsetCreatorId() {
__isset_vector[__CREATORID_ISSET_ID] = false;
}
/** Returns true if field creatorId is set (has been asigned a value) and false otherwise */
public boolean isSetCreatorId() {
return __isset_vector[__CREATORID_ISSET_ID];
}
public void setCreatorIdIsSet(boolean value) {
__isset_vector[__CREATORID_ISSET_ID] = value;
}
public int getLastEditorId() {
return this.lastEditorId;
}
public void setLastEditorId(int lastEditorId) {
this.lastEditorId = lastEditorId;
setLastEditorIdIsSet(true);
}
public void unsetLastEditorId() {
__isset_vector[__LASTEDITORID_ISSET_ID] = false;
}
/** Returns true if field lastEditorId is set (has been asigned a value) and false otherwise */
public boolean isSetLastEditorId() {
return __isset_vector[__LASTEDITORID_ISSET_ID];
}
public void setLastEditorIdIsSet(boolean value) {
__isset_vector[__LASTEDITORID_ISSET_ID] = value;
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof NoteAttributes)
return this.equals((NoteAttributes)that);
return false;
}
public boolean equals(NoteAttributes that) {
if (that == null)
return false;
boolean this_present_subjectDate = true && this.isSetSubjectDate();
boolean that_present_subjectDate = true && that.isSetSubjectDate();
if (this_present_subjectDate || that_present_subjectDate) {
if (!(this_present_subjectDate && that_present_subjectDate))
return false;
if (this.subjectDate != that.subjectDate)
return false;
}
boolean this_present_latitude = true && this.isSetLatitude();
boolean that_present_latitude = true && that.isSetLatitude();
if (this_present_latitude || that_present_latitude) {
if (!(this_present_latitude && that_present_latitude))
return false;
if (this.latitude != that.latitude)
return false;
}
boolean this_present_longitude = true && this.isSetLongitude();
boolean that_present_longitude = true && that.isSetLongitude();
if (this_present_longitude || that_present_longitude) {
if (!(this_present_longitude && that_present_longitude))
return false;
if (this.longitude != that.longitude)
return false;
}
boolean this_present_altitude = true && this.isSetAltitude();
boolean that_present_altitude = true && that.isSetAltitude();
if (this_present_altitude || that_present_altitude) {
if (!(this_present_altitude && that_present_altitude))
return false;
if (this.altitude != that.altitude)
return false;
}
boolean this_present_author = true && this.isSetAuthor();
boolean that_present_author = true && that.isSetAuthor();
if (this_present_author || that_present_author) {
if (!(this_present_author && that_present_author))
return false;
if (!this.author.equals(that.author))
return false;
}
boolean this_present_source = true && this.isSetSource();
boolean that_present_source = true && that.isSetSource();
if (this_present_source || that_present_source) {
if (!(this_present_source && that_present_source))
return false;
if (!this.source.equals(that.source))
return false;
}
boolean this_present_sourceURL = true && this.isSetSourceURL();
boolean that_present_sourceURL = true && that.isSetSourceURL();
if (this_present_sourceURL || that_present_sourceURL) {
if (!(this_present_sourceURL && that_present_sourceURL))
return false;
if (!this.sourceURL.equals(that.sourceURL))
return false;
}
boolean this_present_sourceApplication = true && this.isSetSourceApplication();
boolean that_present_sourceApplication = true && that.isSetSourceApplication();
if (this_present_sourceApplication || that_present_sourceApplication) {
if (!(this_present_sourceApplication && that_present_sourceApplication))
return false;
if (!this.sourceApplication.equals(that.sourceApplication))
return false;
}
boolean this_present_shareDate = true && this.isSetShareDate();
boolean that_present_shareDate = true && that.isSetShareDate();
if (this_present_shareDate || that_present_shareDate) {
if (!(this_present_shareDate && that_present_shareDate))
return false;
if (this.shareDate != that.shareDate)
return false;
}
boolean this_present_reminderOrder = true && this.isSetReminderOrder();
boolean that_present_reminderOrder = true && that.isSetReminderOrder();
if (this_present_reminderOrder || that_present_reminderOrder) {
if (!(this_present_reminderOrder && that_present_reminderOrder))
return false;
if (this.reminderOrder != that.reminderOrder)
return false;
}
boolean this_present_reminderDoneTime = true && this.isSetReminderDoneTime();
boolean that_present_reminderDoneTime = true && that.isSetReminderDoneTime();
if (this_present_reminderDoneTime || that_present_reminderDoneTime) {
if (!(this_present_reminderDoneTime && that_present_reminderDoneTime))
return false;
if (this.reminderDoneTime != that.reminderDoneTime)
return false;
}
boolean this_present_reminderTime = true && this.isSetReminderTime();
boolean that_present_reminderTime = true && that.isSetReminderTime();
if (this_present_reminderTime || that_present_reminderTime) {
if (!(this_present_reminderTime && that_present_reminderTime))
return false;
if (this.reminderTime != that.reminderTime)
return false;
}
boolean this_present_placeName = true && this.isSetPlaceName();
boolean that_present_placeName = true && that.isSetPlaceName();
if (this_present_placeName || that_present_placeName) {
if (!(this_present_placeName && that_present_placeName))
return false;
if (!this.placeName.equals(that.placeName))
return false;
}
boolean this_present_contentClass = true && this.isSetContentClass();
boolean that_present_contentClass = true && that.isSetContentClass();
if (this_present_contentClass || that_present_contentClass) {
if (!(this_present_contentClass && that_present_contentClass))
return false;
if (!this.contentClass.equals(that.contentClass))
return false;
}
boolean this_present_applicationData = true && this.isSetApplicationData();
boolean that_present_applicationData = true && that.isSetApplicationData();
if (this_present_applicationData || that_present_applicationData) {
if (!(this_present_applicationData && that_present_applicationData))
return false;
if (!this.applicationData.equals(that.applicationData))
return false;
}
boolean this_present_lastEditedBy = true && this.isSetLastEditedBy();
boolean that_present_lastEditedBy = true && that.isSetLastEditedBy();
if (this_present_lastEditedBy || that_present_lastEditedBy) {
if (!(this_present_lastEditedBy && that_present_lastEditedBy))
return false;
if (!this.lastEditedBy.equals(that.lastEditedBy))
return false;
}
boolean this_present_classifications = true && this.isSetClassifications();
boolean that_present_classifications = true && that.isSetClassifications();
if (this_present_classifications || that_present_classifications) {
if (!(this_present_classifications && that_present_classifications))
return false;
if (!this.classifications.equals(that.classifications))
return false;
}
boolean this_present_creatorId = true && this.isSetCreatorId();
boolean that_present_creatorId = true && that.isSetCreatorId();
if (this_present_creatorId || that_present_creatorId) {
if (!(this_present_creatorId && that_present_creatorId))
return false;
if (this.creatorId != that.creatorId)
return false;
}
boolean this_present_lastEditorId = true && this.isSetLastEditorId();
boolean that_present_lastEditorId = true && that.isSetLastEditorId();
if (this_present_lastEditorId || that_present_lastEditorId) {
if (!(this_present_lastEditorId && that_present_lastEditorId))
return false;
if (this.lastEditorId != that.lastEditorId)
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(NoteAttributes other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
NoteAttributes typedOther = (NoteAttributes)other;
lastComparison = Boolean.valueOf(isSetSubjectDate()).compareTo(typedOther.isSetSubjectDate());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSubjectDate()) { lastComparison = TBaseHelper.compareTo(this.subjectDate, typedOther.subjectDate);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLatitude()).compareTo(typedOther.isSetLatitude());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLatitude()) { lastComparison = TBaseHelper.compareTo(this.latitude, typedOther.latitude);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLongitude()).compareTo(typedOther.isSetLongitude());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLongitude()) { lastComparison = TBaseHelper.compareTo(this.longitude, typedOther.longitude);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAltitude()).compareTo(typedOther.isSetAltitude());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAltitude()) { lastComparison = TBaseHelper.compareTo(this.altitude, typedOther.altitude);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAuthor()).compareTo(typedOther.isSetAuthor());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthor()) { lastComparison = TBaseHelper.compareTo(this.author, typedOther.author);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSource()) { lastComparison = TBaseHelper.compareTo(this.source, typedOther.source);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSourceURL()).compareTo(typedOther.isSetSourceURL());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSourceURL()) { lastComparison = TBaseHelper.compareTo(this.sourceURL, typedOther.sourceURL);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSourceApplication()).compareTo(typedOther.isSetSourceApplication());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSourceApplication()) { lastComparison = TBaseHelper.compareTo(this.sourceApplication, typedOther.sourceApplication);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetShareDate()).compareTo(typedOther.isSetShareDate());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetShareDate()) { lastComparison = TBaseHelper.compareTo(this.shareDate, typedOther.shareDate);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReminderOrder()).compareTo(typedOther.isSetReminderOrder());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReminderOrder()) { lastComparison = TBaseHelper.compareTo(this.reminderOrder, typedOther.reminderOrder);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReminderDoneTime()).compareTo(typedOther.isSetReminderDoneTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReminderDoneTime()) { lastComparison = TBaseHelper.compareTo(this.reminderDoneTime, typedOther.reminderDoneTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReminderTime()).compareTo(typedOther.isSetReminderTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReminderTime()) { lastComparison = TBaseHelper.compareTo(this.reminderTime, typedOther.reminderTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPlaceName()).compareTo(typedOther.isSetPlaceName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPlaceName()) { lastComparison = TBaseHelper.compareTo(this.placeName, typedOther.placeName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetContentClass()).compareTo(typedOther.isSetContentClass());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetContentClass()) { lastComparison = TBaseHelper.compareTo(this.contentClass, typedOther.contentClass);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetApplicationData()).compareTo(typedOther.isSetApplicationData());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetApplicationData()) { lastComparison = TBaseHelper.compareTo(this.applicationData, typedOther.applicationData);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLastEditedBy()).compareTo(typedOther.isSetLastEditedBy());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastEditedBy()) { lastComparison = TBaseHelper.compareTo(this.lastEditedBy, typedOther.lastEditedBy);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetClassifications()).compareTo(typedOther.isSetClassifications());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetClassifications()) { lastComparison = TBaseHelper.compareTo(this.classifications, typedOther.classifications);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCreatorId()).compareTo(typedOther.isSetCreatorId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCreatorId()) { lastComparison = TBaseHelper.compareTo(this.creatorId, typedOther.creatorId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLastEditorId()).compareTo(typedOther.isSetLastEditorId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastEditorId()) { lastComparison = TBaseHelper.compareTo(this.lastEditorId, typedOther.lastEditorId);
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: // SUBJECT_DATE
if (field.type == TType.I64) {
this.subjectDate = iprot.readI64();
setSubjectDateIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 10: // LATITUDE
if (field.type == TType.DOUBLE) {
this.latitude = iprot.readDouble();
setLatitudeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 11: // LONGITUDE
if (field.type == TType.DOUBLE) {
this.longitude = iprot.readDouble();
setLongitudeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 12: // ALTITUDE
if (field.type == TType.DOUBLE) {
this.altitude = iprot.readDouble();
setAltitudeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 13: // AUTHOR
if (field.type == TType.STRING) {
this.author = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 14: // SOURCE
if (field.type == TType.STRING) {
this.source = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 15: // SOURCE_URL
if (field.type == TType.STRING) {
this.sourceURL = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 16: // SOURCE_APPLICATION
if (field.type == TType.STRING) {
this.sourceApplication = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 17: // SHARE_DATE
if (field.type == TType.I64) {
this.shareDate = iprot.readI64();
setShareDateIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 18: // REMINDER_ORDER
if (field.type == TType.I64) {
this.reminderOrder = iprot.readI64();
setReminderOrderIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 19: // REMINDER_DONE_TIME
if (field.type == TType.I64) {
this.reminderDoneTime = iprot.readI64();
setReminderDoneTimeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 20: // REMINDER_TIME
if (field.type == TType.I64) {
this.reminderTime = iprot.readI64();
setReminderTimeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 21: // PLACE_NAME
if (field.type == TType.STRING) {
this.placeName = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 22: // CONTENT_CLASS
if (field.type == TType.STRING) {
this.contentClass = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 23: // APPLICATION_DATA
if (field.type == TType.STRUCT) {
this.applicationData = new LazyMap();
this.applicationData.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 24: // LAST_EDITED_BY
if (field.type == TType.STRING) {
this.lastEditedBy = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 26: // CLASSIFICATIONS
if (field.type == TType.MAP) {
{
TMap _map17 = iprot.readMapBegin();
this.classifications = new HashMap(2*_map17.size);
for (int _i18 = 0; _i18 < _map17.size; ++_i18)
{
String _key19;
String _val20;
_key19 = iprot.readString();
_val20 = iprot.readString();
this.classifications.put(_key19, _val20);
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 27: // CREATOR_ID
if (field.type == TType.I32) {
this.creatorId = iprot.readI32();
setCreatorIdIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 28: // LAST_EDITOR_ID
if (field.type == TType.I32) {
this.lastEditorId = iprot.readI32();
setLastEditorIdIsSet(true);
} 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);
if (isSetSubjectDate()) {
oprot.writeFieldBegin(SUBJECT_DATE_FIELD_DESC);
oprot.writeI64(this.subjectDate);
oprot.writeFieldEnd();
}
if (isSetLatitude()) {
oprot.writeFieldBegin(LATITUDE_FIELD_DESC);
oprot.writeDouble(this.latitude);
oprot.writeFieldEnd();
}
if (isSetLongitude()) {
oprot.writeFieldBegin(LONGITUDE_FIELD_DESC);
oprot.writeDouble(this.longitude);
oprot.writeFieldEnd();
}
if (isSetAltitude()) {
oprot.writeFieldBegin(ALTITUDE_FIELD_DESC);
oprot.writeDouble(this.altitude);
oprot.writeFieldEnd();
}
if (this.author != null) {
if (isSetAuthor()) {
oprot.writeFieldBegin(AUTHOR_FIELD_DESC);
oprot.writeString(this.author);
oprot.writeFieldEnd();
}
}
if (this.source != null) {
if (isSetSource()) {
oprot.writeFieldBegin(SOURCE_FIELD_DESC);
oprot.writeString(this.source);
oprot.writeFieldEnd();
}
}
if (this.sourceURL != null) {
if (isSetSourceURL()) {
oprot.writeFieldBegin(SOURCE_URL_FIELD_DESC);
oprot.writeString(this.sourceURL);
oprot.writeFieldEnd();
}
}
if (this.sourceApplication != null) {
if (isSetSourceApplication()) {
oprot.writeFieldBegin(SOURCE_APPLICATION_FIELD_DESC);
oprot.writeString(this.sourceApplication);
oprot.writeFieldEnd();
}
}
if (isSetShareDate()) {
oprot.writeFieldBegin(SHARE_DATE_FIELD_DESC);
oprot.writeI64(this.shareDate);
oprot.writeFieldEnd();
}
if (isSetReminderOrder()) {
oprot.writeFieldBegin(REMINDER_ORDER_FIELD_DESC);
oprot.writeI64(this.reminderOrder);
oprot.writeFieldEnd();
}
if (isSetReminderDoneTime()) {
oprot.writeFieldBegin(REMINDER_DONE_TIME_FIELD_DESC);
oprot.writeI64(this.reminderDoneTime);
oprot.writeFieldEnd();
}
if (isSetReminderTime()) {
oprot.writeFieldBegin(REMINDER_TIME_FIELD_DESC);
oprot.writeI64(this.reminderTime);
oprot.writeFieldEnd();
}
if (this.placeName != null) {
if (isSetPlaceName()) {
oprot.writeFieldBegin(PLACE_NAME_FIELD_DESC);
oprot.writeString(this.placeName);
oprot.writeFieldEnd();
}
}
if (this.contentClass != null) {
if (isSetContentClass()) {
oprot.writeFieldBegin(CONTENT_CLASS_FIELD_DESC);
oprot.writeString(this.contentClass);
oprot.writeFieldEnd();
}
}
if (this.applicationData != null) {
if (isSetApplicationData()) {
oprot.writeFieldBegin(APPLICATION_DATA_FIELD_DESC);
this.applicationData.write(oprot);
oprot.writeFieldEnd();
}
}
if (this.lastEditedBy != null) {
if (isSetLastEditedBy()) {
oprot.writeFieldBegin(LAST_EDITED_BY_FIELD_DESC);
oprot.writeString(this.lastEditedBy);
oprot.writeFieldEnd();
}
}
if (this.classifications != null) {
if (isSetClassifications()) {
oprot.writeFieldBegin(CLASSIFICATIONS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.classifications.size()));
for (Map.Entry _iter21 : this.classifications.entrySet())
{
oprot.writeString(_iter21.getKey());
oprot.writeString(_iter21.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (isSetCreatorId()) {
oprot.writeFieldBegin(CREATOR_ID_FIELD_DESC);
oprot.writeI32(this.creatorId);
oprot.writeFieldEnd();
}
if (isSetLastEditorId()) {
oprot.writeFieldBegin(LAST_EDITOR_ID_FIELD_DESC);
oprot.writeI32(this.lastEditorId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("NoteAttributes(");
boolean first = true;
if (isSetSubjectDate()) {
sb.append("subjectDate:");
sb.append(this.subjectDate);
first = false;
}
if (isSetLatitude()) {
if (!first) sb.append(", ");
sb.append("latitude:");
sb.append(this.latitude);
first = false;
}
if (isSetLongitude()) {
if (!first) sb.append(", ");
sb.append("longitude:");
sb.append(this.longitude);
first = false;
}
if (isSetAltitude()) {
if (!first) sb.append(", ");
sb.append("altitude:");
sb.append(this.altitude);
first = false;
}
if (isSetAuthor()) {
if (!first) sb.append(", ");
sb.append("author:");
if (this.author == null) {
sb.append("null");
} else {
sb.append(this.author);
}
first = false;
}
if (isSetSource()) {
if (!first) sb.append(", ");
sb.append("source:");
if (this.source == null) {
sb.append("null");
} else {
sb.append(this.source);
}
first = false;
}
if (isSetSourceURL()) {
if (!first) sb.append(", ");
sb.append("sourceURL:");
if (this.sourceURL == null) {
sb.append("null");
} else {
sb.append(this.sourceURL);
}
first = false;
}
if (isSetSourceApplication()) {
if (!first) sb.append(", ");
sb.append("sourceApplication:");
if (this.sourceApplication == null) {
sb.append("null");
} else {
sb.append(this.sourceApplication);
}
first = false;
}
if (isSetShareDate()) {
if (!first) sb.append(", ");
sb.append("shareDate:");
sb.append(this.shareDate);
first = false;
}
if (isSetReminderOrder()) {
if (!first) sb.append(", ");
sb.append("reminderOrder:");
sb.append(this.reminderOrder);
first = false;
}
if (isSetReminderDoneTime()) {
if (!first) sb.append(", ");
sb.append("reminderDoneTime:");
sb.append(this.reminderDoneTime);
first = false;
}
if (isSetReminderTime()) {
if (!first) sb.append(", ");
sb.append("reminderTime:");
sb.append(this.reminderTime);
first = false;
}
if (isSetPlaceName()) {
if (!first) sb.append(", ");
sb.append("placeName:");
if (this.placeName == null) {
sb.append("null");
} else {
sb.append(this.placeName);
}
first = false;
}
if (isSetContentClass()) {
if (!first) sb.append(", ");
sb.append("contentClass:");
if (this.contentClass == null) {
sb.append("null");
} else {
sb.append(this.contentClass);
}
first = false;
}
if (isSetApplicationData()) {
if (!first) sb.append(", ");
sb.append("applicationData:");
if (this.applicationData == null) {
sb.append("null");
} else {
sb.append(this.applicationData);
}
first = false;
}
if (isSetLastEditedBy()) {
if (!first) sb.append(", ");
sb.append("lastEditedBy:");
if (this.lastEditedBy == null) {
sb.append("null");
} else {
sb.append(this.lastEditedBy);
}
first = false;
}
if (isSetClassifications()) {
if (!first) sb.append(", ");
sb.append("classifications:");
if (this.classifications == null) {
sb.append("null");
} else {
sb.append(this.classifications);
}
first = false;
}
if (isSetCreatorId()) {
if (!first) sb.append(", ");
sb.append("creatorId:");
sb.append(this.creatorId);
first = false;
}
if (isSetLastEditorId()) {
if (!first) sb.append(", ");
sb.append("lastEditorId:");
sb.append(this.lastEditorId);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
}
}