/**
 * Autogenerated by Thrift Compiler (0.20.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.jetbrains.cef.remote.thrift_codegen;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class ContextMenuParams implements com.jetbrains.cef.remote.thrift.TBase<ContextMenuParams, ContextMenuParams._Fields>, java.io.Serializable, Cloneable, Comparable<ContextMenuParams> {
  private static final com.jetbrains.cef.remote.thrift.protocol.TStruct STRUCT_DESC = new com.jetbrains.cef.remote.thrift.protocol.TStruct("ContextMenuParams");

  private static final com.jetbrains.cef.remote.thrift.protocol.TField X_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("x", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)1);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField Y_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("y", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)2);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField TYPE_FLAGS_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("type_flags", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)3);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField LINK_URL_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("link_url", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)4);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField UNFILTERED_LINK_URL_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("unfiltered_link_url", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)5);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField SOURCE_URL_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("source_url", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)6);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField HAS_IMAGE_CONTENTS_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("has_image_contents", com.jetbrains.cef.remote.thrift.protocol.TType.BOOL, (short)7);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField TITLE_TEXT_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("title_text", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)8);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField PAGE_URL_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("page_url", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)9);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField FRAME_URL_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("frame_url", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)10);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField FRAME_CHARSET_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("frame_charset", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)11);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField MEDIA_TYPE_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("media_type", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)12);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField MEDIA_STATE_FLAGS_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("media_state_flags", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)13);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField SELECTED_TEXT_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("selected_text", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)14);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField MISSPELLED_WORD_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("misspelled_word", com.jetbrains.cef.remote.thrift.protocol.TType.STRING, (short)15);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField IS_EDITABLE_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("is_editable", com.jetbrains.cef.remote.thrift.protocol.TType.BOOL, (short)16);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField IS_SPELLCHECK_ENABLED_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("is_spellcheck_enabled", com.jetbrains.cef.remote.thrift.protocol.TType.BOOL, (short)17);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField EDIT_STATE_FLAGS_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("edit_state_flags", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)18);
  private static final com.jetbrains.cef.remote.thrift.protocol.TField IS_CUSTOM_MENU_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("is_custom_menu", com.jetbrains.cef.remote.thrift.protocol.TType.BOOL, (short)19);

  private static final com.jetbrains.cef.remote.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ContextMenuParamsStandardSchemeFactory();
  private static final com.jetbrains.cef.remote.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ContextMenuParamsTupleSchemeFactory();

  public int x; // required
  public int y; // required
  public int type_flags; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String link_url; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String unfiltered_link_url; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String source_url; // required
  public boolean has_image_contents; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String title_text; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String page_url; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String frame_url; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String frame_charset; // required
  public int media_type; // required
  public int media_state_flags; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String selected_text; // required
  public @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String misspelled_word; // required
  public boolean is_editable; // required
  public boolean is_spellcheck_enabled; // required
  public int edit_state_flags; // required
  public boolean is_custom_menu; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements com.jetbrains.cef.remote.thrift.TFieldIdEnum {
    X((short)1, "x"),
    Y((short)2, "y"),
    TYPE_FLAGS((short)3, "type_flags"),
    LINK_URL((short)4, "link_url"),
    UNFILTERED_LINK_URL((short)5, "unfiltered_link_url"),
    SOURCE_URL((short)6, "source_url"),
    HAS_IMAGE_CONTENTS((short)7, "has_image_contents"),
    TITLE_TEXT((short)8, "title_text"),
    PAGE_URL((short)9, "page_url"),
    FRAME_URL((short)10, "frame_url"),
    FRAME_CHARSET((short)11, "frame_charset"),
    MEDIA_TYPE((short)12, "media_type"),
    MEDIA_STATE_FLAGS((short)13, "media_state_flags"),
    SELECTED_TEXT((short)14, "selected_text"),
    MISSPELLED_WORD((short)15, "misspelled_word"),
    IS_EDITABLE((short)16, "is_editable"),
    IS_SPELLCHECK_ENABLED((short)17, "is_spellcheck_enabled"),
    EDIT_STATE_FLAGS((short)18, "edit_state_flags"),
    IS_CUSTOM_MENU((short)19, "is_custom_menu");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @com.jetbrains.cef.remote.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // X
          return X;
        case 2: // Y
          return Y;
        case 3: // TYPE_FLAGS
          return TYPE_FLAGS;
        case 4: // LINK_URL
          return LINK_URL;
        case 5: // UNFILTERED_LINK_URL
          return UNFILTERED_LINK_URL;
        case 6: // SOURCE_URL
          return SOURCE_URL;
        case 7: // HAS_IMAGE_CONTENTS
          return HAS_IMAGE_CONTENTS;
        case 8: // TITLE_TEXT
          return TITLE_TEXT;
        case 9: // PAGE_URL
          return PAGE_URL;
        case 10: // FRAME_URL
          return FRAME_URL;
        case 11: // FRAME_CHARSET
          return FRAME_CHARSET;
        case 12: // MEDIA_TYPE
          return MEDIA_TYPE;
        case 13: // MEDIA_STATE_FLAGS
          return MEDIA_STATE_FLAGS;
        case 14: // SELECTED_TEXT
          return SELECTED_TEXT;
        case 15: // MISSPELLED_WORD
          return MISSPELLED_WORD;
        case 16: // IS_EDITABLE
          return IS_EDITABLE;
        case 17: // IS_SPELLCHECK_ENABLED
          return IS_SPELLCHECK_ENABLED;
        case 18: // EDIT_STATE_FLAGS
          return EDIT_STATE_FLAGS;
        case 19: // IS_CUSTOM_MENU
          return IS_CUSTOM_MENU;
        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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @com.jetbrains.cef.remote.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    @Override
    public short getThriftFieldId() {
      return _thriftId;
    }

    @Override
    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __X_ISSET_ID = 0;
  private static final int __Y_ISSET_ID = 1;
  private static final int __TYPE_FLAGS_ISSET_ID = 2;
  private static final int __HAS_IMAGE_CONTENTS_ISSET_ID = 3;
  private static final int __MEDIA_TYPE_ISSET_ID = 4;
  private static final int __MEDIA_STATE_FLAGS_ISSET_ID = 5;
  private static final int __IS_EDITABLE_ISSET_ID = 6;
  private static final int __IS_SPELLCHECK_ENABLED_ISSET_ID = 7;
  private static final int __EDIT_STATE_FLAGS_ISSET_ID = 8;
  private static final int __IS_CUSTOM_MENU_ISSET_ID = 9;
  private short __isset_bitfield = 0;
  public static final java.util.Map<_Fields, com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.X, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("x", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.Y, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("y", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.TYPE_FLAGS, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("type_flags", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.LINK_URL, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("link_url", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.UNFILTERED_LINK_URL, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("unfiltered_link_url", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SOURCE_URL, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("source_url", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.HAS_IMAGE_CONTENTS, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("has_image_contents", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.TITLE_TEXT, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("title_text", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PAGE_URL, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("page_url", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FRAME_URL, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("frame_url", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FRAME_CHARSET, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("frame_charset", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MEDIA_TYPE, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("media_type", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.MEDIA_STATE_FLAGS, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("media_state_flags", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.SELECTED_TEXT, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("selected_text", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MISSPELLED_WORD, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("misspelled_word", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IS_EDITABLE, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("is_editable", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_SPELLCHECK_ENABLED, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("is_spellcheck_enabled", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.EDIT_STATE_FLAGS, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("edit_state_flags", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.IS_CUSTOM_MENU, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("is_custom_menu", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED, 
        new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.BOOL)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ContextMenuParams.class, metaDataMap);
  }

  public ContextMenuParams() {
  }

  public ContextMenuParams(
    int x,
    int y,
    int type_flags,
    java.lang.String link_url,
    java.lang.String unfiltered_link_url,
    java.lang.String source_url,
    boolean has_image_contents,
    java.lang.String title_text,
    java.lang.String page_url,
    java.lang.String frame_url,
    java.lang.String frame_charset,
    int media_type,
    int media_state_flags,
    java.lang.String selected_text,
    java.lang.String misspelled_word,
    boolean is_editable,
    boolean is_spellcheck_enabled,
    int edit_state_flags,
    boolean is_custom_menu)
  {
    this();
    this.x = x;
    setXIsSet(true);
    this.y = y;
    setYIsSet(true);
    this.type_flags = type_flags;
    setType_flagsIsSet(true);
    this.link_url = link_url;
    this.unfiltered_link_url = unfiltered_link_url;
    this.source_url = source_url;
    this.has_image_contents = has_image_contents;
    setHas_image_contentsIsSet(true);
    this.title_text = title_text;
    this.page_url = page_url;
    this.frame_url = frame_url;
    this.frame_charset = frame_charset;
    this.media_type = media_type;
    setMedia_typeIsSet(true);
    this.media_state_flags = media_state_flags;
    setMedia_state_flagsIsSet(true);
    this.selected_text = selected_text;
    this.misspelled_word = misspelled_word;
    this.is_editable = is_editable;
    setIs_editableIsSet(true);
    this.is_spellcheck_enabled = is_spellcheck_enabled;
    setIs_spellcheck_enabledIsSet(true);
    this.edit_state_flags = edit_state_flags;
    setEdit_state_flagsIsSet(true);
    this.is_custom_menu = is_custom_menu;
    setIs_custom_menuIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public ContextMenuParams(ContextMenuParams other) {
    __isset_bitfield = other.__isset_bitfield;
    this.x = other.x;
    this.y = other.y;
    this.type_flags = other.type_flags;
    if (other.isSetLink_url()) {
      this.link_url = other.link_url;
    }
    if (other.isSetUnfiltered_link_url()) {
      this.unfiltered_link_url = other.unfiltered_link_url;
    }
    if (other.isSetSource_url()) {
      this.source_url = other.source_url;
    }
    this.has_image_contents = other.has_image_contents;
    if (other.isSetTitle_text()) {
      this.title_text = other.title_text;
    }
    if (other.isSetPage_url()) {
      this.page_url = other.page_url;
    }
    if (other.isSetFrame_url()) {
      this.frame_url = other.frame_url;
    }
    if (other.isSetFrame_charset()) {
      this.frame_charset = other.frame_charset;
    }
    this.media_type = other.media_type;
    this.media_state_flags = other.media_state_flags;
    if (other.isSetSelected_text()) {
      this.selected_text = other.selected_text;
    }
    if (other.isSetMisspelled_word()) {
      this.misspelled_word = other.misspelled_word;
    }
    this.is_editable = other.is_editable;
    this.is_spellcheck_enabled = other.is_spellcheck_enabled;
    this.edit_state_flags = other.edit_state_flags;
    this.is_custom_menu = other.is_custom_menu;
  }

  @Override
  public ContextMenuParams deepCopy() {
    return new ContextMenuParams(this);
  }

  @Override
  public void clear() {
    setXIsSet(false);
    this.x = 0;
    setYIsSet(false);
    this.y = 0;
    setType_flagsIsSet(false);
    this.type_flags = 0;
    this.link_url = null;
    this.unfiltered_link_url = null;
    this.source_url = null;
    setHas_image_contentsIsSet(false);
    this.has_image_contents = false;
    this.title_text = null;
    this.page_url = null;
    this.frame_url = null;
    this.frame_charset = null;
    setMedia_typeIsSet(false);
    this.media_type = 0;
    setMedia_state_flagsIsSet(false);
    this.media_state_flags = 0;
    this.selected_text = null;
    this.misspelled_word = null;
    setIs_editableIsSet(false);
    this.is_editable = false;
    setIs_spellcheck_enabledIsSet(false);
    this.is_spellcheck_enabled = false;
    setEdit_state_flagsIsSet(false);
    this.edit_state_flags = 0;
    setIs_custom_menuIsSet(false);
    this.is_custom_menu = false;
  }

  public int getX() {
    return this.x;
  }

  public ContextMenuParams setX(int x) {
    this.x = x;
    setXIsSet(true);
    return this;
  }

  public void unsetX() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __X_ISSET_ID);
  }

  /** Returns true if field x is set (has been assigned a value) and false otherwise */
  public boolean isSetX() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __X_ISSET_ID);
  }

  public void setXIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __X_ISSET_ID, value);
  }

  public int getY() {
    return this.y;
  }

  public ContextMenuParams setY(int y) {
    this.y = y;
    setYIsSet(true);
    return this;
  }

  public void unsetY() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __Y_ISSET_ID);
  }

  /** Returns true if field y is set (has been assigned a value) and false otherwise */
  public boolean isSetY() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __Y_ISSET_ID);
  }

  public void setYIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __Y_ISSET_ID, value);
  }

  public int getType_flags() {
    return this.type_flags;
  }

  public ContextMenuParams setType_flags(int type_flags) {
    this.type_flags = type_flags;
    setType_flagsIsSet(true);
    return this;
  }

  public void unsetType_flags() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_FLAGS_ISSET_ID);
  }

  /** Returns true if field type_flags is set (has been assigned a value) and false otherwise */
  public boolean isSetType_flags() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_FLAGS_ISSET_ID);
  }

  public void setType_flagsIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_FLAGS_ISSET_ID, value);
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getLink_url() {
    return this.link_url;
  }

  public ContextMenuParams setLink_url(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String link_url) {
    this.link_url = link_url;
    return this;
  }

  public void unsetLink_url() {
    this.link_url = null;
  }

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

  public void setLink_urlIsSet(boolean value) {
    if (!value) {
      this.link_url = null;
    }
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getUnfiltered_link_url() {
    return this.unfiltered_link_url;
  }

  public ContextMenuParams setUnfiltered_link_url(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String unfiltered_link_url) {
    this.unfiltered_link_url = unfiltered_link_url;
    return this;
  }

  public void unsetUnfiltered_link_url() {
    this.unfiltered_link_url = null;
  }

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

  public void setUnfiltered_link_urlIsSet(boolean value) {
    if (!value) {
      this.unfiltered_link_url = null;
    }
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getSource_url() {
    return this.source_url;
  }

  public ContextMenuParams setSource_url(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String source_url) {
    this.source_url = source_url;
    return this;
  }

  public void unsetSource_url() {
    this.source_url = null;
  }

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

  public void setSource_urlIsSet(boolean value) {
    if (!value) {
      this.source_url = null;
    }
  }

  public boolean isHas_image_contents() {
    return this.has_image_contents;
  }

  public ContextMenuParams setHas_image_contents(boolean has_image_contents) {
    this.has_image_contents = has_image_contents;
    setHas_image_contentsIsSet(true);
    return this;
  }

  public void unsetHas_image_contents() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __HAS_IMAGE_CONTENTS_ISSET_ID);
  }

  /** Returns true if field has_image_contents is set (has been assigned a value) and false otherwise */
  public boolean isSetHas_image_contents() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __HAS_IMAGE_CONTENTS_ISSET_ID);
  }

  public void setHas_image_contentsIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __HAS_IMAGE_CONTENTS_ISSET_ID, value);
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getTitle_text() {
    return this.title_text;
  }

  public ContextMenuParams setTitle_text(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String title_text) {
    this.title_text = title_text;
    return this;
  }

  public void unsetTitle_text() {
    this.title_text = null;
  }

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

  public void setTitle_textIsSet(boolean value) {
    if (!value) {
      this.title_text = null;
    }
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getPage_url() {
    return this.page_url;
  }

  public ContextMenuParams setPage_url(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String page_url) {
    this.page_url = page_url;
    return this;
  }

  public void unsetPage_url() {
    this.page_url = null;
  }

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

  public void setPage_urlIsSet(boolean value) {
    if (!value) {
      this.page_url = null;
    }
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getFrame_url() {
    return this.frame_url;
  }

  public ContextMenuParams setFrame_url(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String frame_url) {
    this.frame_url = frame_url;
    return this;
  }

  public void unsetFrame_url() {
    this.frame_url = null;
  }

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

  public void setFrame_urlIsSet(boolean value) {
    if (!value) {
      this.frame_url = null;
    }
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getFrame_charset() {
    return this.frame_charset;
  }

  public ContextMenuParams setFrame_charset(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String frame_charset) {
    this.frame_charset = frame_charset;
    return this;
  }

  public void unsetFrame_charset() {
    this.frame_charset = null;
  }

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

  public void setFrame_charsetIsSet(boolean value) {
    if (!value) {
      this.frame_charset = null;
    }
  }

  public int getMedia_type() {
    return this.media_type;
  }

  public ContextMenuParams setMedia_type(int media_type) {
    this.media_type = media_type;
    setMedia_typeIsSet(true);
    return this;
  }

  public void unsetMedia_type() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEDIA_TYPE_ISSET_ID);
  }

  /** Returns true if field media_type is set (has been assigned a value) and false otherwise */
  public boolean isSetMedia_type() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __MEDIA_TYPE_ISSET_ID);
  }

  public void setMedia_typeIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __MEDIA_TYPE_ISSET_ID, value);
  }

  public int getMedia_state_flags() {
    return this.media_state_flags;
  }

  public ContextMenuParams setMedia_state_flags(int media_state_flags) {
    this.media_state_flags = media_state_flags;
    setMedia_state_flagsIsSet(true);
    return this;
  }

  public void unsetMedia_state_flags() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEDIA_STATE_FLAGS_ISSET_ID);
  }

  /** Returns true if field media_state_flags is set (has been assigned a value) and false otherwise */
  public boolean isSetMedia_state_flags() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __MEDIA_STATE_FLAGS_ISSET_ID);
  }

  public void setMedia_state_flagsIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __MEDIA_STATE_FLAGS_ISSET_ID, value);
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getSelected_text() {
    return this.selected_text;
  }

  public ContextMenuParams setSelected_text(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String selected_text) {
    this.selected_text = selected_text;
    return this;
  }

  public void unsetSelected_text() {
    this.selected_text = null;
  }

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

  public void setSelected_textIsSet(boolean value) {
    if (!value) {
      this.selected_text = null;
    }
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  public java.lang.String getMisspelled_word() {
    return this.misspelled_word;
  }

  public ContextMenuParams setMisspelled_word(@com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.String misspelled_word) {
    this.misspelled_word = misspelled_word;
    return this;
  }

  public void unsetMisspelled_word() {
    this.misspelled_word = null;
  }

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

  public void setMisspelled_wordIsSet(boolean value) {
    if (!value) {
      this.misspelled_word = null;
    }
  }

  public boolean isIs_editable() {
    return this.is_editable;
  }

  public ContextMenuParams setIs_editable(boolean is_editable) {
    this.is_editable = is_editable;
    setIs_editableIsSet(true);
    return this;
  }

  public void unsetIs_editable() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_EDITABLE_ISSET_ID);
  }

  /** Returns true if field is_editable is set (has been assigned a value) and false otherwise */
  public boolean isSetIs_editable() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_EDITABLE_ISSET_ID);
  }

  public void setIs_editableIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_EDITABLE_ISSET_ID, value);
  }

  public boolean isIs_spellcheck_enabled() {
    return this.is_spellcheck_enabled;
  }

  public ContextMenuParams setIs_spellcheck_enabled(boolean is_spellcheck_enabled) {
    this.is_spellcheck_enabled = is_spellcheck_enabled;
    setIs_spellcheck_enabledIsSet(true);
    return this;
  }

  public void unsetIs_spellcheck_enabled() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_SPELLCHECK_ENABLED_ISSET_ID);
  }

  /** Returns true if field is_spellcheck_enabled is set (has been assigned a value) and false otherwise */
  public boolean isSetIs_spellcheck_enabled() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_SPELLCHECK_ENABLED_ISSET_ID);
  }

  public void setIs_spellcheck_enabledIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_SPELLCHECK_ENABLED_ISSET_ID, value);
  }

  public int getEdit_state_flags() {
    return this.edit_state_flags;
  }

  public ContextMenuParams setEdit_state_flags(int edit_state_flags) {
    this.edit_state_flags = edit_state_flags;
    setEdit_state_flagsIsSet(true);
    return this;
  }

  public void unsetEdit_state_flags() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __EDIT_STATE_FLAGS_ISSET_ID);
  }

  /** Returns true if field edit_state_flags is set (has been assigned a value) and false otherwise */
  public boolean isSetEdit_state_flags() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __EDIT_STATE_FLAGS_ISSET_ID);
  }

  public void setEdit_state_flagsIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __EDIT_STATE_FLAGS_ISSET_ID, value);
  }

  public boolean isIs_custom_menu() {
    return this.is_custom_menu;
  }

  public ContextMenuParams setIs_custom_menu(boolean is_custom_menu) {
    this.is_custom_menu = is_custom_menu;
    setIs_custom_menuIsSet(true);
    return this;
  }

  public void unsetIs_custom_menu() {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_CUSTOM_MENU_ISSET_ID);
  }

  /** Returns true if field is_custom_menu is set (has been assigned a value) and false otherwise */
  public boolean isSetIs_custom_menu() {
    return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_CUSTOM_MENU_ISSET_ID);
  }

  public void setIs_custom_menuIsSet(boolean value) {
    __isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_CUSTOM_MENU_ISSET_ID, value);
  }

  @Override
  public void setFieldValue(_Fields field, @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case X:
      if (value == null) {
        unsetX();
      } else {
        setX((java.lang.Integer)value);
      }
      break;

    case Y:
      if (value == null) {
        unsetY();
      } else {
        setY((java.lang.Integer)value);
      }
      break;

    case TYPE_FLAGS:
      if (value == null) {
        unsetType_flags();
      } else {
        setType_flags((java.lang.Integer)value);
      }
      break;

    case LINK_URL:
      if (value == null) {
        unsetLink_url();
      } else {
        setLink_url((java.lang.String)value);
      }
      break;

    case UNFILTERED_LINK_URL:
      if (value == null) {
        unsetUnfiltered_link_url();
      } else {
        setUnfiltered_link_url((java.lang.String)value);
      }
      break;

    case SOURCE_URL:
      if (value == null) {
        unsetSource_url();
      } else {
        setSource_url((java.lang.String)value);
      }
      break;

    case HAS_IMAGE_CONTENTS:
      if (value == null) {
        unsetHas_image_contents();
      } else {
        setHas_image_contents((java.lang.Boolean)value);
      }
      break;

    case TITLE_TEXT:
      if (value == null) {
        unsetTitle_text();
      } else {
        setTitle_text((java.lang.String)value);
      }
      break;

    case PAGE_URL:
      if (value == null) {
        unsetPage_url();
      } else {
        setPage_url((java.lang.String)value);
      }
      break;

    case FRAME_URL:
      if (value == null) {
        unsetFrame_url();
      } else {
        setFrame_url((java.lang.String)value);
      }
      break;

    case FRAME_CHARSET:
      if (value == null) {
        unsetFrame_charset();
      } else {
        setFrame_charset((java.lang.String)value);
      }
      break;

    case MEDIA_TYPE:
      if (value == null) {
        unsetMedia_type();
      } else {
        setMedia_type((java.lang.Integer)value);
      }
      break;

    case MEDIA_STATE_FLAGS:
      if (value == null) {
        unsetMedia_state_flags();
      } else {
        setMedia_state_flags((java.lang.Integer)value);
      }
      break;

    case SELECTED_TEXT:
      if (value == null) {
        unsetSelected_text();
      } else {
        setSelected_text((java.lang.String)value);
      }
      break;

    case MISSPELLED_WORD:
      if (value == null) {
        unsetMisspelled_word();
      } else {
        setMisspelled_word((java.lang.String)value);
      }
      break;

    case IS_EDITABLE:
      if (value == null) {
        unsetIs_editable();
      } else {
        setIs_editable((java.lang.Boolean)value);
      }
      break;

    case IS_SPELLCHECK_ENABLED:
      if (value == null) {
        unsetIs_spellcheck_enabled();
      } else {
        setIs_spellcheck_enabled((java.lang.Boolean)value);
      }
      break;

    case EDIT_STATE_FLAGS:
      if (value == null) {
        unsetEdit_state_flags();
      } else {
        setEdit_state_flags((java.lang.Integer)value);
      }
      break;

    case IS_CUSTOM_MENU:
      if (value == null) {
        unsetIs_custom_menu();
      } else {
        setIs_custom_menu((java.lang.Boolean)value);
      }
      break;

    }
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  @Override
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case X:
      return getX();

    case Y:
      return getY();

    case TYPE_FLAGS:
      return getType_flags();

    case LINK_URL:
      return getLink_url();

    case UNFILTERED_LINK_URL:
      return getUnfiltered_link_url();

    case SOURCE_URL:
      return getSource_url();

    case HAS_IMAGE_CONTENTS:
      return isHas_image_contents();

    case TITLE_TEXT:
      return getTitle_text();

    case PAGE_URL:
      return getPage_url();

    case FRAME_URL:
      return getFrame_url();

    case FRAME_CHARSET:
      return getFrame_charset();

    case MEDIA_TYPE:
      return getMedia_type();

    case MEDIA_STATE_FLAGS:
      return getMedia_state_flags();

    case SELECTED_TEXT:
      return getSelected_text();

    case MISSPELLED_WORD:
      return getMisspelled_word();

    case IS_EDITABLE:
      return isIs_editable();

    case IS_SPELLCHECK_ENABLED:
      return isIs_spellcheck_enabled();

    case EDIT_STATE_FLAGS:
      return getEdit_state_flags();

    case IS_CUSTOM_MENU:
      return isIs_custom_menu();

    }
    throw new java.lang.IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  @Override
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new java.lang.IllegalArgumentException();
    }

    switch (field) {
    case X:
      return isSetX();
    case Y:
      return isSetY();
    case TYPE_FLAGS:
      return isSetType_flags();
    case LINK_URL:
      return isSetLink_url();
    case UNFILTERED_LINK_URL:
      return isSetUnfiltered_link_url();
    case SOURCE_URL:
      return isSetSource_url();
    case HAS_IMAGE_CONTENTS:
      return isSetHas_image_contents();
    case TITLE_TEXT:
      return isSetTitle_text();
    case PAGE_URL:
      return isSetPage_url();
    case FRAME_URL:
      return isSetFrame_url();
    case FRAME_CHARSET:
      return isSetFrame_charset();
    case MEDIA_TYPE:
      return isSetMedia_type();
    case MEDIA_STATE_FLAGS:
      return isSetMedia_state_flags();
    case SELECTED_TEXT:
      return isSetSelected_text();
    case MISSPELLED_WORD:
      return isSetMisspelled_word();
    case IS_EDITABLE:
      return isSetIs_editable();
    case IS_SPELLCHECK_ENABLED:
      return isSetIs_spellcheck_enabled();
    case EDIT_STATE_FLAGS:
      return isSetEdit_state_flags();
    case IS_CUSTOM_MENU:
      return isSetIs_custom_menu();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof ContextMenuParams)
      return this.equals((ContextMenuParams)that);
    return false;
  }

  public boolean equals(ContextMenuParams that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_x = true;
    boolean that_present_x = true;
    if (this_present_x || that_present_x) {
      if (!(this_present_x && that_present_x))
        return false;
      if (this.x != that.x)
        return false;
    }

    boolean this_present_y = true;
    boolean that_present_y = true;
    if (this_present_y || that_present_y) {
      if (!(this_present_y && that_present_y))
        return false;
      if (this.y != that.y)
        return false;
    }

    boolean this_present_type_flags = true;
    boolean that_present_type_flags = true;
    if (this_present_type_flags || that_present_type_flags) {
      if (!(this_present_type_flags && that_present_type_flags))
        return false;
      if (this.type_flags != that.type_flags)
        return false;
    }

    boolean this_present_link_url = true && this.isSetLink_url();
    boolean that_present_link_url = true && that.isSetLink_url();
    if (this_present_link_url || that_present_link_url) {
      if (!(this_present_link_url && that_present_link_url))
        return false;
      if (!this.link_url.equals(that.link_url))
        return false;
    }

    boolean this_present_unfiltered_link_url = true && this.isSetUnfiltered_link_url();
    boolean that_present_unfiltered_link_url = true && that.isSetUnfiltered_link_url();
    if (this_present_unfiltered_link_url || that_present_unfiltered_link_url) {
      if (!(this_present_unfiltered_link_url && that_present_unfiltered_link_url))
        return false;
      if (!this.unfiltered_link_url.equals(that.unfiltered_link_url))
        return false;
    }

    boolean this_present_source_url = true && this.isSetSource_url();
    boolean that_present_source_url = true && that.isSetSource_url();
    if (this_present_source_url || that_present_source_url) {
      if (!(this_present_source_url && that_present_source_url))
        return false;
      if (!this.source_url.equals(that.source_url))
        return false;
    }

    boolean this_present_has_image_contents = true;
    boolean that_present_has_image_contents = true;
    if (this_present_has_image_contents || that_present_has_image_contents) {
      if (!(this_present_has_image_contents && that_present_has_image_contents))
        return false;
      if (this.has_image_contents != that.has_image_contents)
        return false;
    }

    boolean this_present_title_text = true && this.isSetTitle_text();
    boolean that_present_title_text = true && that.isSetTitle_text();
    if (this_present_title_text || that_present_title_text) {
      if (!(this_present_title_text && that_present_title_text))
        return false;
      if (!this.title_text.equals(that.title_text))
        return false;
    }

    boolean this_present_page_url = true && this.isSetPage_url();
    boolean that_present_page_url = true && that.isSetPage_url();
    if (this_present_page_url || that_present_page_url) {
      if (!(this_present_page_url && that_present_page_url))
        return false;
      if (!this.page_url.equals(that.page_url))
        return false;
    }

    boolean this_present_frame_url = true && this.isSetFrame_url();
    boolean that_present_frame_url = true && that.isSetFrame_url();
    if (this_present_frame_url || that_present_frame_url) {
      if (!(this_present_frame_url && that_present_frame_url))
        return false;
      if (!this.frame_url.equals(that.frame_url))
        return false;
    }

    boolean this_present_frame_charset = true && this.isSetFrame_charset();
    boolean that_present_frame_charset = true && that.isSetFrame_charset();
    if (this_present_frame_charset || that_present_frame_charset) {
      if (!(this_present_frame_charset && that_present_frame_charset))
        return false;
      if (!this.frame_charset.equals(that.frame_charset))
        return false;
    }

    boolean this_present_media_type = true;
    boolean that_present_media_type = true;
    if (this_present_media_type || that_present_media_type) {
      if (!(this_present_media_type && that_present_media_type))
        return false;
      if (this.media_type != that.media_type)
        return false;
    }

    boolean this_present_media_state_flags = true;
    boolean that_present_media_state_flags = true;
    if (this_present_media_state_flags || that_present_media_state_flags) {
      if (!(this_present_media_state_flags && that_present_media_state_flags))
        return false;
      if (this.media_state_flags != that.media_state_flags)
        return false;
    }

    boolean this_present_selected_text = true && this.isSetSelected_text();
    boolean that_present_selected_text = true && that.isSetSelected_text();
    if (this_present_selected_text || that_present_selected_text) {
      if (!(this_present_selected_text && that_present_selected_text))
        return false;
      if (!this.selected_text.equals(that.selected_text))
        return false;
    }

    boolean this_present_misspelled_word = true && this.isSetMisspelled_word();
    boolean that_present_misspelled_word = true && that.isSetMisspelled_word();
    if (this_present_misspelled_word || that_present_misspelled_word) {
      if (!(this_present_misspelled_word && that_present_misspelled_word))
        return false;
      if (!this.misspelled_word.equals(that.misspelled_word))
        return false;
    }

    boolean this_present_is_editable = true;
    boolean that_present_is_editable = true;
    if (this_present_is_editable || that_present_is_editable) {
      if (!(this_present_is_editable && that_present_is_editable))
        return false;
      if (this.is_editable != that.is_editable)
        return false;
    }

    boolean this_present_is_spellcheck_enabled = true;
    boolean that_present_is_spellcheck_enabled = true;
    if (this_present_is_spellcheck_enabled || that_present_is_spellcheck_enabled) {
      if (!(this_present_is_spellcheck_enabled && that_present_is_spellcheck_enabled))
        return false;
      if (this.is_spellcheck_enabled != that.is_spellcheck_enabled)
        return false;
    }

    boolean this_present_edit_state_flags = true;
    boolean that_present_edit_state_flags = true;
    if (this_present_edit_state_flags || that_present_edit_state_flags) {
      if (!(this_present_edit_state_flags && that_present_edit_state_flags))
        return false;
      if (this.edit_state_flags != that.edit_state_flags)
        return false;
    }

    boolean this_present_is_custom_menu = true;
    boolean that_present_is_custom_menu = true;
    if (this_present_is_custom_menu || that_present_is_custom_menu) {
      if (!(this_present_is_custom_menu && that_present_is_custom_menu))
        return false;
      if (this.is_custom_menu != that.is_custom_menu)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + x;

    hashCode = hashCode * 8191 + y;

    hashCode = hashCode * 8191 + type_flags;

    hashCode = hashCode * 8191 + ((isSetLink_url()) ? 131071 : 524287);
    if (isSetLink_url())
      hashCode = hashCode * 8191 + link_url.hashCode();

    hashCode = hashCode * 8191 + ((isSetUnfiltered_link_url()) ? 131071 : 524287);
    if (isSetUnfiltered_link_url())
      hashCode = hashCode * 8191 + unfiltered_link_url.hashCode();

    hashCode = hashCode * 8191 + ((isSetSource_url()) ? 131071 : 524287);
    if (isSetSource_url())
      hashCode = hashCode * 8191 + source_url.hashCode();

    hashCode = hashCode * 8191 + ((has_image_contents) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetTitle_text()) ? 131071 : 524287);
    if (isSetTitle_text())
      hashCode = hashCode * 8191 + title_text.hashCode();

    hashCode = hashCode * 8191 + ((isSetPage_url()) ? 131071 : 524287);
    if (isSetPage_url())
      hashCode = hashCode * 8191 + page_url.hashCode();

    hashCode = hashCode * 8191 + ((isSetFrame_url()) ? 131071 : 524287);
    if (isSetFrame_url())
      hashCode = hashCode * 8191 + frame_url.hashCode();

    hashCode = hashCode * 8191 + ((isSetFrame_charset()) ? 131071 : 524287);
    if (isSetFrame_charset())
      hashCode = hashCode * 8191 + frame_charset.hashCode();

    hashCode = hashCode * 8191 + media_type;

    hashCode = hashCode * 8191 + media_state_flags;

    hashCode = hashCode * 8191 + ((isSetSelected_text()) ? 131071 : 524287);
    if (isSetSelected_text())
      hashCode = hashCode * 8191 + selected_text.hashCode();

    hashCode = hashCode * 8191 + ((isSetMisspelled_word()) ? 131071 : 524287);
    if (isSetMisspelled_word())
      hashCode = hashCode * 8191 + misspelled_word.hashCode();

    hashCode = hashCode * 8191 + ((is_editable) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((is_spellcheck_enabled) ? 131071 : 524287);

    hashCode = hashCode * 8191 + edit_state_flags;

    hashCode = hashCode * 8191 + ((is_custom_menu) ? 131071 : 524287);

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetX(), other.isSetX());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetX()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.x, other.x);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetY(), other.isSetY());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetY()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.y, other.y);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetType_flags(), other.isSetType_flags());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType_flags()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.type_flags, other.type_flags);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLink_url(), other.isSetLink_url());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLink_url()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.link_url, other.link_url);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUnfiltered_link_url(), other.isSetUnfiltered_link_url());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnfiltered_link_url()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.unfiltered_link_url, other.unfiltered_link_url);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSource_url(), other.isSetSource_url());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSource_url()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.source_url, other.source_url);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetHas_image_contents(), other.isSetHas_image_contents());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHas_image_contents()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.has_image_contents, other.has_image_contents);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTitle_text(), other.isSetTitle_text());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTitle_text()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.title_text, other.title_text);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPage_url(), other.isSetPage_url());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPage_url()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.page_url, other.page_url);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFrame_url(), other.isSetFrame_url());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFrame_url()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.frame_url, other.frame_url);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFrame_charset(), other.isSetFrame_charset());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFrame_charset()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.frame_charset, other.frame_charset);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMedia_type(), other.isSetMedia_type());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMedia_type()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.media_type, other.media_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMedia_state_flags(), other.isSetMedia_state_flags());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMedia_state_flags()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.media_state_flags, other.media_state_flags);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSelected_text(), other.isSetSelected_text());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSelected_text()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.selected_text, other.selected_text);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMisspelled_word(), other.isSetMisspelled_word());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMisspelled_word()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.misspelled_word, other.misspelled_word);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIs_editable(), other.isSetIs_editable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIs_editable()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.is_editable, other.is_editable);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIs_spellcheck_enabled(), other.isSetIs_spellcheck_enabled());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIs_spellcheck_enabled()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.is_spellcheck_enabled, other.is_spellcheck_enabled);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEdit_state_flags(), other.isSetEdit_state_flags());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEdit_state_flags()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.edit_state_flags, other.edit_state_flags);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIs_custom_menu(), other.isSetIs_custom_menu());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIs_custom_menu()) {
      lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.is_custom_menu, other.is_custom_menu);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @com.jetbrains.cef.remote.thrift.annotation.Nullable
  @Override
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  @Override
  public void read(com.jetbrains.cef.remote.thrift.protocol.TProtocol iprot) throws com.jetbrains.cef.remote.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  @Override
  public void write(com.jetbrains.cef.remote.thrift.protocol.TProtocol oprot) throws com.jetbrains.cef.remote.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("ContextMenuParams(");
    boolean first = true;

    sb.append("x:");
    sb.append(this.x);
    first = false;
    if (!first) sb.append(", ");
    sb.append("y:");
    sb.append(this.y);
    first = false;
    if (!first) sb.append(", ");
    sb.append("type_flags:");
    sb.append(this.type_flags);
    first = false;
    if (!first) sb.append(", ");
    sb.append("link_url:");
    if (this.link_url == null) {
      sb.append("null");
    } else {
      sb.append(this.link_url);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("unfiltered_link_url:");
    if (this.unfiltered_link_url == null) {
      sb.append("null");
    } else {
      sb.append(this.unfiltered_link_url);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("source_url:");
    if (this.source_url == null) {
      sb.append("null");
    } else {
      sb.append(this.source_url);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("has_image_contents:");
    sb.append(this.has_image_contents);
    first = false;
    if (!first) sb.append(", ");
    sb.append("title_text:");
    if (this.title_text == null) {
      sb.append("null");
    } else {
      sb.append(this.title_text);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("page_url:");
    if (this.page_url == null) {
      sb.append("null");
    } else {
      sb.append(this.page_url);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("frame_url:");
    if (this.frame_url == null) {
      sb.append("null");
    } else {
      sb.append(this.frame_url);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("frame_charset:");
    if (this.frame_charset == null) {
      sb.append("null");
    } else {
      sb.append(this.frame_charset);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("media_type:");
    sb.append(this.media_type);
    first = false;
    if (!first) sb.append(", ");
    sb.append("media_state_flags:");
    sb.append(this.media_state_flags);
    first = false;
    if (!first) sb.append(", ");
    sb.append("selected_text:");
    if (this.selected_text == null) {
      sb.append("null");
    } else {
      sb.append(this.selected_text);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("misspelled_word:");
    if (this.misspelled_word == null) {
      sb.append("null");
    } else {
      sb.append(this.misspelled_word);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("is_editable:");
    sb.append(this.is_editable);
    first = false;
    if (!first) sb.append(", ");
    sb.append("is_spellcheck_enabled:");
    sb.append(this.is_spellcheck_enabled);
    first = false;
    if (!first) sb.append(", ");
    sb.append("edit_state_flags:");
    sb.append(this.edit_state_flags);
    first = false;
    if (!first) sb.append(", ");
    sb.append("is_custom_menu:");
    sb.append(this.is_custom_menu);
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws com.jetbrains.cef.remote.thrift.TException {
    // check for required fields
    // alas, we cannot check 'x' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'y' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'type_flags' because it's a primitive and you chose the non-beans generator.
    if (link_url == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'link_url' was not present! Struct: " + toString());
    }
    if (unfiltered_link_url == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'unfiltered_link_url' was not present! Struct: " + toString());
    }
    if (source_url == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'source_url' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'has_image_contents' because it's a primitive and you chose the non-beans generator.
    if (title_text == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'title_text' was not present! Struct: " + toString());
    }
    if (page_url == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'page_url' was not present! Struct: " + toString());
    }
    if (frame_url == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'frame_url' was not present! Struct: " + toString());
    }
    if (frame_charset == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'frame_charset' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'media_type' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'media_state_flags' because it's a primitive and you chose the non-beans generator.
    if (selected_text == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'selected_text' was not present! Struct: " + toString());
    }
    if (misspelled_word == null) {
      throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'misspelled_word' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'is_editable' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'is_spellcheck_enabled' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'edit_state_flags' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'is_custom_menu' because it's a primitive and you chose the non-beans generator.
    // check for sub-struct validity
  }

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

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 com.jetbrains.cef.remote.thrift.protocol.TCompactProtocol(new com.jetbrains.cef.remote.thrift.transport.TIOStreamTransport(in)));
    } catch (com.jetbrains.cef.remote.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class ContextMenuParamsStandardSchemeFactory implements com.jetbrains.cef.remote.thrift.scheme.SchemeFactory {
    @Override
    public ContextMenuParamsStandardScheme getScheme() {
      return new ContextMenuParamsStandardScheme();
    }
  }

  private static class ContextMenuParamsStandardScheme extends com.jetbrains.cef.remote.thrift.scheme.StandardScheme<ContextMenuParams> {

    @Override
    public void read(com.jetbrains.cef.remote.thrift.protocol.TProtocol iprot, ContextMenuParams struct) throws com.jetbrains.cef.remote.thrift.TException {
      com.jetbrains.cef.remote.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // X
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
              struct.x = iprot.readI32();
              struct.setXIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // Y
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
              struct.y = iprot.readI32();
              struct.setYIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TYPE_FLAGS
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
              struct.type_flags = iprot.readI32();
              struct.setType_flagsIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // LINK_URL
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.link_url = iprot.readString();
              struct.setLink_urlIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // UNFILTERED_LINK_URL
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.unfiltered_link_url = iprot.readString();
              struct.setUnfiltered_link_urlIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // SOURCE_URL
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.source_url = iprot.readString();
              struct.setSource_urlIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // HAS_IMAGE_CONTENTS
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.BOOL) {
              struct.has_image_contents = iprot.readBool();
              struct.setHas_image_contentsIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // TITLE_TEXT
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.title_text = iprot.readString();
              struct.setTitle_textIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // PAGE_URL
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.page_url = iprot.readString();
              struct.setPage_urlIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // FRAME_URL
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.frame_url = iprot.readString();
              struct.setFrame_urlIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // FRAME_CHARSET
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.frame_charset = iprot.readString();
              struct.setFrame_charsetIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // MEDIA_TYPE
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
              struct.media_type = iprot.readI32();
              struct.setMedia_typeIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // MEDIA_STATE_FLAGS
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
              struct.media_state_flags = iprot.readI32();
              struct.setMedia_state_flagsIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // SELECTED_TEXT
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.selected_text = iprot.readString();
              struct.setSelected_textIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // MISSPELLED_WORD
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRING) {
              struct.misspelled_word = iprot.readString();
              struct.setMisspelled_wordIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // IS_EDITABLE
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.BOOL) {
              struct.is_editable = iprot.readBool();
              struct.setIs_editableIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // IS_SPELLCHECK_ENABLED
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.BOOL) {
              struct.is_spellcheck_enabled = iprot.readBool();
              struct.setIs_spellcheck_enabledIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 18: // EDIT_STATE_FLAGS
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
              struct.edit_state_flags = iprot.readI32();
              struct.setEdit_state_flagsIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 19: // IS_CUSTOM_MENU
            if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.BOOL) {
              struct.is_custom_menu = iprot.readBool();
              struct.setIs_custom_menuIsSet(true);
            } else { 
              com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            com.jetbrains.cef.remote.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
      if (!struct.isSetX()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'x' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetY()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'y' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetType_flags()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'type_flags' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetHas_image_contents()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'has_image_contents' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetMedia_type()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'media_type' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetMedia_state_flags()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'media_state_flags' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetIs_editable()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'is_editable' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetIs_spellcheck_enabled()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'is_spellcheck_enabled' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetEdit_state_flags()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'edit_state_flags' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetIs_custom_menu()) {
        throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'is_custom_menu' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

    @Override
    public void write(com.jetbrains.cef.remote.thrift.protocol.TProtocol oprot, ContextMenuParams struct) throws com.jetbrains.cef.remote.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(X_FIELD_DESC);
      oprot.writeI32(struct.x);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(Y_FIELD_DESC);
      oprot.writeI32(struct.y);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TYPE_FLAGS_FIELD_DESC);
      oprot.writeI32(struct.type_flags);
      oprot.writeFieldEnd();
      if (struct.link_url != null) {
        oprot.writeFieldBegin(LINK_URL_FIELD_DESC);
        oprot.writeString(struct.link_url);
        oprot.writeFieldEnd();
      }
      if (struct.unfiltered_link_url != null) {
        oprot.writeFieldBegin(UNFILTERED_LINK_URL_FIELD_DESC);
        oprot.writeString(struct.unfiltered_link_url);
        oprot.writeFieldEnd();
      }
      if (struct.source_url != null) {
        oprot.writeFieldBegin(SOURCE_URL_FIELD_DESC);
        oprot.writeString(struct.source_url);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(HAS_IMAGE_CONTENTS_FIELD_DESC);
      oprot.writeBool(struct.has_image_contents);
      oprot.writeFieldEnd();
      if (struct.title_text != null) {
        oprot.writeFieldBegin(TITLE_TEXT_FIELD_DESC);
        oprot.writeString(struct.title_text);
        oprot.writeFieldEnd();
      }
      if (struct.page_url != null) {
        oprot.writeFieldBegin(PAGE_URL_FIELD_DESC);
        oprot.writeString(struct.page_url);
        oprot.writeFieldEnd();
      }
      if (struct.frame_url != null) {
        oprot.writeFieldBegin(FRAME_URL_FIELD_DESC);
        oprot.writeString(struct.frame_url);
        oprot.writeFieldEnd();
      }
      if (struct.frame_charset != null) {
        oprot.writeFieldBegin(FRAME_CHARSET_FIELD_DESC);
        oprot.writeString(struct.frame_charset);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(MEDIA_TYPE_FIELD_DESC);
      oprot.writeI32(struct.media_type);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MEDIA_STATE_FLAGS_FIELD_DESC);
      oprot.writeI32(struct.media_state_flags);
      oprot.writeFieldEnd();
      if (struct.selected_text != null) {
        oprot.writeFieldBegin(SELECTED_TEXT_FIELD_DESC);
        oprot.writeString(struct.selected_text);
        oprot.writeFieldEnd();
      }
      if (struct.misspelled_word != null) {
        oprot.writeFieldBegin(MISSPELLED_WORD_FIELD_DESC);
        oprot.writeString(struct.misspelled_word);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(IS_EDITABLE_FIELD_DESC);
      oprot.writeBool(struct.is_editable);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_SPELLCHECK_ENABLED_FIELD_DESC);
      oprot.writeBool(struct.is_spellcheck_enabled);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(EDIT_STATE_FLAGS_FIELD_DESC);
      oprot.writeI32(struct.edit_state_flags);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_CUSTOM_MENU_FIELD_DESC);
      oprot.writeBool(struct.is_custom_menu);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class ContextMenuParamsTupleSchemeFactory implements com.jetbrains.cef.remote.thrift.scheme.SchemeFactory {
    @Override
    public ContextMenuParamsTupleScheme getScheme() {
      return new ContextMenuParamsTupleScheme();
    }
  }

  private static class ContextMenuParamsTupleScheme extends com.jetbrains.cef.remote.thrift.scheme.TupleScheme<ContextMenuParams> {

    @Override
    public void write(com.jetbrains.cef.remote.thrift.protocol.TProtocol prot, ContextMenuParams struct) throws com.jetbrains.cef.remote.thrift.TException {
      com.jetbrains.cef.remote.thrift.protocol.TTupleProtocol oprot = (com.jetbrains.cef.remote.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI32(struct.x);
      oprot.writeI32(struct.y);
      oprot.writeI32(struct.type_flags);
      oprot.writeString(struct.link_url);
      oprot.writeString(struct.unfiltered_link_url);
      oprot.writeString(struct.source_url);
      oprot.writeBool(struct.has_image_contents);
      oprot.writeString(struct.title_text);
      oprot.writeString(struct.page_url);
      oprot.writeString(struct.frame_url);
      oprot.writeString(struct.frame_charset);
      oprot.writeI32(struct.media_type);
      oprot.writeI32(struct.media_state_flags);
      oprot.writeString(struct.selected_text);
      oprot.writeString(struct.misspelled_word);
      oprot.writeBool(struct.is_editable);
      oprot.writeBool(struct.is_spellcheck_enabled);
      oprot.writeI32(struct.edit_state_flags);
      oprot.writeBool(struct.is_custom_menu);
    }

    @Override
    public void read(com.jetbrains.cef.remote.thrift.protocol.TProtocol prot, ContextMenuParams struct) throws com.jetbrains.cef.remote.thrift.TException {
      com.jetbrains.cef.remote.thrift.protocol.TTupleProtocol iprot = (com.jetbrains.cef.remote.thrift.protocol.TTupleProtocol) prot;
      struct.x = iprot.readI32();
      struct.setXIsSet(true);
      struct.y = iprot.readI32();
      struct.setYIsSet(true);
      struct.type_flags = iprot.readI32();
      struct.setType_flagsIsSet(true);
      struct.link_url = iprot.readString();
      struct.setLink_urlIsSet(true);
      struct.unfiltered_link_url = iprot.readString();
      struct.setUnfiltered_link_urlIsSet(true);
      struct.source_url = iprot.readString();
      struct.setSource_urlIsSet(true);
      struct.has_image_contents = iprot.readBool();
      struct.setHas_image_contentsIsSet(true);
      struct.title_text = iprot.readString();
      struct.setTitle_textIsSet(true);
      struct.page_url = iprot.readString();
      struct.setPage_urlIsSet(true);
      struct.frame_url = iprot.readString();
      struct.setFrame_urlIsSet(true);
      struct.frame_charset = iprot.readString();
      struct.setFrame_charsetIsSet(true);
      struct.media_type = iprot.readI32();
      struct.setMedia_typeIsSet(true);
      struct.media_state_flags = iprot.readI32();
      struct.setMedia_state_flagsIsSet(true);
      struct.selected_text = iprot.readString();
      struct.setSelected_textIsSet(true);
      struct.misspelled_word = iprot.readString();
      struct.setMisspelled_wordIsSet(true);
      struct.is_editable = iprot.readBool();
      struct.setIs_editableIsSet(true);
      struct.is_spellcheck_enabled = iprot.readBool();
      struct.setIs_spellcheck_enabledIsSet(true);
      struct.edit_state_flags = iprot.readI32();
      struct.setEdit_state_flagsIsSet(true);
      struct.is_custom_menu = iprot.readBool();
      struct.setIs_custom_menuIsSet(true);
    }
  }

  private static <S extends com.jetbrains.cef.remote.thrift.scheme.IScheme> S scheme(com.jetbrains.cef.remote.thrift.protocol.TProtocol proto) {
    return (com.jetbrains.cef.remote.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
}

