
open_rtb.SiteThrift Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package open_rtb;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* 3.3.5 Site Object
* A site object should be included if the ad supported content is part of a website (as opposed to an application). A bid request must not contain both a site object and an app object.
* The site object itself and all of its parameters are optional, so default values are not provided. If an optional parameter is not specified, it should be considered unknown. At a minimum, it’s useful to provide a page URL or a site ID, but this is not strictly required.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-6-3")
public class SiteThrift implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SiteThrift");
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("domain", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField CAT_FIELD_DESC = new org.apache.thrift.protocol.TField("cat", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField SECTIONCAT_FIELD_DESC = new org.apache.thrift.protocol.TField("sectioncat", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField PAGECAT_FIELD_DESC = new org.apache.thrift.protocol.TField("pagecat", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField PRIVACYPOLICY_FIELD_DESC = new org.apache.thrift.protocol.TField("privacypolicy", org.apache.thrift.protocol.TType.BYTE, (short)8);
private static final org.apache.thrift.protocol.TField REF_FIELD_DESC = new org.apache.thrift.protocol.TField("ref", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.protocol.TField SEARCH_FIELD_DESC = new org.apache.thrift.protocol.TField("search", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField PUBLISHER_FIELD_DESC = new org.apache.thrift.protocol.TField("publisher", org.apache.thrift.protocol.TType.STRUCT, (short)11);
private static final org.apache.thrift.protocol.TField CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("content", org.apache.thrift.protocol.TType.STRUCT, (short)12);
private static final org.apache.thrift.protocol.TField KEYWORDS_FIELD_DESC = new org.apache.thrift.protocol.TField("keywords", org.apache.thrift.protocol.TType.STRING, (short)13);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new SiteThriftStandardSchemeFactory());
schemes.put(TupleScheme.class, new SiteThriftTupleSchemeFactory());
}
/**
* Site ID on the exchange.
*/
public String id; // optional
/**
* Site name (may be masked at publisher’s request).
*/
public String name; // optional
/**
* Domain of the site, used for advertiser side blocking. For example, “foo.com”.
*/
public String domain; // optional
/**
* Array of IAB content categories for the overall site. See Table 6.1 Content Categories.
*/
public List cat; // optional
/**
* Array of IAB content categories for the current subsection of the site. See Table 6.1 Content Categories.
*/
public List sectioncat; // optional
/**
* Array of IAB content categories for the current page. See Table 6.1 Content Categories.
*/
public List pagecat; // optional
/**
* URL of the page where the impression will be shown.
*/
public String page; // optional
/**
* Specifies whether the site has a privacy policy. “1” means there is a policy. “0” means there is not.
*/
public byte privacypolicy; // optional
/**
* Referrer URL that caused navigation to the current page.
*/
public String ref; // optional
/**
* Search string that caused navigation to the current page.
*/
public String search; // optional
/**
* See Publisher Object.
*/
public PublisherThrift publisher; // optional
/**
* See Content Object.
*/
public ContentThrift content; // optional
/**
* List of keywords describing this site in a comma separated string.
*/
public String keywords; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
* Site ID on the exchange.
*/
ID((short)1, "id"),
/**
* Site name (may be masked at publisher’s request).
*/
NAME((short)2, "name"),
/**
* Domain of the site, used for advertiser side blocking. For example, “foo.com”.
*/
DOMAIN((short)3, "domain"),
/**
* Array of IAB content categories for the overall site. See Table 6.1 Content Categories.
*/
CAT((short)4, "cat"),
/**
* Array of IAB content categories for the current subsection of the site. See Table 6.1 Content Categories.
*/
SECTIONCAT((short)5, "sectioncat"),
/**
* Array of IAB content categories for the current page. See Table 6.1 Content Categories.
*/
PAGECAT((short)6, "pagecat"),
/**
* URL of the page where the impression will be shown.
*/
PAGE((short)7, "page"),
/**
* Specifies whether the site has a privacy policy. “1” means there is a policy. “0” means there is not.
*/
PRIVACYPOLICY((short)8, "privacypolicy"),
/**
* Referrer URL that caused navigation to the current page.
*/
REF((short)9, "ref"),
/**
* Search string that caused navigation to the current page.
*/
SEARCH((short)10, "search"),
/**
* See Publisher Object.
*/
PUBLISHER((short)11, "publisher"),
/**
* See Content Object.
*/
CONTENT((short)12, "content"),
/**
* List of keywords describing this site in a comma separated string.
*/
KEYWORDS((short)13, "keywords");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ID
return ID;
case 2: // NAME
return NAME;
case 3: // DOMAIN
return DOMAIN;
case 4: // CAT
return CAT;
case 5: // SECTIONCAT
return SECTIONCAT;
case 6: // PAGECAT
return PAGECAT;
case 7: // PAGE
return PAGE;
case 8: // PRIVACYPOLICY
return PRIVACYPOLICY;
case 9: // REF
return REF;
case 10: // SEARCH
return SEARCH;
case 11: // PUBLISHER
return PUBLISHER;
case 12: // CONTENT
return CONTENT;
case 13: // KEYWORDS
return KEYWORDS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __PRIVACYPOLICY_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ID,_Fields.NAME,_Fields.DOMAIN,_Fields.CAT,_Fields.SECTIONCAT,_Fields.PAGECAT,_Fields.PAGE,_Fields.PRIVACYPOLICY,_Fields.REF,_Fields.SEARCH,_Fields.PUBLISHER,_Fields.CONTENT,_Fields.KEYWORDS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CAT, new org.apache.thrift.meta_data.FieldMetaData("cat", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.SECTIONCAT, new org.apache.thrift.meta_data.FieldMetaData("sectioncat", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.PAGECAT, new org.apache.thrift.meta_data.FieldMetaData("pagecat", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PRIVACYPOLICY, new org.apache.thrift.meta_data.FieldMetaData("privacypolicy", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
tmpMap.put(_Fields.REF, new org.apache.thrift.meta_data.FieldMetaData("ref", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SEARCH, new org.apache.thrift.meta_data.FieldMetaData("search", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PUBLISHER, new org.apache.thrift.meta_data.FieldMetaData("publisher", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PublisherThrift.class)));
tmpMap.put(_Fields.CONTENT, new org.apache.thrift.meta_data.FieldMetaData("content", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ContentThrift.class)));
tmpMap.put(_Fields.KEYWORDS, new org.apache.thrift.meta_data.FieldMetaData("keywords", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SiteThrift.class, metaDataMap);
}
public SiteThrift() {
this.id = "";
this.name = "";
this.domain = "";
this.page = "";
this.privacypolicy = (byte)0;
this.ref = "";
this.search = "";
this.keywords = "";
}
/**
* Performs a deep copy on other.
*/
public SiteThrift(SiteThrift other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetId()) {
this.id = other.id;
}
if (other.isSetName()) {
this.name = other.name;
}
if (other.isSetDomain()) {
this.domain = other.domain;
}
if (other.isSetCat()) {
List __this__cat = new ArrayList(other.cat);
this.cat = __this__cat;
}
if (other.isSetSectioncat()) {
List __this__sectioncat = new ArrayList(other.sectioncat);
this.sectioncat = __this__sectioncat;
}
if (other.isSetPagecat()) {
List __this__pagecat = new ArrayList(other.pagecat);
this.pagecat = __this__pagecat;
}
if (other.isSetPage()) {
this.page = other.page;
}
this.privacypolicy = other.privacypolicy;
if (other.isSetRef()) {
this.ref = other.ref;
}
if (other.isSetSearch()) {
this.search = other.search;
}
if (other.isSetPublisher()) {
this.publisher = new PublisherThrift(other.publisher);
}
if (other.isSetContent()) {
this.content = new ContentThrift(other.content);
}
if (other.isSetKeywords()) {
this.keywords = other.keywords;
}
}
public SiteThrift deepCopy() {
return new SiteThrift(this);
}
@Override
public void clear() {
this.id = "";
this.name = "";
this.domain = "";
this.cat = null;
this.sectioncat = null;
this.pagecat = null;
this.page = "";
this.privacypolicy = (byte)0;
this.ref = "";
this.search = "";
this.publisher = null;
this.content = null;
this.keywords = "";
}
/**
* Site ID on the exchange.
*/
public String getId() {
return this.id;
}
/**
* Site ID on the exchange.
*/
public SiteThrift setId(String id) {
this.id = id;
return this;
}
public void unsetId() {
this.id = null;
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return this.id != null;
}
public void setIdIsSet(boolean value) {
if (!value) {
this.id = null;
}
}
/**
* Site name (may be masked at publisher’s request).
*/
public String getName() {
return this.name;
}
/**
* Site name (may be masked at publisher’s request).
*/
public SiteThrift setName(String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
/**
* Domain of the site, used for advertiser side blocking. For example, “foo.com”.
*/
public String getDomain() {
return this.domain;
}
/**
* Domain of the site, used for advertiser side blocking. For example, “foo.com”.
*/
public SiteThrift setDomain(String domain) {
this.domain = domain;
return this;
}
public void unsetDomain() {
this.domain = null;
}
/** Returns true if field domain is set (has been assigned a value) and false otherwise */
public boolean isSetDomain() {
return this.domain != null;
}
public void setDomainIsSet(boolean value) {
if (!value) {
this.domain = null;
}
}
public int getCatSize() {
return (this.cat == null) ? 0 : this.cat.size();
}
public java.util.Iterator getCatIterator() {
return (this.cat == null) ? null : this.cat.iterator();
}
public void addToCat(String elem) {
if (this.cat == null) {
this.cat = new ArrayList();
}
this.cat.add(elem);
}
/**
* Array of IAB content categories for the overall site. See Table 6.1 Content Categories.
*/
public List getCat() {
return this.cat;
}
/**
* Array of IAB content categories for the overall site. See Table 6.1 Content Categories.
*/
public SiteThrift setCat(List cat) {
this.cat = cat;
return this;
}
public void unsetCat() {
this.cat = null;
}
/** Returns true if field cat is set (has been assigned a value) and false otherwise */
public boolean isSetCat() {
return this.cat != null;
}
public void setCatIsSet(boolean value) {
if (!value) {
this.cat = null;
}
}
public int getSectioncatSize() {
return (this.sectioncat == null) ? 0 : this.sectioncat.size();
}
public java.util.Iterator getSectioncatIterator() {
return (this.sectioncat == null) ? null : this.sectioncat.iterator();
}
public void addToSectioncat(String elem) {
if (this.sectioncat == null) {
this.sectioncat = new ArrayList();
}
this.sectioncat.add(elem);
}
/**
* Array of IAB content categories for the current subsection of the site. See Table 6.1 Content Categories.
*/
public List getSectioncat() {
return this.sectioncat;
}
/**
* Array of IAB content categories for the current subsection of the site. See Table 6.1 Content Categories.
*/
public SiteThrift setSectioncat(List sectioncat) {
this.sectioncat = sectioncat;
return this;
}
public void unsetSectioncat() {
this.sectioncat = null;
}
/** Returns true if field sectioncat is set (has been assigned a value) and false otherwise */
public boolean isSetSectioncat() {
return this.sectioncat != null;
}
public void setSectioncatIsSet(boolean value) {
if (!value) {
this.sectioncat = null;
}
}
public int getPagecatSize() {
return (this.pagecat == null) ? 0 : this.pagecat.size();
}
public java.util.Iterator getPagecatIterator() {
return (this.pagecat == null) ? null : this.pagecat.iterator();
}
public void addToPagecat(String elem) {
if (this.pagecat == null) {
this.pagecat = new ArrayList();
}
this.pagecat.add(elem);
}
/**
* Array of IAB content categories for the current page. See Table 6.1 Content Categories.
*/
public List getPagecat() {
return this.pagecat;
}
/**
* Array of IAB content categories for the current page. See Table 6.1 Content Categories.
*/
public SiteThrift setPagecat(List pagecat) {
this.pagecat = pagecat;
return this;
}
public void unsetPagecat() {
this.pagecat = null;
}
/** Returns true if field pagecat is set (has been assigned a value) and false otherwise */
public boolean isSetPagecat() {
return this.pagecat != null;
}
public void setPagecatIsSet(boolean value) {
if (!value) {
this.pagecat = null;
}
}
/**
* URL of the page where the impression will be shown.
*/
public String getPage() {
return this.page;
}
/**
* URL of the page where the impression will be shown.
*/
public SiteThrift setPage(String page) {
this.page = page;
return this;
}
public void unsetPage() {
this.page = null;
}
/** Returns true if field page is set (has been assigned a value) and false otherwise */
public boolean isSetPage() {
return this.page != null;
}
public void setPageIsSet(boolean value) {
if (!value) {
this.page = null;
}
}
/**
* Specifies whether the site has a privacy policy. “1” means there is a policy. “0” means there is not.
*/
public byte getPrivacypolicy() {
return this.privacypolicy;
}
/**
* Specifies whether the site has a privacy policy. “1” means there is a policy. “0” means there is not.
*/
public SiteThrift setPrivacypolicy(byte privacypolicy) {
this.privacypolicy = privacypolicy;
setPrivacypolicyIsSet(true);
return this;
}
public void unsetPrivacypolicy() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIVACYPOLICY_ISSET_ID);
}
/** Returns true if field privacypolicy is set (has been assigned a value) and false otherwise */
public boolean isSetPrivacypolicy() {
return EncodingUtils.testBit(__isset_bitfield, __PRIVACYPOLICY_ISSET_ID);
}
public void setPrivacypolicyIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIVACYPOLICY_ISSET_ID, value);
}
/**
* Referrer URL that caused navigation to the current page.
*/
public String getRef() {
return this.ref;
}
/**
* Referrer URL that caused navigation to the current page.
*/
public SiteThrift setRef(String ref) {
this.ref = ref;
return this;
}
public void unsetRef() {
this.ref = null;
}
/** Returns true if field ref is set (has been assigned a value) and false otherwise */
public boolean isSetRef() {
return this.ref != null;
}
public void setRefIsSet(boolean value) {
if (!value) {
this.ref = null;
}
}
/**
* Search string that caused navigation to the current page.
*/
public String getSearch() {
return this.search;
}
/**
* Search string that caused navigation to the current page.
*/
public SiteThrift setSearch(String search) {
this.search = search;
return this;
}
public void unsetSearch() {
this.search = null;
}
/** Returns true if field search is set (has been assigned a value) and false otherwise */
public boolean isSetSearch() {
return this.search != null;
}
public void setSearchIsSet(boolean value) {
if (!value) {
this.search = null;
}
}
/**
* See Publisher Object.
*/
public PublisherThrift getPublisher() {
return this.publisher;
}
/**
* See Publisher Object.
*/
public SiteThrift setPublisher(PublisherThrift publisher) {
this.publisher = publisher;
return this;
}
public void unsetPublisher() {
this.publisher = null;
}
/** Returns true if field publisher is set (has been assigned a value) and false otherwise */
public boolean isSetPublisher() {
return this.publisher != null;
}
public void setPublisherIsSet(boolean value) {
if (!value) {
this.publisher = null;
}
}
/**
* See Content Object.
*/
public ContentThrift getContent() {
return this.content;
}
/**
* See Content Object.
*/
public SiteThrift setContent(ContentThrift content) {
this.content = content;
return this;
}
public void unsetContent() {
this.content = null;
}
/** Returns true if field content is set (has been assigned a value) and false otherwise */
public boolean isSetContent() {
return this.content != null;
}
public void setContentIsSet(boolean value) {
if (!value) {
this.content = null;
}
}
/**
* List of keywords describing this site in a comma separated string.
*/
public String getKeywords() {
return this.keywords;
}
/**
* List of keywords describing this site in a comma separated string.
*/
public SiteThrift setKeywords(String keywords) {
this.keywords = keywords;
return this;
}
public void unsetKeywords() {
this.keywords = null;
}
/** Returns true if field keywords is set (has been assigned a value) and false otherwise */
public boolean isSetKeywords() {
return this.keywords != null;
}
public void setKeywordsIsSet(boolean value) {
if (!value) {
this.keywords = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
if (value == null) {
unsetId();
} else {
setId((String)value);
}
break;
case NAME:
if (value == null) {
unsetName();
} else {
setName((String)value);
}
break;
case DOMAIN:
if (value == null) {
unsetDomain();
} else {
setDomain((String)value);
}
break;
case CAT:
if (value == null) {
unsetCat();
} else {
setCat((List)value);
}
break;
case SECTIONCAT:
if (value == null) {
unsetSectioncat();
} else {
setSectioncat((List)value);
}
break;
case PAGECAT:
if (value == null) {
unsetPagecat();
} else {
setPagecat((List)value);
}
break;
case PAGE:
if (value == null) {
unsetPage();
} else {
setPage((String)value);
}
break;
case PRIVACYPOLICY:
if (value == null) {
unsetPrivacypolicy();
} else {
setPrivacypolicy((Byte)value);
}
break;
case REF:
if (value == null) {
unsetRef();
} else {
setRef((String)value);
}
break;
case SEARCH:
if (value == null) {
unsetSearch();
} else {
setSearch((String)value);
}
break;
case PUBLISHER:
if (value == null) {
unsetPublisher();
} else {
setPublisher((PublisherThrift)value);
}
break;
case CONTENT:
if (value == null) {
unsetContent();
} else {
setContent((ContentThrift)value);
}
break;
case KEYWORDS:
if (value == null) {
unsetKeywords();
} else {
setKeywords((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return getId();
case NAME:
return getName();
case DOMAIN:
return getDomain();
case CAT:
return getCat();
case SECTIONCAT:
return getSectioncat();
case PAGECAT:
return getPagecat();
case PAGE:
return getPage();
case PRIVACYPOLICY:
return Byte.valueOf(getPrivacypolicy());
case REF:
return getRef();
case SEARCH:
return getSearch();
case PUBLISHER:
return getPublisher();
case CONTENT:
return getContent();
case KEYWORDS:
return getKeywords();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case ID:
return isSetId();
case NAME:
return isSetName();
case DOMAIN:
return isSetDomain();
case CAT:
return isSetCat();
case SECTIONCAT:
return isSetSectioncat();
case PAGECAT:
return isSetPagecat();
case PAGE:
return isSetPage();
case PRIVACYPOLICY:
return isSetPrivacypolicy();
case REF:
return isSetRef();
case SEARCH:
return isSetSearch();
case PUBLISHER:
return isSetPublisher();
case CONTENT:
return isSetContent();
case KEYWORDS:
return isSetKeywords();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof SiteThrift)
return this.equals((SiteThrift)that);
return false;
}
public boolean equals(SiteThrift that) {
if (that == null)
return false;
boolean this_present_id = true && this.isSetId();
boolean that_present_id = true && that.isSetId();
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (!this.id.equals(that.id))
return false;
}
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
boolean this_present_domain = true && this.isSetDomain();
boolean that_present_domain = true && that.isSetDomain();
if (this_present_domain || that_present_domain) {
if (!(this_present_domain && that_present_domain))
return false;
if (!this.domain.equals(that.domain))
return false;
}
boolean this_present_cat = true && this.isSetCat();
boolean that_present_cat = true && that.isSetCat();
if (this_present_cat || that_present_cat) {
if (!(this_present_cat && that_present_cat))
return false;
if (!this.cat.equals(that.cat))
return false;
}
boolean this_present_sectioncat = true && this.isSetSectioncat();
boolean that_present_sectioncat = true && that.isSetSectioncat();
if (this_present_sectioncat || that_present_sectioncat) {
if (!(this_present_sectioncat && that_present_sectioncat))
return false;
if (!this.sectioncat.equals(that.sectioncat))
return false;
}
boolean this_present_pagecat = true && this.isSetPagecat();
boolean that_present_pagecat = true && that.isSetPagecat();
if (this_present_pagecat || that_present_pagecat) {
if (!(this_present_pagecat && that_present_pagecat))
return false;
if (!this.pagecat.equals(that.pagecat))
return false;
}
boolean this_present_page = true && this.isSetPage();
boolean that_present_page = true && that.isSetPage();
if (this_present_page || that_present_page) {
if (!(this_present_page && that_present_page))
return false;
if (!this.page.equals(that.page))
return false;
}
boolean this_present_privacypolicy = true && this.isSetPrivacypolicy();
boolean that_present_privacypolicy = true && that.isSetPrivacypolicy();
if (this_present_privacypolicy || that_present_privacypolicy) {
if (!(this_present_privacypolicy && that_present_privacypolicy))
return false;
if (this.privacypolicy != that.privacypolicy)
return false;
}
boolean this_present_ref = true && this.isSetRef();
boolean that_present_ref = true && that.isSetRef();
if (this_present_ref || that_present_ref) {
if (!(this_present_ref && that_present_ref))
return false;
if (!this.ref.equals(that.ref))
return false;
}
boolean this_present_search = true && this.isSetSearch();
boolean that_present_search = true && that.isSetSearch();
if (this_present_search || that_present_search) {
if (!(this_present_search && that_present_search))
return false;
if (!this.search.equals(that.search))
return false;
}
boolean this_present_publisher = true && this.isSetPublisher();
boolean that_present_publisher = true && that.isSetPublisher();
if (this_present_publisher || that_present_publisher) {
if (!(this_present_publisher && that_present_publisher))
return false;
if (!this.publisher.equals(that.publisher))
return false;
}
boolean this_present_content = true && this.isSetContent();
boolean that_present_content = true && that.isSetContent();
if (this_present_content || that_present_content) {
if (!(this_present_content && that_present_content))
return false;
if (!this.content.equals(that.content))
return false;
}
boolean this_present_keywords = true && this.isSetKeywords();
boolean that_present_keywords = true && that.isSetKeywords();
if (this_present_keywords || that_present_keywords) {
if (!(this_present_keywords && that_present_keywords))
return false;
if (!this.keywords.equals(that.keywords))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy