
com.adgear.anoa.test.nested.NestedThrift Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.adgear.anoa.test.nested;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-6-3")
public class NestedThrift implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NestedThrift");
private static final org.apache.thrift.protocol.TField ENUM_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("enum_field", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField STRUCT_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("struct_field", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField ENUM_LIST_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("enum_list_field", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField STRUCT_LIST_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("struct_list_field", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField ENUM_SET_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("enum_set_field", org.apache.thrift.protocol.TType.SET, (short)5);
private static final org.apache.thrift.protocol.TField STRUCT_SET_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("struct_set_field", org.apache.thrift.protocol.TType.SET, (short)6);
private static final org.apache.thrift.protocol.TField ENUM_MAP_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("enum_map_field", org.apache.thrift.protocol.TType.MAP, (short)7);
private static final org.apache.thrift.protocol.TField STRUCT_MAP_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("struct_map_field", org.apache.thrift.protocol.TType.MAP, (short)8);
private static final org.apache.thrift.protocol.TField FLOAT_LIST_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("float_list_field", org.apache.thrift.protocol.TType.LIST, (short)10);
private static final org.apache.thrift.protocol.TField FLOAT_MAP_FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("float_map_field", org.apache.thrift.protocol.TType.MAP, (short)11);
private static final org.apache.thrift.protocol.TField VARIANT_FIELD_DESC = new org.apache.thrift.protocol.TField("variant", org.apache.thrift.protocol.TType.STRUCT, (short)12);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new NestedThriftStandardSchemeFactory());
schemes.put(TupleScheme.class, new NestedThriftTupleSchemeFactory());
}
/**
*
* @see EnumThrift
*/
public EnumThrift enum_field; // optional
public BytesThrift struct_field; // optional
public List enum_list_field; // optional
public List struct_list_field; // optional
public Set enum_set_field; // optional
public Set struct_set_field; // optional
public Map enum_map_field; // optional
public Map struct_map_field; // optional
public List float_list_field; // optional
public Map float_map_field; // optional
public VariantThrift variant; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
*
* @see EnumThrift
*/
ENUM_FIELD((short)1, "enum_field"),
STRUCT_FIELD((short)2, "struct_field"),
ENUM_LIST_FIELD((short)3, "enum_list_field"),
STRUCT_LIST_FIELD((short)4, "struct_list_field"),
ENUM_SET_FIELD((short)5, "enum_set_field"),
STRUCT_SET_FIELD((short)6, "struct_set_field"),
ENUM_MAP_FIELD((short)7, "enum_map_field"),
STRUCT_MAP_FIELD((short)8, "struct_map_field"),
FLOAT_LIST_FIELD((short)10, "float_list_field"),
FLOAT_MAP_FIELD((short)11, "float_map_field"),
VARIANT((short)12, "variant");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ENUM_FIELD
return ENUM_FIELD;
case 2: // STRUCT_FIELD
return STRUCT_FIELD;
case 3: // ENUM_LIST_FIELD
return ENUM_LIST_FIELD;
case 4: // STRUCT_LIST_FIELD
return STRUCT_LIST_FIELD;
case 5: // ENUM_SET_FIELD
return ENUM_SET_FIELD;
case 6: // STRUCT_SET_FIELD
return STRUCT_SET_FIELD;
case 7: // ENUM_MAP_FIELD
return ENUM_MAP_FIELD;
case 8: // STRUCT_MAP_FIELD
return STRUCT_MAP_FIELD;
case 10: // FLOAT_LIST_FIELD
return FLOAT_LIST_FIELD;
case 11: // FLOAT_MAP_FIELD
return FLOAT_MAP_FIELD;
case 12: // VARIANT
return VARIANT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.ENUM_FIELD,_Fields.STRUCT_FIELD,_Fields.ENUM_LIST_FIELD,_Fields.STRUCT_LIST_FIELD,_Fields.ENUM_SET_FIELD,_Fields.STRUCT_SET_FIELD,_Fields.ENUM_MAP_FIELD,_Fields.STRUCT_MAP_FIELD,_Fields.FLOAT_LIST_FIELD,_Fields.FLOAT_MAP_FIELD,_Fields.VARIANT};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ENUM_FIELD, new org.apache.thrift.meta_data.FieldMetaData("enum_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EnumThrift.class)));
tmpMap.put(_Fields.STRUCT_FIELD, new org.apache.thrift.meta_data.FieldMetaData("struct_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BytesThrift.class)));
tmpMap.put(_Fields.ENUM_LIST_FIELD, new org.apache.thrift.meta_data.FieldMetaData("enum_list_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EnumThrift.class))));
tmpMap.put(_Fields.STRUCT_LIST_FIELD, new org.apache.thrift.meta_data.FieldMetaData("struct_list_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BytesThrift.class))));
tmpMap.put(_Fields.ENUM_SET_FIELD, new org.apache.thrift.meta_data.FieldMetaData("enum_set_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EnumThrift.class))));
tmpMap.put(_Fields.STRUCT_SET_FIELD, new org.apache.thrift.meta_data.FieldMetaData("struct_set_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BytesThrift.class))));
tmpMap.put(_Fields.ENUM_MAP_FIELD, new org.apache.thrift.meta_data.FieldMetaData("enum_map_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EnumThrift.class))));
tmpMap.put(_Fields.STRUCT_MAP_FIELD, new org.apache.thrift.meta_data.FieldMetaData("struct_map_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BytesThrift.class))));
tmpMap.put(_Fields.FLOAT_LIST_FIELD, new org.apache.thrift.meta_data.FieldMetaData("float_list_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
tmpMap.put(_Fields.FLOAT_MAP_FIELD, new org.apache.thrift.meta_data.FieldMetaData("float_map_field", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
tmpMap.put(_Fields.VARIANT, new org.apache.thrift.meta_data.FieldMetaData("variant", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VariantThrift.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NestedThrift.class, metaDataMap);
}
public NestedThrift() {
this.enum_field = com.adgear.anoa.test.nested.EnumThrift.OFF;
}
/**
* Performs a deep copy on other.
*/
public NestedThrift(NestedThrift other) {
if (other.isSetEnum_field()) {
this.enum_field = other.enum_field;
}
if (other.isSetStruct_field()) {
this.struct_field = new BytesThrift(other.struct_field);
}
if (other.isSetEnum_list_field()) {
List __this__enum_list_field = new ArrayList(other.enum_list_field.size());
for (EnumThrift other_element : other.enum_list_field) {
__this__enum_list_field.add(other_element);
}
this.enum_list_field = __this__enum_list_field;
}
if (other.isSetStruct_list_field()) {
List __this__struct_list_field = new ArrayList(other.struct_list_field.size());
for (BytesThrift other_element : other.struct_list_field) {
__this__struct_list_field.add(new BytesThrift(other_element));
}
this.struct_list_field = __this__struct_list_field;
}
if (other.isSetEnum_set_field()) {
Set __this__enum_set_field = new HashSet(other.enum_set_field.size());
for (EnumThrift other_element : other.enum_set_field) {
__this__enum_set_field.add(other_element);
}
this.enum_set_field = __this__enum_set_field;
}
if (other.isSetStruct_set_field()) {
Set __this__struct_set_field = new HashSet(other.struct_set_field.size());
for (BytesThrift other_element : other.struct_set_field) {
__this__struct_set_field.add(new BytesThrift(other_element));
}
this.struct_set_field = __this__struct_set_field;
}
if (other.isSetEnum_map_field()) {
Map __this__enum_map_field = new HashMap(other.enum_map_field.size());
for (Map.Entry other_element : other.enum_map_field.entrySet()) {
String other_element_key = other_element.getKey();
EnumThrift other_element_value = other_element.getValue();
String __this__enum_map_field_copy_key = other_element_key;
EnumThrift __this__enum_map_field_copy_value = other_element_value;
__this__enum_map_field.put(__this__enum_map_field_copy_key, __this__enum_map_field_copy_value);
}
this.enum_map_field = __this__enum_map_field;
}
if (other.isSetStruct_map_field()) {
Map __this__struct_map_field = new HashMap(other.struct_map_field.size());
for (Map.Entry other_element : other.struct_map_field.entrySet()) {
String other_element_key = other_element.getKey();
BytesThrift other_element_value = other_element.getValue();
String __this__struct_map_field_copy_key = other_element_key;
BytesThrift __this__struct_map_field_copy_value = new BytesThrift(other_element_value);
__this__struct_map_field.put(__this__struct_map_field_copy_key, __this__struct_map_field_copy_value);
}
this.struct_map_field = __this__struct_map_field;
}
if (other.isSetFloat_list_field()) {
List __this__float_list_field = new ArrayList(other.float_list_field);
this.float_list_field = __this__float_list_field;
}
if (other.isSetFloat_map_field()) {
Map __this__float_map_field = new HashMap(other.float_map_field);
this.float_map_field = __this__float_map_field;
}
if (other.isSetVariant()) {
this.variant = new VariantThrift(other.variant);
}
}
public NestedThrift deepCopy() {
return new NestedThrift(this);
}
@Override
public void clear() {
this.enum_field = com.adgear.anoa.test.nested.EnumThrift.OFF;
this.struct_field = null;
this.enum_list_field = null;
this.struct_list_field = null;
this.enum_set_field = null;
this.struct_set_field = null;
this.enum_map_field = null;
this.struct_map_field = null;
this.float_list_field = null;
this.float_map_field = null;
this.variant = null;
}
/**
*
* @see EnumThrift
*/
public EnumThrift getEnum_field() {
return this.enum_field;
}
/**
*
* @see EnumThrift
*/
public NestedThrift setEnum_field(EnumThrift enum_field) {
this.enum_field = enum_field;
return this;
}
public void unsetEnum_field() {
this.enum_field = null;
}
/** Returns true if field enum_field is set (has been assigned a value) and false otherwise */
public boolean isSetEnum_field() {
return this.enum_field != null;
}
public void setEnum_fieldIsSet(boolean value) {
if (!value) {
this.enum_field = null;
}
}
public BytesThrift getStruct_field() {
return this.struct_field;
}
public NestedThrift setStruct_field(BytesThrift struct_field) {
this.struct_field = struct_field;
return this;
}
public void unsetStruct_field() {
this.struct_field = null;
}
/** Returns true if field struct_field is set (has been assigned a value) and false otherwise */
public boolean isSetStruct_field() {
return this.struct_field != null;
}
public void setStruct_fieldIsSet(boolean value) {
if (!value) {
this.struct_field = null;
}
}
public int getEnum_list_fieldSize() {
return (this.enum_list_field == null) ? 0 : this.enum_list_field.size();
}
public java.util.Iterator getEnum_list_fieldIterator() {
return (this.enum_list_field == null) ? null : this.enum_list_field.iterator();
}
public void addToEnum_list_field(EnumThrift elem) {
if (this.enum_list_field == null) {
this.enum_list_field = new ArrayList();
}
this.enum_list_field.add(elem);
}
public List getEnum_list_field() {
return this.enum_list_field;
}
public NestedThrift setEnum_list_field(List enum_list_field) {
this.enum_list_field = enum_list_field;
return this;
}
public void unsetEnum_list_field() {
this.enum_list_field = null;
}
/** Returns true if field enum_list_field is set (has been assigned a value) and false otherwise */
public boolean isSetEnum_list_field() {
return this.enum_list_field != null;
}
public void setEnum_list_fieldIsSet(boolean value) {
if (!value) {
this.enum_list_field = null;
}
}
public int getStruct_list_fieldSize() {
return (this.struct_list_field == null) ? 0 : this.struct_list_field.size();
}
public java.util.Iterator getStruct_list_fieldIterator() {
return (this.struct_list_field == null) ? null : this.struct_list_field.iterator();
}
public void addToStruct_list_field(BytesThrift elem) {
if (this.struct_list_field == null) {
this.struct_list_field = new ArrayList();
}
this.struct_list_field.add(elem);
}
public List getStruct_list_field() {
return this.struct_list_field;
}
public NestedThrift setStruct_list_field(List struct_list_field) {
this.struct_list_field = struct_list_field;
return this;
}
public void unsetStruct_list_field() {
this.struct_list_field = null;
}
/** Returns true if field struct_list_field is set (has been assigned a value) and false otherwise */
public boolean isSetStruct_list_field() {
return this.struct_list_field != null;
}
public void setStruct_list_fieldIsSet(boolean value) {
if (!value) {
this.struct_list_field = null;
}
}
public int getEnum_set_fieldSize() {
return (this.enum_set_field == null) ? 0 : this.enum_set_field.size();
}
public java.util.Iterator getEnum_set_fieldIterator() {
return (this.enum_set_field == null) ? null : this.enum_set_field.iterator();
}
public void addToEnum_set_field(EnumThrift elem) {
if (this.enum_set_field == null) {
this.enum_set_field = new HashSet();
}
this.enum_set_field.add(elem);
}
public Set getEnum_set_field() {
return this.enum_set_field;
}
public NestedThrift setEnum_set_field(Set enum_set_field) {
this.enum_set_field = enum_set_field;
return this;
}
public void unsetEnum_set_field() {
this.enum_set_field = null;
}
/** Returns true if field enum_set_field is set (has been assigned a value) and false otherwise */
public boolean isSetEnum_set_field() {
return this.enum_set_field != null;
}
public void setEnum_set_fieldIsSet(boolean value) {
if (!value) {
this.enum_set_field = null;
}
}
public int getStruct_set_fieldSize() {
return (this.struct_set_field == null) ? 0 : this.struct_set_field.size();
}
public java.util.Iterator getStruct_set_fieldIterator() {
return (this.struct_set_field == null) ? null : this.struct_set_field.iterator();
}
public void addToStruct_set_field(BytesThrift elem) {
if (this.struct_set_field == null) {
this.struct_set_field = new HashSet();
}
this.struct_set_field.add(elem);
}
public Set getStruct_set_field() {
return this.struct_set_field;
}
public NestedThrift setStruct_set_field(Set struct_set_field) {
this.struct_set_field = struct_set_field;
return this;
}
public void unsetStruct_set_field() {
this.struct_set_field = null;
}
/** Returns true if field struct_set_field is set (has been assigned a value) and false otherwise */
public boolean isSetStruct_set_field() {
return this.struct_set_field != null;
}
public void setStruct_set_fieldIsSet(boolean value) {
if (!value) {
this.struct_set_field = null;
}
}
public int getEnum_map_fieldSize() {
return (this.enum_map_field == null) ? 0 : this.enum_map_field.size();
}
public void putToEnum_map_field(String key, EnumThrift val) {
if (this.enum_map_field == null) {
this.enum_map_field = new HashMap();
}
this.enum_map_field.put(key, val);
}
public Map getEnum_map_field() {
return this.enum_map_field;
}
public NestedThrift setEnum_map_field(Map enum_map_field) {
this.enum_map_field = enum_map_field;
return this;
}
public void unsetEnum_map_field() {
this.enum_map_field = null;
}
/** Returns true if field enum_map_field is set (has been assigned a value) and false otherwise */
public boolean isSetEnum_map_field() {
return this.enum_map_field != null;
}
public void setEnum_map_fieldIsSet(boolean value) {
if (!value) {
this.enum_map_field = null;
}
}
public int getStruct_map_fieldSize() {
return (this.struct_map_field == null) ? 0 : this.struct_map_field.size();
}
public void putToStruct_map_field(String key, BytesThrift val) {
if (this.struct_map_field == null) {
this.struct_map_field = new HashMap();
}
this.struct_map_field.put(key, val);
}
public Map getStruct_map_field() {
return this.struct_map_field;
}
public NestedThrift setStruct_map_field(Map struct_map_field) {
this.struct_map_field = struct_map_field;
return this;
}
public void unsetStruct_map_field() {
this.struct_map_field = null;
}
/** Returns true if field struct_map_field is set (has been assigned a value) and false otherwise */
public boolean isSetStruct_map_field() {
return this.struct_map_field != null;
}
public void setStruct_map_fieldIsSet(boolean value) {
if (!value) {
this.struct_map_field = null;
}
}
public int getFloat_list_fieldSize() {
return (this.float_list_field == null) ? 0 : this.float_list_field.size();
}
public java.util.Iterator getFloat_list_fieldIterator() {
return (this.float_list_field == null) ? null : this.float_list_field.iterator();
}
public void addToFloat_list_field(double elem) {
if (this.float_list_field == null) {
this.float_list_field = new ArrayList();
}
this.float_list_field.add(elem);
}
public List getFloat_list_field() {
return this.float_list_field;
}
public NestedThrift setFloat_list_field(List float_list_field) {
this.float_list_field = float_list_field;
return this;
}
public void unsetFloat_list_field() {
this.float_list_field = null;
}
/** Returns true if field float_list_field is set (has been assigned a value) and false otherwise */
public boolean isSetFloat_list_field() {
return this.float_list_field != null;
}
public void setFloat_list_fieldIsSet(boolean value) {
if (!value) {
this.float_list_field = null;
}
}
public int getFloat_map_fieldSize() {
return (this.float_map_field == null) ? 0 : this.float_map_field.size();
}
public void putToFloat_map_field(String key, double val) {
if (this.float_map_field == null) {
this.float_map_field = new HashMap();
}
this.float_map_field.put(key, val);
}
public Map getFloat_map_field() {
return this.float_map_field;
}
public NestedThrift setFloat_map_field(Map float_map_field) {
this.float_map_field = float_map_field;
return this;
}
public void unsetFloat_map_field() {
this.float_map_field = null;
}
/** Returns true if field float_map_field is set (has been assigned a value) and false otherwise */
public boolean isSetFloat_map_field() {
return this.float_map_field != null;
}
public void setFloat_map_fieldIsSet(boolean value) {
if (!value) {
this.float_map_field = null;
}
}
public VariantThrift getVariant() {
return this.variant;
}
public NestedThrift setVariant(VariantThrift variant) {
this.variant = variant;
return this;
}
public void unsetVariant() {
this.variant = null;
}
/** Returns true if field variant is set (has been assigned a value) and false otherwise */
public boolean isSetVariant() {
return this.variant != null;
}
public void setVariantIsSet(boolean value) {
if (!value) {
this.variant = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ENUM_FIELD:
if (value == null) {
unsetEnum_field();
} else {
setEnum_field((EnumThrift)value);
}
break;
case STRUCT_FIELD:
if (value == null) {
unsetStruct_field();
} else {
setStruct_field((BytesThrift)value);
}
break;
case ENUM_LIST_FIELD:
if (value == null) {
unsetEnum_list_field();
} else {
setEnum_list_field((List)value);
}
break;
case STRUCT_LIST_FIELD:
if (value == null) {
unsetStruct_list_field();
} else {
setStruct_list_field((List)value);
}
break;
case ENUM_SET_FIELD:
if (value == null) {
unsetEnum_set_field();
} else {
setEnum_set_field((Set)value);
}
break;
case STRUCT_SET_FIELD:
if (value == null) {
unsetStruct_set_field();
} else {
setStruct_set_field((Set)value);
}
break;
case ENUM_MAP_FIELD:
if (value == null) {
unsetEnum_map_field();
} else {
setEnum_map_field((Map)value);
}
break;
case STRUCT_MAP_FIELD:
if (value == null) {
unsetStruct_map_field();
} else {
setStruct_map_field((Map)value);
}
break;
case FLOAT_LIST_FIELD:
if (value == null) {
unsetFloat_list_field();
} else {
setFloat_list_field((List)value);
}
break;
case FLOAT_MAP_FIELD:
if (value == null) {
unsetFloat_map_field();
} else {
setFloat_map_field((Map)value);
}
break;
case VARIANT:
if (value == null) {
unsetVariant();
} else {
setVariant((VariantThrift)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ENUM_FIELD:
return getEnum_field();
case STRUCT_FIELD:
return getStruct_field();
case ENUM_LIST_FIELD:
return getEnum_list_field();
case STRUCT_LIST_FIELD:
return getStruct_list_field();
case ENUM_SET_FIELD:
return getEnum_set_field();
case STRUCT_SET_FIELD:
return getStruct_set_field();
case ENUM_MAP_FIELD:
return getEnum_map_field();
case STRUCT_MAP_FIELD:
return getStruct_map_field();
case FLOAT_LIST_FIELD:
return getFloat_list_field();
case FLOAT_MAP_FIELD:
return getFloat_map_field();
case VARIANT:
return getVariant();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case ENUM_FIELD:
return isSetEnum_field();
case STRUCT_FIELD:
return isSetStruct_field();
case ENUM_LIST_FIELD:
return isSetEnum_list_field();
case STRUCT_LIST_FIELD:
return isSetStruct_list_field();
case ENUM_SET_FIELD:
return isSetEnum_set_field();
case STRUCT_SET_FIELD:
return isSetStruct_set_field();
case ENUM_MAP_FIELD:
return isSetEnum_map_field();
case STRUCT_MAP_FIELD:
return isSetStruct_map_field();
case FLOAT_LIST_FIELD:
return isSetFloat_list_field();
case FLOAT_MAP_FIELD:
return isSetFloat_map_field();
case VARIANT:
return isSetVariant();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof NestedThrift)
return this.equals((NestedThrift)that);
return false;
}
public boolean equals(NestedThrift that) {
if (that == null)
return false;
boolean this_present_enum_field = true && this.isSetEnum_field();
boolean that_present_enum_field = true && that.isSetEnum_field();
if (this_present_enum_field || that_present_enum_field) {
if (!(this_present_enum_field && that_present_enum_field))
return false;
if (!this.enum_field.equals(that.enum_field))
return false;
}
boolean this_present_struct_field = true && this.isSetStruct_field();
boolean that_present_struct_field = true && that.isSetStruct_field();
if (this_present_struct_field || that_present_struct_field) {
if (!(this_present_struct_field && that_present_struct_field))
return false;
if (!this.struct_field.equals(that.struct_field))
return false;
}
boolean this_present_enum_list_field = true && this.isSetEnum_list_field();
boolean that_present_enum_list_field = true && that.isSetEnum_list_field();
if (this_present_enum_list_field || that_present_enum_list_field) {
if (!(this_present_enum_list_field && that_present_enum_list_field))
return false;
if (!this.enum_list_field.equals(that.enum_list_field))
return false;
}
boolean this_present_struct_list_field = true && this.isSetStruct_list_field();
boolean that_present_struct_list_field = true && that.isSetStruct_list_field();
if (this_present_struct_list_field || that_present_struct_list_field) {
if (!(this_present_struct_list_field && that_present_struct_list_field))
return false;
if (!this.struct_list_field.equals(that.struct_list_field))
return false;
}
boolean this_present_enum_set_field = true && this.isSetEnum_set_field();
boolean that_present_enum_set_field = true && that.isSetEnum_set_field();
if (this_present_enum_set_field || that_present_enum_set_field) {
if (!(this_present_enum_set_field && that_present_enum_set_field))
return false;
if (!this.enum_set_field.equals(that.enum_set_field))
return false;
}
boolean this_present_struct_set_field = true && this.isSetStruct_set_field();
boolean that_present_struct_set_field = true && that.isSetStruct_set_field();
if (this_present_struct_set_field || that_present_struct_set_field) {
if (!(this_present_struct_set_field && that_present_struct_set_field))
return false;
if (!this.struct_set_field.equals(that.struct_set_field))
return false;
}
boolean this_present_enum_map_field = true && this.isSetEnum_map_field();
boolean that_present_enum_map_field = true && that.isSetEnum_map_field();
if (this_present_enum_map_field || that_present_enum_map_field) {
if (!(this_present_enum_map_field && that_present_enum_map_field))
return false;
if (!this.enum_map_field.equals(that.enum_map_field))
return false;
}
boolean this_present_struct_map_field = true && this.isSetStruct_map_field();
boolean that_present_struct_map_field = true && that.isSetStruct_map_field();
if (this_present_struct_map_field || that_present_struct_map_field) {
if (!(this_present_struct_map_field && that_present_struct_map_field))
return false;
if (!this.struct_map_field.equals(that.struct_map_field))
return false;
}
boolean this_present_float_list_field = true && this.isSetFloat_list_field();
boolean that_present_float_list_field = true && that.isSetFloat_list_field();
if (this_present_float_list_field || that_present_float_list_field) {
if (!(this_present_float_list_field && that_present_float_list_field))
return false;
if (!this.float_list_field.equals(that.float_list_field))
return false;
}
boolean this_present_float_map_field = true && this.isSetFloat_map_field();
boolean that_present_float_map_field = true && that.isSetFloat_map_field();
if (this_present_float_map_field || that_present_float_map_field) {
if (!(this_present_float_map_field && that_present_float_map_field))
return false;
if (!this.float_map_field.equals(that.float_map_field))
return false;
}
boolean this_present_variant = true && this.isSetVariant();
boolean that_present_variant = true && that.isSetVariant();
if (this_present_variant || that_present_variant) {
if (!(this_present_variant && that_present_variant))
return false;
if (!this.variant.equals(that.variant))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy