com.evernote.edam.type
Class Ad

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

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

An advertisement that may be displayed within an Evernote client. Advertisements are either a snippet of HTML or else they are an image (of type: JPEG, GIF, PNG) with an associated destination URL.

id
The unique identifier of this advertisement within Evernote's ad inventory.
width
This ad should be displayed within a rectangle that is this wide, in pixels.
height
This ad should be displayed within a rectangle that is this high, in pixels.
advertiserName
A string containing a readable version of the name of this advertiser.
imageUrl
The location of the image to display for this ad.
destinationUrl
When a user clicks on the ad, this is the destination they should be sent to in a browser.
displaySeconds
The number of seconds that the ad should be displayed before it is replaced with a different ad.
score
A numeric indicator of the relative value of this ad, which can be compared against other ads from the same day.
image
If present, this is the raw image bits of the image file to display for the ad. If not present, the imageUrl should be retrieved directly.
imageMime
The MIME type of the 'image' bytes, if those are set.
html
The exact HTML to display for this ad, to support rich or external advertisements.
displayFrequency
If this value is set, this is the relatively frequency that this ad should be displayed in the daily set of ads, relative to a base frequency of 1.0. I.e. an ad with a frequency of 3.0 should be displayed three times more frequently than an ad with a frequency of 1.0.

See Also:
Serialized Form

Nested Class Summary
static class Ad._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static java.util.Map<Ad._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 
Constructor Summary
Ad()
           
Ad(Ad other)
          Performs a deep copy on other.
 
Method Summary
 Ad clone()
          Deprecated. 
 int compareTo(Ad other)
           
 Ad deepCopy()
           
 boolean equals(Ad that)
           
 boolean equals(java.lang.Object that)
           
 java.lang.String getAdvertiserName()
           
 java.lang.String getDestinationUrl()
           
 double getDisplayFrequency()
           
 short getDisplaySeconds()
           
 java.lang.Object getFieldValue(Ad._Fields field)
           
 java.lang.Object getFieldValue(int fieldId)
           
 short getHeight()
           
 java.lang.String getHtml()
           
 int getId()
           
 byte[] getImage()
           
 java.lang.String getImageMime()
           
 java.lang.String getImageUrl()
           
 double getScore()
           
 short getWidth()
           
 int hashCode()
           
 boolean isSet(Ad._Fields field)
          Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
 boolean isSet(int fieldID)
           
 boolean isSetAdvertiserName()
          Returns true if field advertiserName is set (has been asigned a value) and false otherwise
 boolean isSetDestinationUrl()
          Returns true if field destinationUrl is set (has been asigned a value) and false otherwise
 boolean isSetDisplayFrequency()
          Returns true if field displayFrequency is set (has been asigned a value) and false otherwise
 boolean isSetDisplaySeconds()
          Returns true if field displaySeconds is set (has been asigned a value) and false otherwise
 boolean isSetHeight()
          Returns true if field height is set (has been asigned a value) and false otherwise
 boolean isSetHtml()
          Returns true if field html is set (has been asigned a value) and false otherwise
 boolean isSetId()
          Returns true if field id is set (has been asigned a value) and false otherwise
 boolean isSetImage()
          Returns true if field image is set (has been asigned a value) and false otherwise
 boolean isSetImageMime()
          Returns true if field imageMime is set (has been asigned a value) and false otherwise
 boolean isSetImageUrl()
          Returns true if field imageUrl is set (has been asigned a value) and false otherwise
 boolean isSetScore()
          Returns true if field score is set (has been asigned a value) and false otherwise
 boolean isSetWidth()
          Returns true if field width is set (has been asigned a value) and false otherwise
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 void setAdvertiserName(java.lang.String advertiserName)
           
 void setAdvertiserNameIsSet(boolean value)
           
 void setDestinationUrl(java.lang.String destinationUrl)
           
 void setDestinationUrlIsSet(boolean value)
           
 void setDisplayFrequency(double displayFrequency)
           
 void setDisplayFrequencyIsSet(boolean value)
           
 void setDisplaySeconds(short displaySeconds)
           
 void setDisplaySecondsIsSet(boolean value)
           
 void setFieldValue(Ad._Fields field, java.lang.Object value)
           
 void setFieldValue(int fieldID, java.lang.Object value)
           
 void setHeight(short height)
           
 void setHeightIsSet(boolean value)
           
 void setHtml(java.lang.String html)
           
 void setHtmlIsSet(boolean value)
           
 void setId(int id)
           
 void setIdIsSet(boolean value)
           
 void setImage(byte[] image)
           
 void setImageIsSet(boolean value)
           
 void setImageMime(java.lang.String imageMime)
           
 void setImageMimeIsSet(boolean value)
           
 void setImageUrl(java.lang.String imageUrl)
           
 void setImageUrlIsSet(boolean value)
           
 void setScore(double score)
           
 void setScoreIsSet(boolean value)
           
 void setWidth(short width)
           
 void setWidthIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetAdvertiserName()
           
 void unsetDestinationUrl()
           
 void unsetDisplayFrequency()
           
 void unsetDisplaySeconds()
           
 void unsetHeight()
           
 void unsetHtml()
           
 void unsetId()
           
 void unsetImage()
           
 void unsetImageMime()
           
 void unsetImageUrl()
           
 void unsetScore()
           
 void unsetWidth()
           
 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<Ad._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

Ad

public Ad()

Ad

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

Method Detail

deepCopy

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

clone

@Deprecated
public Ad clone()
Deprecated. 

Overrides:
clone in class java.lang.Object

getId

public int getId()

setId

public void setId(int id)

unsetId

public void unsetId()

isSetId

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


setIdIsSet

public void setIdIsSet(boolean value)

getWidth

public short getWidth()

setWidth

public void setWidth(short width)

unsetWidth

public void unsetWidth()

isSetWidth

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


setWidthIsSet

public void setWidthIsSet(boolean value)

getHeight

public short getHeight()

setHeight

public void setHeight(short height)

unsetHeight

public void unsetHeight()

isSetHeight

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


setHeightIsSet

public void setHeightIsSet(boolean value)

getAdvertiserName

public java.lang.String getAdvertiserName()

setAdvertiserName

public void setAdvertiserName(java.lang.String advertiserName)

unsetAdvertiserName

public void unsetAdvertiserName()

isSetAdvertiserName

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


setAdvertiserNameIsSet

public void setAdvertiserNameIsSet(boolean value)

getImageUrl

public java.lang.String getImageUrl()

setImageUrl

public void setImageUrl(java.lang.String imageUrl)

unsetImageUrl

public void unsetImageUrl()

isSetImageUrl

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


setImageUrlIsSet

public void setImageUrlIsSet(boolean value)

getDestinationUrl

public java.lang.String getDestinationUrl()

setDestinationUrl

public void setDestinationUrl(java.lang.String destinationUrl)

unsetDestinationUrl

public void unsetDestinationUrl()

isSetDestinationUrl

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


setDestinationUrlIsSet

public void setDestinationUrlIsSet(boolean value)

getDisplaySeconds

public short getDisplaySeconds()

setDisplaySeconds

public void setDisplaySeconds(short displaySeconds)

unsetDisplaySeconds

public void unsetDisplaySeconds()

isSetDisplaySeconds

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


setDisplaySecondsIsSet

public void setDisplaySecondsIsSet(boolean value)

getScore

public double getScore()

setScore

public void setScore(double score)

unsetScore

public void unsetScore()

isSetScore

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


setScoreIsSet

public void setScoreIsSet(boolean value)

getImage

public byte[] getImage()

setImage

public void setImage(byte[] image)

unsetImage

public void unsetImage()

isSetImage

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


setImageIsSet

public void setImageIsSet(boolean value)

getImageMime

public java.lang.String getImageMime()

setImageMime

public void setImageMime(java.lang.String imageMime)

unsetImageMime

public void unsetImageMime()

isSetImageMime

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


setImageMimeIsSet

public void setImageMimeIsSet(boolean value)

getHtml

public java.lang.String getHtml()

setHtml

public void setHtml(java.lang.String html)

unsetHtml

public void unsetHtml()

isSetHtml

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


setHtmlIsSet

public void setHtmlIsSet(boolean value)

getDisplayFrequency

public double getDisplayFrequency()

setDisplayFrequency

public void setDisplayFrequency(double displayFrequency)

unsetDisplayFrequency

public void unsetDisplayFrequency()

isSetDisplayFrequency

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


setDisplayFrequencyIsSet

public void setDisplayFrequencyIsSet(boolean value)

setFieldValue

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

setFieldValue

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

getFieldValue

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

getFieldValue

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

isSet

public boolean isSet(Ad._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<Ad._Fields>

isSet

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

equals

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

equals

public boolean equals(Ad that)

hashCode

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

compareTo

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

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<Ad._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<Ad._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