java/com/jetbrains/cef/remote/thrift_codegen/ScreenInfo.java (724 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 ScreenInfo implements com.jetbrains.cef.remote.thrift.TBase<ScreenInfo, ScreenInfo._Fields>, java.io.Serializable, Cloneable, Comparable<ScreenInfo> {
private static final com.jetbrains.cef.remote.thrift.protocol.TStruct STRUCT_DESC = new com.jetbrains.cef.remote.thrift.protocol.TStruct("ScreenInfo");
private static final com.jetbrains.cef.remote.thrift.protocol.TField DEVICE_SCALE_FACTOR_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("device_scale_factor", com.jetbrains.cef.remote.thrift.protocol.TType.DOUBLE, (short)1);
private static final com.jetbrains.cef.remote.thrift.protocol.TField DEPTH_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("depth", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)2);
private static final com.jetbrains.cef.remote.thrift.protocol.TField DEPTH_PER_COMPONENT_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("depth_per_component", com.jetbrains.cef.remote.thrift.protocol.TType.I32, (short)3);
private static final com.jetbrains.cef.remote.thrift.protocol.TField IS_MONOCHROME_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("is_monochrome", com.jetbrains.cef.remote.thrift.protocol.TType.BOOL, (short)4);
private static final com.jetbrains.cef.remote.thrift.protocol.TField RECT_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("rect", com.jetbrains.cef.remote.thrift.protocol.TType.STRUCT, (short)5);
private static final com.jetbrains.cef.remote.thrift.protocol.TField AVAILABLE_RECT_FIELD_DESC = new com.jetbrains.cef.remote.thrift.protocol.TField("available_rect", com.jetbrains.cef.remote.thrift.protocol.TType.STRUCT, (short)6);
private static final com.jetbrains.cef.remote.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ScreenInfoStandardSchemeFactory();
private static final com.jetbrains.cef.remote.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ScreenInfoTupleSchemeFactory();
public double device_scale_factor; // required
public int depth; // required
public int depth_per_component; // required
public boolean is_monochrome; // required
public @com.jetbrains.cef.remote.thrift.annotation.Nullable Rect rect; // required
public @com.jetbrains.cef.remote.thrift.annotation.Nullable Rect available_rect; // 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 {
DEVICE_SCALE_FACTOR((short)1, "device_scale_factor"),
DEPTH((short)2, "depth"),
DEPTH_PER_COMPONENT((short)3, "depth_per_component"),
IS_MONOCHROME((short)4, "is_monochrome"),
RECT((short)5, "rect"),
AVAILABLE_RECT((short)6, "available_rect");
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: // DEVICE_SCALE_FACTOR
return DEVICE_SCALE_FACTOR;
case 2: // DEPTH
return DEPTH;
case 3: // DEPTH_PER_COMPONENT
return DEPTH_PER_COMPONENT;
case 4: // IS_MONOCHROME
return IS_MONOCHROME;
case 5: // RECT
return RECT;
case 6: // AVAILABLE_RECT
return AVAILABLE_RECT;
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 __DEVICE_SCALE_FACTOR_ISSET_ID = 0;
private static final int __DEPTH_ISSET_ID = 1;
private static final int __DEPTH_PER_COMPONENT_ISSET_ID = 2;
private static final int __IS_MONOCHROME_ISSET_ID = 3;
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.DEVICE_SCALE_FACTOR, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("device_scale_factor", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED,
new com.jetbrains.cef.remote.thrift.meta_data.FieldValueMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.DEPTH, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("depth", 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.DEPTH_PER_COMPONENT, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("depth_per_component", 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_MONOCHROME, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("is_monochrome", 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.RECT, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("rect", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED,
new com.jetbrains.cef.remote.thrift.meta_data.StructMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRUCT, Rect.class)));
tmpMap.put(_Fields.AVAILABLE_RECT, new com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData("available_rect", com.jetbrains.cef.remote.thrift.TFieldRequirementType.REQUIRED,
new com.jetbrains.cef.remote.thrift.meta_data.StructMetaData(com.jetbrains.cef.remote.thrift.protocol.TType.STRUCT, Rect.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
com.jetbrains.cef.remote.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ScreenInfo.class, metaDataMap);
}
public ScreenInfo() {
}
public ScreenInfo(
double device_scale_factor,
int depth,
int depth_per_component,
boolean is_monochrome,
Rect rect,
Rect available_rect)
{
this();
this.device_scale_factor = device_scale_factor;
setDevice_scale_factorIsSet(true);
this.depth = depth;
setDepthIsSet(true);
this.depth_per_component = depth_per_component;
setDepth_per_componentIsSet(true);
this.is_monochrome = is_monochrome;
setIs_monochromeIsSet(true);
this.rect = rect;
this.available_rect = available_rect;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ScreenInfo(ScreenInfo other) {
__isset_bitfield = other.__isset_bitfield;
this.device_scale_factor = other.device_scale_factor;
this.depth = other.depth;
this.depth_per_component = other.depth_per_component;
this.is_monochrome = other.is_monochrome;
if (other.isSetRect()) {
this.rect = new Rect(other.rect);
}
if (other.isSetAvailable_rect()) {
this.available_rect = new Rect(other.available_rect);
}
}
@Override
public ScreenInfo deepCopy() {
return new ScreenInfo(this);
}
@Override
public void clear() {
setDevice_scale_factorIsSet(false);
this.device_scale_factor = 0.0;
setDepthIsSet(false);
this.depth = 0;
setDepth_per_componentIsSet(false);
this.depth_per_component = 0;
setIs_monochromeIsSet(false);
this.is_monochrome = false;
this.rect = null;
this.available_rect = null;
}
public double getDevice_scale_factor() {
return this.device_scale_factor;
}
public ScreenInfo setDevice_scale_factor(double device_scale_factor) {
this.device_scale_factor = device_scale_factor;
setDevice_scale_factorIsSet(true);
return this;
}
public void unsetDevice_scale_factor() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEVICE_SCALE_FACTOR_ISSET_ID);
}
/** Returns true if field device_scale_factor is set (has been assigned a value) and false otherwise */
public boolean isSetDevice_scale_factor() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __DEVICE_SCALE_FACTOR_ISSET_ID);
}
public void setDevice_scale_factorIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __DEVICE_SCALE_FACTOR_ISSET_ID, value);
}
public int getDepth() {
return this.depth;
}
public ScreenInfo setDepth(int depth) {
this.depth = depth;
setDepthIsSet(true);
return this;
}
public void unsetDepth() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEPTH_ISSET_ID);
}
/** Returns true if field depth is set (has been assigned a value) and false otherwise */
public boolean isSetDepth() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __DEPTH_ISSET_ID);
}
public void setDepthIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __DEPTH_ISSET_ID, value);
}
public int getDepth_per_component() {
return this.depth_per_component;
}
public ScreenInfo setDepth_per_component(int depth_per_component) {
this.depth_per_component = depth_per_component;
setDepth_per_componentIsSet(true);
return this;
}
public void unsetDepth_per_component() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEPTH_PER_COMPONENT_ISSET_ID);
}
/** Returns true if field depth_per_component is set (has been assigned a value) and false otherwise */
public boolean isSetDepth_per_component() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __DEPTH_PER_COMPONENT_ISSET_ID);
}
public void setDepth_per_componentIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __DEPTH_PER_COMPONENT_ISSET_ID, value);
}
public boolean isIs_monochrome() {
return this.is_monochrome;
}
public ScreenInfo setIs_monochrome(boolean is_monochrome) {
this.is_monochrome = is_monochrome;
setIs_monochromeIsSet(true);
return this;
}
public void unsetIs_monochrome() {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_MONOCHROME_ISSET_ID);
}
/** Returns true if field is_monochrome is set (has been assigned a value) and false otherwise */
public boolean isSetIs_monochrome() {
return com.jetbrains.cef.remote.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_MONOCHROME_ISSET_ID);
}
public void setIs_monochromeIsSet(boolean value) {
__isset_bitfield = com.jetbrains.cef.remote.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_MONOCHROME_ISSET_ID, value);
}
@com.jetbrains.cef.remote.thrift.annotation.Nullable
public Rect getRect() {
return this.rect;
}
public ScreenInfo setRect(@com.jetbrains.cef.remote.thrift.annotation.Nullable Rect rect) {
this.rect = rect;
return this;
}
public void unsetRect() {
this.rect = null;
}
/** Returns true if field rect is set (has been assigned a value) and false otherwise */
public boolean isSetRect() {
return this.rect != null;
}
public void setRectIsSet(boolean value) {
if (!value) {
this.rect = null;
}
}
@com.jetbrains.cef.remote.thrift.annotation.Nullable
public Rect getAvailable_rect() {
return this.available_rect;
}
public ScreenInfo setAvailable_rect(@com.jetbrains.cef.remote.thrift.annotation.Nullable Rect available_rect) {
this.available_rect = available_rect;
return this;
}
public void unsetAvailable_rect() {
this.available_rect = null;
}
/** Returns true if field available_rect is set (has been assigned a value) and false otherwise */
public boolean isSetAvailable_rect() {
return this.available_rect != null;
}
public void setAvailable_rectIsSet(boolean value) {
if (!value) {
this.available_rect = null;
}
}
@Override
public void setFieldValue(_Fields field, @com.jetbrains.cef.remote.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DEVICE_SCALE_FACTOR:
if (value == null) {
unsetDevice_scale_factor();
} else {
setDevice_scale_factor((java.lang.Double)value);
}
break;
case DEPTH:
if (value == null) {
unsetDepth();
} else {
setDepth((java.lang.Integer)value);
}
break;
case DEPTH_PER_COMPONENT:
if (value == null) {
unsetDepth_per_component();
} else {
setDepth_per_component((java.lang.Integer)value);
}
break;
case IS_MONOCHROME:
if (value == null) {
unsetIs_monochrome();
} else {
setIs_monochrome((java.lang.Boolean)value);
}
break;
case RECT:
if (value == null) {
unsetRect();
} else {
setRect((Rect)value);
}
break;
case AVAILABLE_RECT:
if (value == null) {
unsetAvailable_rect();
} else {
setAvailable_rect((Rect)value);
}
break;
}
}
@com.jetbrains.cef.remote.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DEVICE_SCALE_FACTOR:
return getDevice_scale_factor();
case DEPTH:
return getDepth();
case DEPTH_PER_COMPONENT:
return getDepth_per_component();
case IS_MONOCHROME:
return isIs_monochrome();
case RECT:
return getRect();
case AVAILABLE_RECT:
return getAvailable_rect();
}
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 DEVICE_SCALE_FACTOR:
return isSetDevice_scale_factor();
case DEPTH:
return isSetDepth();
case DEPTH_PER_COMPONENT:
return isSetDepth_per_component();
case IS_MONOCHROME:
return isSetIs_monochrome();
case RECT:
return isSetRect();
case AVAILABLE_RECT:
return isSetAvailable_rect();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof ScreenInfo)
return this.equals((ScreenInfo)that);
return false;
}
public boolean equals(ScreenInfo that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_device_scale_factor = true;
boolean that_present_device_scale_factor = true;
if (this_present_device_scale_factor || that_present_device_scale_factor) {
if (!(this_present_device_scale_factor && that_present_device_scale_factor))
return false;
if (this.device_scale_factor != that.device_scale_factor)
return false;
}
boolean this_present_depth = true;
boolean that_present_depth = true;
if (this_present_depth || that_present_depth) {
if (!(this_present_depth && that_present_depth))
return false;
if (this.depth != that.depth)
return false;
}
boolean this_present_depth_per_component = true;
boolean that_present_depth_per_component = true;
if (this_present_depth_per_component || that_present_depth_per_component) {
if (!(this_present_depth_per_component && that_present_depth_per_component))
return false;
if (this.depth_per_component != that.depth_per_component)
return false;
}
boolean this_present_is_monochrome = true;
boolean that_present_is_monochrome = true;
if (this_present_is_monochrome || that_present_is_monochrome) {
if (!(this_present_is_monochrome && that_present_is_monochrome))
return false;
if (this.is_monochrome != that.is_monochrome)
return false;
}
boolean this_present_rect = true && this.isSetRect();
boolean that_present_rect = true && that.isSetRect();
if (this_present_rect || that_present_rect) {
if (!(this_present_rect && that_present_rect))
return false;
if (!this.rect.equals(that.rect))
return false;
}
boolean this_present_available_rect = true && this.isSetAvailable_rect();
boolean that_present_available_rect = true && that.isSetAvailable_rect();
if (this_present_available_rect || that_present_available_rect) {
if (!(this_present_available_rect && that_present_available_rect))
return false;
if (!this.available_rect.equals(that.available_rect))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + com.jetbrains.cef.remote.thrift.TBaseHelper.hashCode(device_scale_factor);
hashCode = hashCode * 8191 + depth;
hashCode = hashCode * 8191 + depth_per_component;
hashCode = hashCode * 8191 + ((is_monochrome) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetRect()) ? 131071 : 524287);
if (isSetRect())
hashCode = hashCode * 8191 + rect.hashCode();
hashCode = hashCode * 8191 + ((isSetAvailable_rect()) ? 131071 : 524287);
if (isSetAvailable_rect())
hashCode = hashCode * 8191 + available_rect.hashCode();
return hashCode;
}
@Override
public int compareTo(ScreenInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetDevice_scale_factor(), other.isSetDevice_scale_factor());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDevice_scale_factor()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.device_scale_factor, other.device_scale_factor);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDepth(), other.isSetDepth());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDepth()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.depth, other.depth);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDepth_per_component(), other.isSetDepth_per_component());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDepth_per_component()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.depth_per_component, other.depth_per_component);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIs_monochrome(), other.isSetIs_monochrome());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIs_monochrome()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.is_monochrome, other.is_monochrome);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRect(), other.isSetRect());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRect()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.rect, other.rect);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAvailable_rect(), other.isSetAvailable_rect());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAvailable_rect()) {
lastComparison = com.jetbrains.cef.remote.thrift.TBaseHelper.compareTo(this.available_rect, other.available_rect);
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("ScreenInfo(");
boolean first = true;
sb.append("device_scale_factor:");
sb.append(this.device_scale_factor);
first = false;
if (!first) sb.append(", ");
sb.append("depth:");
sb.append(this.depth);
first = false;
if (!first) sb.append(", ");
sb.append("depth_per_component:");
sb.append(this.depth_per_component);
first = false;
if (!first) sb.append(", ");
sb.append("is_monochrome:");
sb.append(this.is_monochrome);
first = false;
if (!first) sb.append(", ");
sb.append("rect:");
if (this.rect == null) {
sb.append("null");
} else {
sb.append(this.rect);
}
first = false;
if (!first) sb.append(", ");
sb.append("available_rect:");
if (this.available_rect == null) {
sb.append("null");
} else {
sb.append(this.available_rect);
}
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 'device_scale_factor' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'depth' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'depth_per_component' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'is_monochrome' because it's a primitive and you chose the non-beans generator.
if (rect == null) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'rect' was not present! Struct: " + toString());
}
if (available_rect == null) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'available_rect' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (rect != null) {
rect.validate();
}
if (available_rect != null) {
available_rect.validate();
}
}
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 ScreenInfoStandardSchemeFactory implements com.jetbrains.cef.remote.thrift.scheme.SchemeFactory {
@Override
public ScreenInfoStandardScheme getScheme() {
return new ScreenInfoStandardScheme();
}
}
private static class ScreenInfoStandardScheme extends com.jetbrains.cef.remote.thrift.scheme.StandardScheme<ScreenInfo> {
@Override
public void read(com.jetbrains.cef.remote.thrift.protocol.TProtocol iprot, ScreenInfo 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: // DEVICE_SCALE_FACTOR
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.DOUBLE) {
struct.device_scale_factor = iprot.readDouble();
struct.setDevice_scale_factorIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DEPTH
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
struct.depth = iprot.readI32();
struct.setDepthIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DEPTH_PER_COMPONENT
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.I32) {
struct.depth_per_component = iprot.readI32();
struct.setDepth_per_componentIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // IS_MONOCHROME
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.BOOL) {
struct.is_monochrome = iprot.readBool();
struct.setIs_monochromeIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // RECT
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRUCT) {
struct.rect = new Rect();
struct.rect.read(iprot);
struct.setRectIsSet(true);
} else {
com.jetbrains.cef.remote.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // AVAILABLE_RECT
if (schemeField.type == com.jetbrains.cef.remote.thrift.protocol.TType.STRUCT) {
struct.available_rect = new Rect();
struct.available_rect.read(iprot);
struct.setAvailable_rectIsSet(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.isSetDevice_scale_factor()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'device_scale_factor' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetDepth()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'depth' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetDepth_per_component()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'depth_per_component' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetIs_monochrome()) {
throw new com.jetbrains.cef.remote.thrift.protocol.TProtocolException("Required field 'is_monochrome' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
@Override
public void write(com.jetbrains.cef.remote.thrift.protocol.TProtocol oprot, ScreenInfo struct) throws com.jetbrains.cef.remote.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(DEVICE_SCALE_FACTOR_FIELD_DESC);
oprot.writeDouble(struct.device_scale_factor);
oprot.writeFieldEnd();
oprot.writeFieldBegin(DEPTH_FIELD_DESC);
oprot.writeI32(struct.depth);
oprot.writeFieldEnd();
oprot.writeFieldBegin(DEPTH_PER_COMPONENT_FIELD_DESC);
oprot.writeI32(struct.depth_per_component);
oprot.writeFieldEnd();
oprot.writeFieldBegin(IS_MONOCHROME_FIELD_DESC);
oprot.writeBool(struct.is_monochrome);
oprot.writeFieldEnd();
if (struct.rect != null) {
oprot.writeFieldBegin(RECT_FIELD_DESC);
struct.rect.write(oprot);
oprot.writeFieldEnd();
}
if (struct.available_rect != null) {
oprot.writeFieldBegin(AVAILABLE_RECT_FIELD_DESC);
struct.available_rect.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class ScreenInfoTupleSchemeFactory implements com.jetbrains.cef.remote.thrift.scheme.SchemeFactory {
@Override
public ScreenInfoTupleScheme getScheme() {
return new ScreenInfoTupleScheme();
}
}
private static class ScreenInfoTupleScheme extends com.jetbrains.cef.remote.thrift.scheme.TupleScheme<ScreenInfo> {
@Override
public void write(com.jetbrains.cef.remote.thrift.protocol.TProtocol prot, ScreenInfo 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.writeDouble(struct.device_scale_factor);
oprot.writeI32(struct.depth);
oprot.writeI32(struct.depth_per_component);
oprot.writeBool(struct.is_monochrome);
struct.rect.write(oprot);
struct.available_rect.write(oprot);
}
@Override
public void read(com.jetbrains.cef.remote.thrift.protocol.TProtocol prot, ScreenInfo 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.device_scale_factor = iprot.readDouble();
struct.setDevice_scale_factorIsSet(true);
struct.depth = iprot.readI32();
struct.setDepthIsSet(true);
struct.depth_per_component = iprot.readI32();
struct.setDepth_per_componentIsSet(true);
struct.is_monochrome = iprot.readBool();
struct.setIs_monochromeIsSet(true);
struct.rect = new Rect();
struct.rect.read(iprot);
struct.setRectIsSet(true);
struct.available_rect = new Rect();
struct.available_rect.read(iprot);
struct.setAvailable_rectIsSet(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();
}
}