com.evernote.edam.type
Class Tag

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

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

A tag within a user's account is a unique name which may be organized a simple hierarchy.

guid
The unique identifier of this tag. Will be set by the service, so may be omitted by the client when creating the Tag.
Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
Regex: EDAM_GUID_REGEX
name
A sequence of characters representing the tag's identifier. Case is preserved, but is ignored for comparisons. This means that an account may only have one tag with a given name, via case-insensitive comparison, so an account may not have both "food" and "Food" tags. May not contain a comma (','), and may not begin or end with a space.
Length: EDAM_TAG_NAME_LEN_MIN - EDAM_TAG_NAME_LEN_MAX
Regex: EDAM_TAG_NAME_REGEX
parentGuid
If this is set, then this is the GUID of the tag that holds this tag within the tag organizational heirarchy. If this is not set, then the tag has no parent and it is a "top level" tag. Cycles are not allowed (e.g. a->parent->parent == a) and will be rejected by the service.
Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
Regex: EDAM_GUID_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.

See Also:
Serialized Form

Nested Class Summary
static class Tag._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static java.util.Map<Tag._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 
Constructor Summary
Tag()
           
Tag(Tag other)
          Performs a deep copy on other.
 
Method Summary
 Tag clone()
          Deprecated. 
 int compareTo(Tag other)
           
 Tag deepCopy()
           
 boolean equals(java.lang.Object that)
           
 boolean equals(Tag that)
           
 java.lang.Object getFieldValue(int fieldId)
           
 java.lang.Object getFieldValue(Tag._Fields field)
           
 java.lang.String getGuid()
           
 java.lang.String getName()
           
 java.lang.String getParentGuid()
           
 int getUpdateSequenceNum()
           
 int hashCode()
           
 boolean isSet(int fieldID)
           
 boolean isSet(Tag._Fields field)
          Returns true if field corresponding to fieldID 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 isSetParentGuid()
          Returns true if field parentGuid 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(org.apache.thrift.protocol.TProtocol iprot)
           
 void setFieldValue(int fieldID, java.lang.Object value)
           
 void setFieldValue(Tag._Fields field, java.lang.Object value)
           
 void setGuid(java.lang.String guid)
           
 void setGuidIsSet(boolean value)
           
 void setName(java.lang.String name)
           
 void setNameIsSet(boolean value)
           
 void setParentGuid(java.lang.String parentGuid)
           
 void setParentGuidIsSet(boolean value)
           
 void setUpdateSequenceNum(int updateSequenceNum)
           
 void setUpdateSequenceNumIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetGuid()
           
 void unsetName()
           
 void unsetParentGuid()
           
 void unsetUpdateSequenceNum()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

metaDataMap

public static final java.util.Map<Tag._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

Tag

public Tag()

Tag

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

Method Detail

deepCopy

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

clone

@Deprecated
public Tag clone()
Deprecated. 

Overrides:
clone in class java.lang.Object

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)

getParentGuid

public java.lang.String getParentGuid()

setParentGuid

public void setParentGuid(java.lang.String parentGuid)

unsetParentGuid

public void unsetParentGuid()

isSetParentGuid

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


setParentGuidIsSet

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

setFieldValue

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

setFieldValue

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

getFieldValue

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

getFieldValue

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

isSet

public boolean isSet(Tag._Fields field)
Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise

Specified by:
isSet in interface org.apache.thrift.TBase<Tag._Fields>

isSet

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

equals

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

equals

public boolean equals(Tag that)

hashCode

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

compareTo

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

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<Tag._Fields>
Throws:
org.apache.thrift.TException

write

public void write(org.apache.thrift.protocol.TProtocol oprot)
           throws org.apache.thrift.TException
Specified by:
write in interface org.apache.thrift.TBase<Tag._Fields>
Throws:
org.apache.thrift.TException

toString

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

validate

public void validate()
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException