java/com/jetbrains/cef/remote/thrift_codegen/CefKeyEventAttributes.java (778 lines of code) (raw):
/**
* 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 CefKeyEventAttributes implements com.jetbrains.cef.remote.thrift.TBase<CefKeyEventAttributes, CefKeyEventAttributes._Fields>, java.io.Serializable, Cloneable, Comparable<CefKeyEventAttributes> {
private static final com.jetbrains.cef.remote.thrift.protocol.TStruct STRUCT_DESC = new com.jetbrains.cef.remote.thrift.protocol.TStruct("CefKeyEventAttributes");
private static final com.jetbrains.cef.remote.thrift.protocol.TField TYPE_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("type", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)1);
private static final com.jetbrains.cef.remote.thrift.protocol.TField MODIFIERS_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("modifiers", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)2);
private static final com.jetbrains.cef.remote.thrift.protocol.TField WINDOWS_KEY_CODE_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("windows_key_code", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)3);
private static final com.jetbrains.cef.remote.thrift.protocol.TField NATIVE_KEY_CODE_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("native_key_code", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)4);
private static final com.jetbrains.cef.remote.thrift.protocol.TField CHARACTER_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("character", com.jetbrains.cef.remote.thrift.protocol.TType.I16, (short)5);
private static final com.jetbrains.cef.remote.thrift.protocol.TField UNMODIFIED_CHARACTER_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("unmodified_character", com.jetbrains.cef.remote.thrift.protocol.TType.I16, (short)6);
private static final com.jetbrains.cef.remote.thrift.protocol.TField IS_SYSTEM_KEY_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("is_system_key", com.jetbrains.cef.remote.thrift.protocol.TType.BOOL, (short)7);
private static final com.jetbrains.cef.remote.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CefKeyEventAttributesStandardSchemeFactory();
private static final com.jetbrains.cef.remote.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CefKeyEventAttributesTupleSchemeFactory();
public int type; // required
public int modifiers; // required
public int windows_key_code; // required
public int native_key_code; // required
public short character; // required
public short unmodified_character; // required
public boolean is_system_key; // 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 {
TYPE((short)1, "type"),
MODIFIERS((short)2, "modifiers"),
WINDOWS_KEY_CODE((short)3, "windows_key_code"),
NATIVE_KEY_CODE((short)4, "native_key_code"),
CHARACTER((short)5, "character"),
UNMODIFIED_CHARACTER((short)6, "unmodified_character"),
IS_SYSTEM_KEY((short)7, "is_system_key");
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: // TYPE
return TYPE;
case 2: // MODIFIERS
return MODIFIERS;
case 3: // WINDOWS_KEY_CODE
return WINDOWS_KEY_CODE;
case 4: // NATIVE_KEY_CODE
return NATIVE_KEY_CODE;
case 5: // CHARACTER
return CHARACTER;
case 6: // UNMODIFIED_CHARACTER
return UNMODIFIED_CHARACTER;
case 7: // IS_SYSTEM_KEY
return IS_SYSTEM_KEY;
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 __TYPE_ISSET_ID = 0;
private static final int __MODIFIERS_ISSET_ID = 1;
private static final int __WINDOWS_KEY_CODE_ISSET_ID = 2;
private static final int __NATIVE_KEY_CODE_ISSET_ID = 3;
private static final int __CHARACTER_ISSET_ID = 4;
private static final int __UNMODIFIED_CHARACTER_ISSET_ID = 5;
private static final int __IS_SYSTEM_KEY_ISSET_ID = 6;
private byte __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.TYPE, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("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.MODIFIERS, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("modifiers", 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.WINDOWS_KEY_CODE, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("windows_key_code", 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.NATIVE_KEY_CODE, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("native_key_code", 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.CHARACTER, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("character", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED,
new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I16)));
tmpMap.put(_Fields.UNMODIFIED_CHARACTER, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("unmodified_character", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED,
new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.I16)));
tmpMap.put(_Fields.IS_SYSTEM_KEY, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("is_system_key", 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(CefKeyEventAttributes.class, metaDataMap);
}
public CefKeyEventAttributes() {
}
public CefKeyEventAttributes(
int type,
int modifiers,
int windows_key_code,
int native_key_code,
short character,
short unmodified_character,
boolean is_system_key)
{
this();
this.type = type;
setTypeIsSet(true);
this.modifiers = modifiers;
setModifiersIsSet(true);
this.windows_key_code = windows_key_code;
setWindows_key_codeIsSet(true);
this.native_key_code = native_key_code;
setNative_key_codeIsSet(true);
this.character = character;
setCharacterIsSet(true);
this.unmodified_character = unmodified_character;
setUnmodified_characterIsSet(true);
this.is_system_key = is_system_key;
setIs_system_keyIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public CefKeyEventAttributes(CefKeyEventAttributes other) {
__isset_bitfield = other.__isset_bitfield;
this.type = other.type;
this.modifiers = other.modifiers;
this.windows_key_code = other.windows_key_code;
this.native_key_code = other.native_key_code;
this.character = other.character;
this.unmodified_character = other.unmodified_character;
this.is_system_key = other.is_system_key;
}
@Override
public CefKeyEventAttributes deepCopy() {
return new CefKeyEventAttributes(this);
}
@Override
public void clear() {
setTypeIsSet(false);
this.type = 0;
setModifiersIsSet(false);
this.modifiers = 0;
setWindows_key_codeIsSet(false);
this.windows_key_code = 0;
setNative_key_codeIsSet(false);
this.native_key_code = 0;
setCharacterIsSet(false);
this.character = 0;
setUnmodified_characterIsSet(false);
this.unmodified_character = 0;
setIs_system_keyIsSet(false);
this.is_system_key = false;
}
public int getType() {
return this.type;
}
public CefKeyEventAttributes setType(int type) {
this.type = type;
setTypeIsSet(true);
return this;
}
public void unsetType() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID);
}
/** Returns true if field type is set (has been assigned a value) and false otherwise */
public boolean isSetType() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID);
}
public void setTypeIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value);
}
public int getModifiers() {
return this.modifiers;
}
public CefKeyEventAttributes setModifiers(int modifiers) {
this.modifiers = modifiers;
setModifiersIsSet(true);
return this;
}
public void unsetModifiers() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __MODIFIERS_ISSET_ID);
}
/** Returns true if field modifiers is set (has been assigned a value) and false otherwise */
public boolean isSetModifiers() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __MODIFIERS_ISSET_ID);
}
public void setModifiersIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __MODIFIERS_ISSET_ID, value);
}
public int getWindows_key_code() {
return this.windows_key_code;
}
public CefKeyEventAttributes setWindows_key_code(int windows_key_code) {
this.windows_key_code = windows_key_code;
setWindows_key_codeIsSet(true);
return this;
}
public void unsetWindows_key_code() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __WINDOWS_KEY_CODE_ISSET_ID);
}
/** Returns true if field windows_key_code is set (has been assigned a value) and false otherwise */
public boolean isSetWindows_key_code() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __WINDOWS_KEY_CODE_ISSET_ID);
}
public void setWindows_key_codeIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __WINDOWS_KEY_CODE_ISSET_ID, value);
}
public int getNative_key_code() {
return this.native_key_code;
}
public CefKeyEventAttributes setNative_key_code(int native_key_code) {
this.native_key_code = native_key_code;
setNative_key_codeIsSet(true);
return this;
}
public void unsetNative_key_code() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __NATIVE_KEY_CODE_ISSET_ID);
}
/** Returns true if field native_key_code is set (has been assigned a value) and false otherwise */
public boolean isSetNative_key_code() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __NATIVE_KEY_CODE_ISSET_ID);
}
public void setNative_key_codeIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __NATIVE_KEY_CODE_ISSET_ID, value);
}
public short getCharacter() {
return this.character;
}
public CefKeyEventAttributes setCharacter(short character) {
this.character = character;
setCharacterIsSet(true);
return this;
}
public void unsetCharacter() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHARACTER_ISSET_ID);
}
/** Returns true if field character is set (has been assigned a value) and false otherwise */
public boolean isSetCharacter() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __CHARACTER_ISSET_ID);
}
public void setCharacterIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __CHARACTER_ISSET_ID, value);
}
public short getUnmodified_character() {
return this.unmodified_character;
}
public CefKeyEventAttributes setUnmodified_character(short unmodified_character) {
this.unmodified_character = unmodified_character;
setUnmodified_characterIsSet(true);
return this;
}
public void unsetUnmodified_character() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNMODIFIED_CHARACTER_ISSET_ID);
}
/** Returns true if field unmodified_character is set (has been assigned a value) and false otherwise */
public boolean isSetUnmodified_character() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __UNMODIFIED_CHARACTER_ISSET_ID);
}
public void setUnmodified_characterIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __UNMODIFIED_CHARACTER_ISSET_ID, value);
}
public boolean isIs_system_key() {
return this.is_system_key;
}
public CefKeyEventAttributes setIs_system_key(boolean is_system_key) {
this.is_system_key = is_system_key;
setIs_system_keyIsSet(true);
return this;
}
public void unsetIs_system_key() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_SYSTEM_KEY_ISSET_ID);
}
/** Returns true if field is_system_key is set (has been assigned a value) and false otherwise */
public boolean isSetIs_system_key() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_SYSTEM_KEY_ISSET_ID);
}
public void setIs_system_keyIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_SYSTEM_KEY_ISSET_ID, value);
}
@Override
public void setFieldValue(_Fields field, @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TYPE:
if (value == null) {
unsetType();
} else {
setType((java.lang.Integer)value);
}
break;
case MODIFIERS:
if (value == null) {
unsetModifiers();
} else {
setModifiers((java.lang.Integer)value);
}
break;
case WINDOWS_KEY_CODE:
if (value == null) {
unsetWindows_key_code();
} else {
setWindows_key_code((java.lang.Integer)value);
}
break;
case NATIVE_KEY_CODE:
if (value == null) {
unsetNative_key_code();
} else {
setNative_key_code((java.lang.Integer)value);
}
break;
case CHARACTER:
if (value == null) {
unsetCharacter();
} else {
setCharacter((java.lang.Short)value);
}
break;
case UNMODIFIED_CHARACTER:
if (value == null) {
unsetUnmodified_character();
} else {
setUnmodified_character((java.lang.Short)value);
}
break;
case IS_SYSTEM_KEY:
if (value == null) {
unsetIs_system_key();
} else {
setIs_system_key((java.lang.Boolean)value);
}
break;
}
}
@com.jetbrains.cef.remote.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return getType();
case MODIFIERS:
return getModifiers();
case WINDOWS_KEY_CODE:
return getWindows_key_code();
case NATIVE_KEY_CODE:
return getNative_key_code();
case CHARACTER:
return getCharacter();
case UNMODIFIED_CHARACTER:
return getUnmodified_character();
case IS_SYSTEM_KEY:
return isIs_system_key();
}
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 TYPE:
return isSetType();
case MODIFIERS:
return isSetModifiers();
case WINDOWS_KEY_CODE:
return isSetWindows_key_code();
case NATIVE_KEY_CODE:
return isSetNative_key_code();
case CHARACTER:
return isSetCharacter();
case UNMODIFIED_CHARACTER:
return isSetUnmodified_character();
case IS_SYSTEM_KEY:
return isSetIs_system_key();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof CefKeyEventAttributes)
return this.equals((CefKeyEventAttributes)that);
return false;
}
public boolean equals(CefKeyEventAttributes that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_type = true;
boolean that_present_type = true;
if (this_present_type || that_present_type) {
if (!(this_present_type && that_present_type))
return false;
if (this.type != that.type)
return false;
}
boolean this_present_modifiers = true;
boolean that_present_modifiers = true;
if (this_present_modifiers || that_present_modifiers) {
if (!(this_present_modifiers && that_present_modifiers))
return false;
if (this.modifiers != that.modifiers)
return false;
}
boolean this_present_windows_key_code = true;
boolean that_present_windows_key_code = true;
if (this_present_windows_key_code || that_present_windows_key_code) {
if (!(this_present_windows_key_code && that_present_windows_key_code))
return false;
if (this.windows_key_code != that.windows_key_code)
return false;
}
boolean this_present_native_key_code = true;
boolean that_present_native_key_code = true;
if (this_present_native_key_code || that_present_native_key_code) {
if (!(this_present_native_key_code && that_present_native_key_code))
return false;
if (this.native_key_code != that.native_key_code)
return false;
}
boolean this_present_character = true;
boolean that_present_character = true;
if (this_present_character || that_present_character) {
if (!(this_present_character && that_present_character))
return false;
if (this.character != that.character)
return false;
}
boolean this_present_unmodified_character = true;
boolean that_present_unmodified_character = true;
if (this_present_unmodified_character || that_present_unmodified_character) {
if (!(this_present_unmodified_character && that_present_unmodified_character))
return false;
if (this.unmodified_character != that.unmodified_character)
return false;
}
boolean this_present_is_system_key = true;
boolean that_present_is_system_key = true;
if (this_present_is_system_key || that_present_is_system_key) {
if (!(this_present_is_system_key && that_present_is_system_key))
return false;
if (this.is_system_key != that.is_system_key)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + type;
hashCode = hashCode * 8191 + modifiers;
hashCode = hashCode * 8191 + windows_key_code;
hashCode = hashCode * 8191 + native_key_code;
hashCode = hashCode * 8191 + character;
hashCode = hashCode * 8191 + unmodified_character;
hashCode = hashCode * 8191 + ((is_system_key) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(CefKeyEventAttributes other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetType()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.type, other.type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetModifiers(), other.isSetModifiers());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetModifiers()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.modifiers, other.modifiers);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetWindows_key_code(), other.isSetWindows_key_code());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWindows_key_code()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.windows_key_code, other.windows_key_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNative_key_code(), other.isSetNative_key_code());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNative_key_code()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.native_key_code, other.native_key_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCharacter(), other.isSetCharacter());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCharacter()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.character, other.character);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetUnmodified_character(), other.isSetUnmodified_character());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUnmodified_character()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.unmodified_character, other.unmodified_character);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIs_system_key(), other.isSetIs_system_key());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIs_system_key()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.is_system_key, other.is_system_key);
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("CefKeyEventAttributes(");
boolean first = true;
sb.append("type:");
sb.append(this.type);
first = false;
if (!first) sb.append(", ");
sb.append("modifiers:");
sb.append(this.modifiers);
first = false;
if (!first) sb.append(", ");
sb.append("windows_key_code:");
sb.append(this.windows_key_code);
first = false;
if (!first) sb.append(", ");
sb.append("native_key_code:");
sb.append(this.native_key_code);
first = false;
if (!first) sb.append(", ");
sb.append("character:");
sb.append(this.character);
first = false;
if (!first) sb.append(", ");
sb.append("unmodified_character:");
sb.append(this.unmodified_character);
first = false;
if (!first) sb.append(", ");
sb.append("is_system_key:");
sb.append(this.is_system_key);
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 'type' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'modifiers' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'windows_key_code' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'native_key_code' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'character' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'unmodified_character' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'is_system_key' 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 CefKeyEventAttributesStandardSchemeFactory implements com.jetbrains.cef.remote.thrift.scheme.SchemeFactory {
@Override
public CefKeyEventAttributesStandardScheme getScheme() {
return new CefKeyEventAttributesStandardScheme();
}
}
private static class CefKeyEventAttributesStandardScheme extends com.jetbrains.cef.remote.thrift.scheme.StandardScheme<CefKeyEventAttributes> {
@Override
public void read(com.jetbrains.cef.remote.thrift.protocol.TProtocol iprot, CefKeyEventAttributes 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: // TYPE
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
struct.type = iprot.readI32();
struct.setTypeIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // MODIFIERS
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
struct.modifiers = iprot.readI32();
struct.setModifiersIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // WINDOWS_KEY_CODE
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
struct.windows_key_code = iprot.readI32();
struct.setWindows_key_codeIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // NATIVE_KEY_CODE
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
struct.native_key_code = iprot.readI32();
struct.setNative_key_codeIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // CHARACTER
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I16) {
struct.character = iprot.readI16();
struct.setCharacterIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // UNMODIFIED_CHARACTER
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I16) {
struct.unmodified_character = iprot.readI16();
struct.setUnmodified_characterIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // IS_SYSTEM_KEY
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.BOOL) {
struct.is_system_key = iprot.readBool();
struct.setIs_system_keyIsSet(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.isSetType()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'type' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetModifiers()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'modifiers' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetWindows_key_code()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'windows_key_code' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetNative_key_code()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'native_key_code' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetCharacter()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'character' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetUnmodified_character()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'unmodified_character' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetIs_system_key()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'is_system_key' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(com.jetbrains.cef.remote.thrift.protocol.TProtocol oprot, CefKeyEventAttributes struct) throws com.jetbrains.cef.remote.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TYPE_FIELD_DESC);
oprot.writeI32(struct.type);
oprot.writeFieldEnd();
oprot.writeFieldBegin(MODIFIERS_FIELD_DESC);
oprot.writeI32(struct.modifiers);
oprot.writeFieldEnd();
oprot.writeFieldBegin(WINDOWS_KEY_CODE_FIELD_DESC);
oprot.writeI32(struct.windows_key_code);
oprot.writeFieldEnd();
oprot.writeFieldBegin(NATIVE_KEY_CODE_FIELD_DESC);
oprot.writeI32(struct.native_key_code);
oprot.writeFieldEnd();
oprot.writeFieldBegin(CHARACTER_FIELD_DESC);
oprot.writeI16(struct.character);
oprot.writeFieldEnd();
oprot.writeFieldBegin(UNMODIFIED_CHARACTER_FIELD_DESC);
oprot.writeI16(struct.unmodified_character);
oprot.writeFieldEnd();
oprot.writeFieldBegin(IS_SYSTEM_KEY_FIELD_DESC);
oprot.writeBool(struct.is_system_key);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class CefKeyEventAttributesTupleSchemeFactory implements com.jetbrains.cef.remote.thrift.scheme.SchemeFactory {
@Override
public CefKeyEventAttributesTupleScheme getScheme() {
return new CefKeyEventAttributesTupleScheme();
}
}
private static class CefKeyEventAttributesTupleScheme extends com.jetbrains.cef.remote.thrift.scheme.TupleScheme<CefKeyEventAttributes> {
@Override
public void write(com.jetbrains.cef.remote.thrift.protocol.TProtocol prot, CefKeyEventAttributes 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.type);
oprot.writeI32(struct.modifiers);
oprot.writeI32(struct.windows_key_code);
oprot.writeI32(struct.native_key_code);
oprot.writeI16(struct.character);
oprot.writeI16(struct.unmodified_character);
oprot.writeBool(struct.is_system_key);
}
@Override
public void read(com.jetbrains.cef.remote.thrift.protocol.TProtocol prot, CefKeyEventAttributes 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.type = iprot.readI32();
struct.setTypeIsSet(true);
struct.modifiers = iprot.readI32();
struct.setModifiersIsSet(true);
struct.windows_key_code = iprot.readI32();
struct.setWindows_key_codeIsSet(true);
struct.native_key_code = iprot.readI32();
struct.setNative_key_codeIsSet(true);
struct.character = iprot.readI16();
struct.setCharacterIsSet(true);
struct.unmodified_character = iprot.readI16();
struct.setUnmodified_characterIsSet(true);
struct.is_system_key = iprot.readBool();
struct.setIs_system_keyIsSet(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();
}
}