All Downloads are FREE. Search and download functionalities are using the official Maven repository.

open_rtb.AppThrift Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
/**
 * 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.6 App Object
 * An “app” object should be included if the ad supported content is part of a mobile application (as opposed to a mobile website). A bid request must not contain both an “app” object and a “site” object.
 * The app 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 an App ID or bundle, but this is not strictly required.
 */
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-6-3")
public class AppThrift 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("AppThrift");

  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 VER_FIELD_DESC = new org.apache.thrift.protocol.TField("ver", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField BUNDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("bundle", org.apache.thrift.protocol.TType.STRING, (short)8);
  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)9);
  private static final org.apache.thrift.protocol.TField PAID_FIELD_DESC = new org.apache.thrift.protocol.TField("paid", org.apache.thrift.protocol.TType.BYTE, (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 org.apache.thrift.protocol.TField STOREURL_FIELD_DESC = new org.apache.thrift.protocol.TField("storeurl", org.apache.thrift.protocol.TType.STRING, (short)14);

  private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new AppThriftStandardSchemeFactory());
    schemes.put(TupleScheme.class, new AppThriftTupleSchemeFactory());
  }

  /**
   * Application ID on the exchange.
   */
  public String id; // optional
  /**
   * Application name (may be masked at publisher’s request).
   */
  public String name; // optional
  /**
   * Domain of the application (e.g., “mygame.foo.com”).
   */
  public String domain; // optional
  /**
   * Array of IAB content categories for the overall application. See Table 6.1 Content Categories.
   */
  public List cat; // optional
  /**
   * Array of IAB content categories for the current subsection of the app. See Table 6.1 Content Categories.
   */
  public List sectioncat; // optional
  /**
   * Array of IAB content categories for the current page/view of the app. See Table 6.1 Content Categories.
   */
  public List pagecat; // optional
  /**
   * Application version.
   */
  public String ver; // optional
  /**
   * Application bundle or package name (e.g., com.foo.mygame). This is intended to be a unique ID across multiple exchanges.
   */
  public String bundle; // optional
  /**
   * Specifies whether the app has a privacy policy. “1” means there is a policy and “0” means there is not.
   */
  public byte privacypolicy; // optional
  /**
   * “1” if the application is a paid version; else “0” (i.e., free).
   */
  public byte paid; // optional
  /**
   * See Publisher Object.
   */
  public PublisherThrift publisher; // optional
  /**
   * See Content Object.
   */
  public ContentThrift content; // optional
  /**
   * List of keywords describing this app in a comma separated string.
   */
  public String keywords; // optional
  /**
   * For QAG 1.5 compliance, an app store URL for an installed app should be passed in the bid request.
   */
  public String storeurl; // 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 {
    /**
     * Application ID on the exchange.
     */
    ID((short)1, "id"),
    /**
     * Application name (may be masked at publisher’s request).
     */
    NAME((short)2, "name"),
    /**
     * Domain of the application (e.g., “mygame.foo.com”).
     */
    DOMAIN((short)3, "domain"),
    /**
     * Array of IAB content categories for the overall application. See Table 6.1 Content Categories.
     */
    CAT((short)4, "cat"),
    /**
     * Array of IAB content categories for the current subsection of the app. See Table 6.1 Content Categories.
     */
    SECTIONCAT((short)5, "sectioncat"),
    /**
     * Array of IAB content categories for the current page/view of the app. See Table 6.1 Content Categories.
     */
    PAGECAT((short)6, "pagecat"),
    /**
     * Application version.
     */
    VER((short)7, "ver"),
    /**
     * Application bundle or package name (e.g., com.foo.mygame). This is intended to be a unique ID across multiple exchanges.
     */
    BUNDLE((short)8, "bundle"),
    /**
     * Specifies whether the app has a privacy policy. “1” means there is a policy and “0” means there is not.
     */
    PRIVACYPOLICY((short)9, "privacypolicy"),
    /**
     * “1” if the application is a paid version; else “0” (i.e., free).
     */
    PAID((short)10, "paid"),
    /**
     * See Publisher Object.
     */
    PUBLISHER((short)11, "publisher"),
    /**
     * See Content Object.
     */
    CONTENT((short)12, "content"),
    /**
     * List of keywords describing this app in a comma separated string.
     */
    KEYWORDS((short)13, "keywords"),
    /**
     * For QAG 1.5 compliance, an app store URL for an installed app should be passed in the bid request.
     */
    STOREURL((short)14, "storeurl");

    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: // VER
          return VER;
        case 8: // BUNDLE
          return BUNDLE;
        case 9: // PRIVACYPOLICY
          return PRIVACYPOLICY;
        case 10: // PAID
          return PAID;
        case 11: // PUBLISHER
          return PUBLISHER;
        case 12: // CONTENT
          return CONTENT;
        case 13: // KEYWORDS
          return KEYWORDS;
        case 14: // STOREURL
          return STOREURL;
        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 static final int __PAID_ISSET_ID = 1;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.ID,_Fields.NAME,_Fields.DOMAIN,_Fields.CAT,_Fields.SECTIONCAT,_Fields.PAGECAT,_Fields.VER,_Fields.BUNDLE,_Fields.PRIVACYPOLICY,_Fields.PAID,_Fields.PUBLISHER,_Fields.CONTENT,_Fields.KEYWORDS,_Fields.STOREURL};
  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.VER, new org.apache.thrift.meta_data.FieldMetaData("ver", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.BUNDLE, new org.apache.thrift.meta_data.FieldMetaData("bundle", 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.PAID, new org.apache.thrift.meta_data.FieldMetaData("paid", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
    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)));
    tmpMap.put(_Fields.STOREURL, new org.apache.thrift.meta_data.FieldMetaData("storeurl", 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(AppThrift.class, metaDataMap);
  }

  public AppThrift() {
    this.id = "";

    this.name = "";

    this.domain = "";

    this.ver = "";

    this.bundle = "";

    this.privacypolicy = (byte)0;

    this.paid = (byte)0;

    this.keywords = "";

    this.storeurl = "";

  }

  /**
   * Performs a deep copy on other.
   */
  public AppThrift(AppThrift 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.isSetVer()) {
      this.ver = other.ver;
    }
    if (other.isSetBundle()) {
      this.bundle = other.bundle;
    }
    this.privacypolicy = other.privacypolicy;
    this.paid = other.paid;
    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;
    }
    if (other.isSetStoreurl()) {
      this.storeurl = other.storeurl;
    }
  }

  public AppThrift deepCopy() {
    return new AppThrift(this);
  }

  @Override
  public void clear() {
    this.id = "";

    this.name = "";

    this.domain = "";

    this.cat = null;
    this.sectioncat = null;
    this.pagecat = null;
    this.ver = "";

    this.bundle = "";

    this.privacypolicy = (byte)0;

    this.paid = (byte)0;

    this.publisher = null;
    this.content = null;
    this.keywords = "";

    this.storeurl = "";

  }

  /**
   * Application ID on the exchange.
   */
  public String getId() {
    return this.id;
  }

  /**
   * Application ID on the exchange.
   */
  public AppThrift 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;
    }
  }

  /**
   * Application name (may be masked at publisher’s request).
   */
  public String getName() {
    return this.name;
  }

  /**
   * Application name (may be masked at publisher’s request).
   */
  public AppThrift 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 application (e.g., “mygame.foo.com”).
   */
  public String getDomain() {
    return this.domain;
  }

  /**
   * Domain of the application (e.g., “mygame.foo.com”).
   */
  public AppThrift 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 application. See Table 6.1 Content Categories.
   */
  public List getCat() {
    return this.cat;
  }

  /**
   * Array of IAB content categories for the overall application. See Table 6.1 Content Categories.
   */
  public AppThrift 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 app. See Table 6.1 Content Categories.
   */
  public List getSectioncat() {
    return this.sectioncat;
  }

  /**
   * Array of IAB content categories for the current subsection of the app. See Table 6.1 Content Categories.
   */
  public AppThrift 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/view of the app. See Table 6.1 Content Categories.
   */
  public List getPagecat() {
    return this.pagecat;
  }

  /**
   * Array of IAB content categories for the current page/view of the app. See Table 6.1 Content Categories.
   */
  public AppThrift 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;
    }
  }

  /**
   * Application version.
   */
  public String getVer() {
    return this.ver;
  }

  /**
   * Application version.
   */
  public AppThrift setVer(String ver) {
    this.ver = ver;
    return this;
  }

  public void unsetVer() {
    this.ver = null;
  }

  /** Returns true if field ver is set (has been assigned a value) and false otherwise */
  public boolean isSetVer() {
    return this.ver != null;
  }

  public void setVerIsSet(boolean value) {
    if (!value) {
      this.ver = null;
    }
  }

  /**
   * Application bundle or package name (e.g., com.foo.mygame). This is intended to be a unique ID across multiple exchanges.
   */
  public String getBundle() {
    return this.bundle;
  }

  /**
   * Application bundle or package name (e.g., com.foo.mygame). This is intended to be a unique ID across multiple exchanges.
   */
  public AppThrift setBundle(String bundle) {
    this.bundle = bundle;
    return this;
  }

  public void unsetBundle() {
    this.bundle = null;
  }

  /** Returns true if field bundle is set (has been assigned a value) and false otherwise */
  public boolean isSetBundle() {
    return this.bundle != null;
  }

  public void setBundleIsSet(boolean value) {
    if (!value) {
      this.bundle = null;
    }
  }

  /**
   * Specifies whether the app has a privacy policy. “1” means there is a policy and “0” means there is not.
   */
  public byte getPrivacypolicy() {
    return this.privacypolicy;
  }

  /**
   * Specifies whether the app has a privacy policy. “1” means there is a policy and “0” means there is not.
   */
  public AppThrift 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);
  }

  /**
   * “1” if the application is a paid version; else “0” (i.e., free).
   */
  public byte getPaid() {
    return this.paid;
  }

  /**
   * “1” if the application is a paid version; else “0” (i.e., free).
   */
  public AppThrift setPaid(byte paid) {
    this.paid = paid;
    setPaidIsSet(true);
    return this;
  }

  public void unsetPaid() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAID_ISSET_ID);
  }

  /** Returns true if field paid is set (has been assigned a value) and false otherwise */
  public boolean isSetPaid() {
    return EncodingUtils.testBit(__isset_bitfield, __PAID_ISSET_ID);
  }

  public void setPaidIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAID_ISSET_ID, value);
  }

  /**
   * See Publisher Object.
   */
  public PublisherThrift getPublisher() {
    return this.publisher;
  }

  /**
   * See Publisher Object.
   */
  public AppThrift 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 AppThrift 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 app in a comma separated string.
   */
  public String getKeywords() {
    return this.keywords;
  }

  /**
   * List of keywords describing this app in a comma separated string.
   */
  public AppThrift 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;
    }
  }

  /**
   * For QAG 1.5 compliance, an app store URL for an installed app should be passed in the bid request.
   */
  public String getStoreurl() {
    return this.storeurl;
  }

  /**
   * For QAG 1.5 compliance, an app store URL for an installed app should be passed in the bid request.
   */
  public AppThrift setStoreurl(String storeurl) {
    this.storeurl = storeurl;
    return this;
  }

  public void unsetStoreurl() {
    this.storeurl = null;
  }

  /** Returns true if field storeurl is set (has been assigned a value) and false otherwise */
  public boolean isSetStoreurl() {
    return this.storeurl != null;
  }

  public void setStoreurlIsSet(boolean value) {
    if (!value) {
      this.storeurl = 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 VER:
      if (value == null) {
        unsetVer();
      } else {
        setVer((String)value);
      }
      break;

    case BUNDLE:
      if (value == null) {
        unsetBundle();
      } else {
        setBundle((String)value);
      }
      break;

    case PRIVACYPOLICY:
      if (value == null) {
        unsetPrivacypolicy();
      } else {
        setPrivacypolicy((Byte)value);
      }
      break;

    case PAID:
      if (value == null) {
        unsetPaid();
      } else {
        setPaid((Byte)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;

    case STOREURL:
      if (value == null) {
        unsetStoreurl();
      } else {
        setStoreurl((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 VER:
      return getVer();

    case BUNDLE:
      return getBundle();

    case PRIVACYPOLICY:
      return Byte.valueOf(getPrivacypolicy());

    case PAID:
      return Byte.valueOf(getPaid());

    case PUBLISHER:
      return getPublisher();

    case CONTENT:
      return getContent();

    case KEYWORDS:
      return getKeywords();

    case STOREURL:
      return getStoreurl();

    }
    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 VER:
      return isSetVer();
    case BUNDLE:
      return isSetBundle();
    case PRIVACYPOLICY:
      return isSetPrivacypolicy();
    case PAID:
      return isSetPaid();
    case PUBLISHER:
      return isSetPublisher();
    case CONTENT:
      return isSetContent();
    case KEYWORDS:
      return isSetKeywords();
    case STOREURL:
      return isSetStoreurl();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof AppThrift)
      return this.equals((AppThrift)that);
    return false;
  }

  public boolean equals(AppThrift 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_ver = true && this.isSetVer();
    boolean that_present_ver = true && that.isSetVer();
    if (this_present_ver || that_present_ver) {
      if (!(this_present_ver && that_present_ver))
        return false;
      if (!this.ver.equals(that.ver))
        return false;
    }

    boolean this_present_bundle = true && this.isSetBundle();
    boolean that_present_bundle = true && that.isSetBundle();
    if (this_present_bundle || that_present_bundle) {
      if (!(this_present_bundle && that_present_bundle))
        return false;
      if (!this.bundle.equals(that.bundle))
        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_paid = true && this.isSetPaid();
    boolean that_present_paid = true && that.isSetPaid();
    if (this_present_paid || that_present_paid) {
      if (!(this_present_paid && that_present_paid))
        return false;
      if (this.paid != that.paid)
        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;
    }

    boolean this_present_storeurl = true && this.isSetStoreurl();
    boolean that_present_storeurl = true && that.isSetStoreurl();
    if (this_present_storeurl || that_present_storeurl) {
      if (!(this_present_storeurl && that_present_storeurl))
        return false;
      if (!this.storeurl.equals(that.storeurl))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List list = new ArrayList();

    boolean present_id = true && (isSetId());
    list.add(present_id);
    if (present_id)
      list.add(id);

    boolean present_name = true && (isSetName());
    list.add(present_name);
    if (present_name)
      list.add(name);

    boolean present_domain = true && (isSetDomain());
    list.add(present_domain);
    if (present_domain)
      list.add(domain);

    boolean present_cat = true && (isSetCat());
    list.add(present_cat);
    if (present_cat)
      list.add(cat);

    boolean present_sectioncat = true && (isSetSectioncat());
    list.add(present_sectioncat);
    if (present_sectioncat)
      list.add(sectioncat);

    boolean present_pagecat = true && (isSetPagecat());
    list.add(present_pagecat);
    if (present_pagecat)
      list.add(pagecat);

    boolean present_ver = true && (isSetVer());
    list.add(present_ver);
    if (present_ver)
      list.add(ver);

    boolean present_bundle = true && (isSetBundle());
    list.add(present_bundle);
    if (present_bundle)
      list.add(bundle);

    boolean present_privacypolicy = true && (isSetPrivacypolicy());
    list.add(present_privacypolicy);
    if (present_privacypolicy)
      list.add(privacypolicy);

    boolean present_paid = true && (isSetPaid());
    list.add(present_paid);
    if (present_paid)
      list.add(paid);

    boolean present_publisher = true && (isSetPublisher());
    list.add(present_publisher);
    if (present_publisher)
      list.add(publisher);

    boolean present_content = true && (isSetContent());
    list.add(present_content);
    if (present_content)
      list.add(content);

    boolean present_keywords = true && (isSetKeywords());
    list.add(present_keywords);
    if (present_keywords)
      list.add(keywords);

    boolean present_storeurl = true && (isSetStoreurl());
    list.add(present_storeurl);
    if (present_storeurl)
      list.add(storeurl);

    return list.hashCode();
  }

  @Override
  public int compareTo(AppThrift other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDomain()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domain, other.domain);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCat()).compareTo(other.isSetCat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cat, other.cat);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSectioncat()).compareTo(other.isSetSectioncat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSectioncat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sectioncat, other.sectioncat);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPagecat()).compareTo(other.isSetPagecat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPagecat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pagecat, other.pagecat);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVer()).compareTo(other.isSetVer());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVer()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ver, other.ver);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBundle()).compareTo(other.isSetBundle());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBundle()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bundle, other.bundle);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPrivacypolicy()).compareTo(other.isSetPrivacypolicy());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPrivacypolicy()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privacypolicy, other.privacypolicy);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPaid()).compareTo(other.isSetPaid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPaid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paid, other.paid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPublisher()).compareTo(other.isSetPublisher());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPublisher()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.publisher, other.publisher);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetContent()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetKeywords()).compareTo(other.isSetKeywords());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKeywords()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keywords, other.keywords);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStoreurl()).compareTo(other.isSetStoreurl());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStoreurl()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storeurl, other.storeurl);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("AppThrift(");
    boolean first = true;

    if (isSetId()) {
      sb.append("id:");
      if (this.id == null) {
        sb.append("null");
      } else {
        sb.append(this.id);
      }
      first = false;
    }
    if (isSetName()) {
      if (!first) sb.append(", ");
      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
    }
    if (isSetDomain()) {
      if (!first) sb.append(", ");
      sb.append("domain:");
      if (this.domain == null) {
        sb.append("null");
      } else {
        sb.append(this.domain);
      }
      first = false;
    }
    if (isSetCat()) {
      if (!first) sb.append(", ");
      sb.append("cat:");
      if (this.cat == null) {
        sb.append("null");
      } else {
        sb.append(this.cat);
      }
      first = false;
    }
    if (isSetSectioncat()) {
      if (!first) sb.append(", ");
      sb.append("sectioncat:");
      if (this.sectioncat == null) {
        sb.append("null");
      } else {
        sb.append(this.sectioncat);
      }
      first = false;
    }
    if (isSetPagecat()) {
      if (!first) sb.append(", ");
      sb.append("pagecat:");
      if (this.pagecat == null) {
        sb.append("null");
      } else {
        sb.append(this.pagecat);
      }
      first = false;
    }
    if (isSetVer()) {
      if (!first) sb.append(", ");
      sb.append("ver:");
      if (this.ver == null) {
        sb.append("null");
      } else {
        sb.append(this.ver);
      }
      first = false;
    }
    if (isSetBundle()) {
      if (!first) sb.append(", ");
      sb.append("bundle:");
      if (this.bundle == null) {
        sb.append("null");
      } else {
        sb.append(this.bundle);
      }
      first = false;
    }
    if (isSetPrivacypolicy()) {
      if (!first) sb.append(", ");
      sb.append("privacypolicy:");
      sb.append(this.privacypolicy);
      first = false;
    }
    if (isSetPaid()) {
      if (!first) sb.append(", ");
      sb.append("paid:");
      sb.append(this.paid);
      first = false;
    }
    if (isSetPublisher()) {
      if (!first) sb.append(", ");
      sb.append("publisher:");
      if (this.publisher == null) {
        sb.append("null");
      } else {
        sb.append(this.publisher);
      }
      first = false;
    }
    if (isSetContent()) {
      if (!first) sb.append(", ");
      sb.append("content:");
      if (this.content == null) {
        sb.append("null");
      } else {
        sb.append(this.content);
      }
      first = false;
    }
    if (isSetKeywords()) {
      if (!first) sb.append(", ");
      sb.append("keywords:");
      if (this.keywords == null) {
        sb.append("null");
      } else {
        sb.append(this.keywords);
      }
      first = false;
    }
    if (isSetStoreurl()) {
      if (!first) sb.append(", ");
      sb.append("storeurl:");
      if (this.storeurl == null) {
        sb.append("null");
      } else {
        sb.append(this.storeurl);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
    if (publisher != null) {
      publisher.validate();
    }
    if (content != null) {
      content.validate();
    }
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class AppThriftStandardSchemeFactory implements SchemeFactory {
    public AppThriftStandardScheme getScheme() {
      return new AppThriftStandardScheme();
    }
  }

  private static class AppThriftStandardScheme extends StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, AppThrift struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.id = iprot.readString();
              struct.setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.name = iprot.readString();
              struct.setNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // DOMAIN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.domain = iprot.readString();
              struct.setDomainIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CAT
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list184 = iprot.readListBegin();
                struct.cat = new ArrayList(_list184.size);
                String _elem185;
                for (int _i186 = 0; _i186 < _list184.size; ++_i186)
                {
                  _elem185 = iprot.readString();
                  struct.cat.add(_elem185);
                }
                iprot.readListEnd();
              }
              struct.setCatIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // SECTIONCAT
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list187 = iprot.readListBegin();
                struct.sectioncat = new ArrayList(_list187.size);
                String _elem188;
                for (int _i189 = 0; _i189 < _list187.size; ++_i189)
                {
                  _elem188 = iprot.readString();
                  struct.sectioncat.add(_elem188);
                }
                iprot.readListEnd();
              }
              struct.setSectioncatIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // PAGECAT
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list190 = iprot.readListBegin();
                struct.pagecat = new ArrayList(_list190.size);
                String _elem191;
                for (int _i192 = 0; _i192 < _list190.size; ++_i192)
                {
                  _elem191 = iprot.readString();
                  struct.pagecat.add(_elem191);
                }
                iprot.readListEnd();
              }
              struct.setPagecatIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // VER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.ver = iprot.readString();
              struct.setVerIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // BUNDLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.bundle = iprot.readString();
              struct.setBundleIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // PRIVACYPOLICY
            if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
              struct.privacypolicy = iprot.readByte();
              struct.setPrivacypolicyIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // PAID
            if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
              struct.paid = iprot.readByte();
              struct.setPaidIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // PUBLISHER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.publisher = new PublisherThrift();
              struct.publisher.read(iprot);
              struct.setPublisherIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // CONTENT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.content = new ContentThrift();
              struct.content.read(iprot);
              struct.setContentIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // KEYWORDS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.keywords = iprot.readString();
              struct.setKeywordsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // STOREURL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.storeurl = iprot.readString();
              struct.setStoreurlIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, AppThrift struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.id != null) {
        if (struct.isSetId()) {
          oprot.writeFieldBegin(ID_FIELD_DESC);
          oprot.writeString(struct.id);
          oprot.writeFieldEnd();
        }
      }
      if (struct.name != null) {
        if (struct.isSetName()) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.domain != null) {
        if (struct.isSetDomain()) {
          oprot.writeFieldBegin(DOMAIN_FIELD_DESC);
          oprot.writeString(struct.domain);
          oprot.writeFieldEnd();
        }
      }
      if (struct.cat != null) {
        if (struct.isSetCat()) {
          oprot.writeFieldBegin(CAT_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.cat.size()));
            for (String _iter193 : struct.cat)
            {
              oprot.writeString(_iter193);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.sectioncat != null) {
        if (struct.isSetSectioncat()) {
          oprot.writeFieldBegin(SECTIONCAT_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sectioncat.size()));
            for (String _iter194 : struct.sectioncat)
            {
              oprot.writeString(_iter194);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.pagecat != null) {
        if (struct.isSetPagecat()) {
          oprot.writeFieldBegin(PAGECAT_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.pagecat.size()));
            for (String _iter195 : struct.pagecat)
            {
              oprot.writeString(_iter195);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.ver != null) {
        if (struct.isSetVer()) {
          oprot.writeFieldBegin(VER_FIELD_DESC);
          oprot.writeString(struct.ver);
          oprot.writeFieldEnd();
        }
      }
      if (struct.bundle != null) {
        if (struct.isSetBundle()) {
          oprot.writeFieldBegin(BUNDLE_FIELD_DESC);
          oprot.writeString(struct.bundle);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetPrivacypolicy()) {
        oprot.writeFieldBegin(PRIVACYPOLICY_FIELD_DESC);
        oprot.writeByte(struct.privacypolicy);
        oprot.writeFieldEnd();
      }
      if (struct.isSetPaid()) {
        oprot.writeFieldBegin(PAID_FIELD_DESC);
        oprot.writeByte(struct.paid);
        oprot.writeFieldEnd();
      }
      if (struct.publisher != null) {
        if (struct.isSetPublisher()) {
          oprot.writeFieldBegin(PUBLISHER_FIELD_DESC);
          struct.publisher.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.content != null) {
        if (struct.isSetContent()) {
          oprot.writeFieldBegin(CONTENT_FIELD_DESC);
          struct.content.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.keywords != null) {
        if (struct.isSetKeywords()) {
          oprot.writeFieldBegin(KEYWORDS_FIELD_DESC);
          oprot.writeString(struct.keywords);
          oprot.writeFieldEnd();
        }
      }
      if (struct.storeurl != null) {
        if (struct.isSetStoreurl()) {
          oprot.writeFieldBegin(STOREURL_FIELD_DESC);
          oprot.writeString(struct.storeurl);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class AppThriftTupleSchemeFactory implements SchemeFactory {
    public AppThriftTupleScheme getScheme() {
      return new AppThriftTupleScheme();
    }
  }

  private static class AppThriftTupleScheme extends TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, AppThrift struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetId()) {
        optionals.set(0);
      }
      if (struct.isSetName()) {
        optionals.set(1);
      }
      if (struct.isSetDomain()) {
        optionals.set(2);
      }
      if (struct.isSetCat()) {
        optionals.set(3);
      }
      if (struct.isSetSectioncat()) {
        optionals.set(4);
      }
      if (struct.isSetPagecat()) {
        optionals.set(5);
      }
      if (struct.isSetVer()) {
        optionals.set(6);
      }
      if (struct.isSetBundle()) {
        optionals.set(7);
      }
      if (struct.isSetPrivacypolicy()) {
        optionals.set(8);
      }
      if (struct.isSetPaid()) {
        optionals.set(9);
      }
      if (struct.isSetPublisher()) {
        optionals.set(10);
      }
      if (struct.isSetContent()) {
        optionals.set(11);
      }
      if (struct.isSetKeywords()) {
        optionals.set(12);
      }
      if (struct.isSetStoreurl()) {
        optionals.set(13);
      }
      oprot.writeBitSet(optionals, 14);
      if (struct.isSetId()) {
        oprot.writeString(struct.id);
      }
      if (struct.isSetName()) {
        oprot.writeString(struct.name);
      }
      if (struct.isSetDomain()) {
        oprot.writeString(struct.domain);
      }
      if (struct.isSetCat()) {
        {
          oprot.writeI32(struct.cat.size());
          for (String _iter196 : struct.cat)
          {
            oprot.writeString(_iter196);
          }
        }
      }
      if (struct.isSetSectioncat()) {
        {
          oprot.writeI32(struct.sectioncat.size());
          for (String _iter197 : struct.sectioncat)
          {
            oprot.writeString(_iter197);
          }
        }
      }
      if (struct.isSetPagecat()) {
        {
          oprot.writeI32(struct.pagecat.size());
          for (String _iter198 : struct.pagecat)
          {
            oprot.writeString(_iter198);
          }
        }
      }
      if (struct.isSetVer()) {
        oprot.writeString(struct.ver);
      }
      if (struct.isSetBundle()) {
        oprot.writeString(struct.bundle);
      }
      if (struct.isSetPrivacypolicy()) {
        oprot.writeByte(struct.privacypolicy);
      }
      if (struct.isSetPaid()) {
        oprot.writeByte(struct.paid);
      }
      if (struct.isSetPublisher()) {
        struct.publisher.write(oprot);
      }
      if (struct.isSetContent()) {
        struct.content.write(oprot);
      }
      if (struct.isSetKeywords()) {
        oprot.writeString(struct.keywords);
      }
      if (struct.isSetStoreurl()) {
        oprot.writeString(struct.storeurl);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, AppThrift struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(14);
      if (incoming.get(0)) {
        struct.id = iprot.readString();
        struct.setIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.domain = iprot.readString();
        struct.setDomainIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.cat = new ArrayList(_list199.size);
          String _elem200;
          for (int _i201 = 0; _i201 < _list199.size; ++_i201)
          {
            _elem200 = iprot.readString();
            struct.cat.add(_elem200);
          }
        }
        struct.setCatIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list202 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.sectioncat = new ArrayList(_list202.size);
          String _elem203;
          for (int _i204 = 0; _i204 < _list202.size; ++_i204)
          {
            _elem203 = iprot.readString();
            struct.sectioncat.add(_elem203);
          }
        }
        struct.setSectioncatIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.thrift.protocol.TList _list205 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.pagecat = new ArrayList(_list205.size);
          String _elem206;
          for (int _i207 = 0; _i207 < _list205.size; ++_i207)
          {
            _elem206 = iprot.readString();
            struct.pagecat.add(_elem206);
          }
        }
        struct.setPagecatIsSet(true);
      }
      if (incoming.get(6)) {
        struct.ver = iprot.readString();
        struct.setVerIsSet(true);
      }
      if (incoming.get(7)) {
        struct.bundle = iprot.readString();
        struct.setBundleIsSet(true);
      }
      if (incoming.get(8)) {
        struct.privacypolicy = iprot.readByte();
        struct.setPrivacypolicyIsSet(true);
      }
      if (incoming.get(9)) {
        struct.paid = iprot.readByte();
        struct.setPaidIsSet(true);
      }
      if (incoming.get(10)) {
        struct.publisher = new PublisherThrift();
        struct.publisher.read(iprot);
        struct.setPublisherIsSet(true);
      }
      if (incoming.get(11)) {
        struct.content = new ContentThrift();
        struct.content.read(iprot);
        struct.setContentIsSet(true);
      }
      if (incoming.get(12)) {
        struct.keywords = iprot.readString();
        struct.setKeywordsIsSet(true);
      }
      if (incoming.get(13)) {
        struct.storeurl = iprot.readString();
        struct.setStoreurlIsSet(true);
      }
    }
  }

}