com.uber.cadence.DescribeHistoryHostResponse Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.uber.cadence;
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.3)", date = "2019-06-18")
public class DescribeHistoryHostResponse 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("DescribeHistoryHostResponse");
private static final org.apache.thrift.protocol.TField NUMBER_OF_SHARDS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfShards", org.apache.thrift.protocol.TType.I32, (short)10);
private static final org.apache.thrift.protocol.TField SHARD_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("shardIDs", org.apache.thrift.protocol.TType.LIST, (short)20);
private static final org.apache.thrift.protocol.TField DOMAIN_CACHE_FIELD_DESC = new org.apache.thrift.protocol.TField("domainCache", org.apache.thrift.protocol.TType.STRUCT, (short)30);
private static final org.apache.thrift.protocol.TField SHARD_CONTROLLER_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("shardControllerStatus", org.apache.thrift.protocol.TType.STRING, (short)40);
private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)50);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new DescribeHistoryHostResponseStandardSchemeFactory());
schemes.put(TupleScheme.class, new DescribeHistoryHostResponseTupleSchemeFactory());
}
public int numberOfShards; // optional
public List shardIDs; // optional
public DomainCacheInfo domainCache; // optional
public String shardControllerStatus; // optional
public String address; // 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 {
NUMBER_OF_SHARDS((short)10, "numberOfShards"),
SHARD_IDS((short)20, "shardIDs"),
DOMAIN_CACHE((short)30, "domainCache"),
SHARD_CONTROLLER_STATUS((short)40, "shardControllerStatus"),
ADDRESS((short)50, "address");
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 10: // NUMBER_OF_SHARDS
return NUMBER_OF_SHARDS;
case 20: // SHARD_IDS
return SHARD_IDS;
case 30: // DOMAIN_CACHE
return DOMAIN_CACHE;
case 40: // SHARD_CONTROLLER_STATUS
return SHARD_CONTROLLER_STATUS;
case 50: // ADDRESS
return ADDRESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __NUMBEROFSHARDS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NUMBER_OF_SHARDS,_Fields.SHARD_IDS,_Fields.DOMAIN_CACHE,_Fields.SHARD_CONTROLLER_STATUS,_Fields.ADDRESS};
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.NUMBER_OF_SHARDS, new org.apache.thrift.meta_data.FieldMetaData("numberOfShards", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.SHARD_IDS, new org.apache.thrift.meta_data.FieldMetaData("shardIDs", 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.I32))));
tmpMap.put(_Fields.DOMAIN_CACHE, new org.apache.thrift.meta_data.FieldMetaData("domainCache", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "DomainCacheInfo")));
tmpMap.put(_Fields.SHARD_CONTROLLER_STATUS, new org.apache.thrift.meta_data.FieldMetaData("shardControllerStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DescribeHistoryHostResponse.class, metaDataMap);
}
public DescribeHistoryHostResponse() {
}
/**
* Performs a deep copy on other.
*/
public DescribeHistoryHostResponse(DescribeHistoryHostResponse other) {
__isset_bitfield = other.__isset_bitfield;
this.numberOfShards = other.numberOfShards;
if (other.isSetShardIDs()) {
List __this__shardIDs = new ArrayList(other.shardIDs);
this.shardIDs = __this__shardIDs;
}
if (other.isSetDomainCache()) {
this.domainCache = other.domainCache;
}
if (other.isSetShardControllerStatus()) {
this.shardControllerStatus = other.shardControllerStatus;
}
if (other.isSetAddress()) {
this.address = other.address;
}
}
public DescribeHistoryHostResponse deepCopy() {
return new DescribeHistoryHostResponse(this);
}
@Override
public void clear() {
setNumberOfShardsIsSet(false);
this.numberOfShards = 0;
this.shardIDs = null;
this.domainCache = null;
this.shardControllerStatus = null;
this.address = null;
}
public int getNumberOfShards() {
return this.numberOfShards;
}
public DescribeHistoryHostResponse setNumberOfShards(int numberOfShards) {
this.numberOfShards = numberOfShards;
setNumberOfShardsIsSet(true);
return this;
}
public void unsetNumberOfShards() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFSHARDS_ISSET_ID);
}
/** Returns true if field numberOfShards is set (has been assigned a value) and false otherwise */
public boolean isSetNumberOfShards() {
return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFSHARDS_ISSET_ID);
}
public void setNumberOfShardsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFSHARDS_ISSET_ID, value);
}
public int getShardIDsSize() {
return (this.shardIDs == null) ? 0 : this.shardIDs.size();
}
public java.util.Iterator getShardIDsIterator() {
return (this.shardIDs == null) ? null : this.shardIDs.iterator();
}
public void addToShardIDs(int elem) {
if (this.shardIDs == null) {
this.shardIDs = new ArrayList();
}
this.shardIDs.add(elem);
}
public List getShardIDs() {
return this.shardIDs;
}
public DescribeHistoryHostResponse setShardIDs(List shardIDs) {
this.shardIDs = shardIDs;
return this;
}
public void unsetShardIDs() {
this.shardIDs = null;
}
/** Returns true if field shardIDs is set (has been assigned a value) and false otherwise */
public boolean isSetShardIDs() {
return this.shardIDs != null;
}
public void setShardIDsIsSet(boolean value) {
if (!value) {
this.shardIDs = null;
}
}
public DomainCacheInfo getDomainCache() {
return this.domainCache;
}
public DescribeHistoryHostResponse setDomainCache(DomainCacheInfo domainCache) {
this.domainCache = domainCache;
return this;
}
public void unsetDomainCache() {
this.domainCache = null;
}
/** Returns true if field domainCache is set (has been assigned a value) and false otherwise */
public boolean isSetDomainCache() {
return this.domainCache != null;
}
public void setDomainCacheIsSet(boolean value) {
if (!value) {
this.domainCache = null;
}
}
public String getShardControllerStatus() {
return this.shardControllerStatus;
}
public DescribeHistoryHostResponse setShardControllerStatus(String shardControllerStatus) {
this.shardControllerStatus = shardControllerStatus;
return this;
}
public void unsetShardControllerStatus() {
this.shardControllerStatus = null;
}
/** Returns true if field shardControllerStatus is set (has been assigned a value) and false otherwise */
public boolean isSetShardControllerStatus() {
return this.shardControllerStatus != null;
}
public void setShardControllerStatusIsSet(boolean value) {
if (!value) {
this.shardControllerStatus = null;
}
}
public String getAddress() {
return this.address;
}
public DescribeHistoryHostResponse setAddress(String address) {
this.address = address;
return this;
}
public void unsetAddress() {
this.address = null;
}
/** Returns true if field address is set (has been assigned a value) and false otherwise */
public boolean isSetAddress() {
return this.address != null;
}
public void setAddressIsSet(boolean value) {
if (!value) {
this.address = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case NUMBER_OF_SHARDS:
if (value == null) {
unsetNumberOfShards();
} else {
setNumberOfShards((Integer)value);
}
break;
case SHARD_IDS:
if (value == null) {
unsetShardIDs();
} else {
setShardIDs((List)value);
}
break;
case DOMAIN_CACHE:
if (value == null) {
unsetDomainCache();
} else {
setDomainCache((DomainCacheInfo)value);
}
break;
case SHARD_CONTROLLER_STATUS:
if (value == null) {
unsetShardControllerStatus();
} else {
setShardControllerStatus((String)value);
}
break;
case ADDRESS:
if (value == null) {
unsetAddress();
} else {
setAddress((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case NUMBER_OF_SHARDS:
return getNumberOfShards();
case SHARD_IDS:
return getShardIDs();
case DOMAIN_CACHE:
return getDomainCache();
case SHARD_CONTROLLER_STATUS:
return getShardControllerStatus();
case ADDRESS:
return getAddress();
}
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 NUMBER_OF_SHARDS:
return isSetNumberOfShards();
case SHARD_IDS:
return isSetShardIDs();
case DOMAIN_CACHE:
return isSetDomainCache();
case SHARD_CONTROLLER_STATUS:
return isSetShardControllerStatus();
case ADDRESS:
return isSetAddress();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof DescribeHistoryHostResponse)
return this.equals((DescribeHistoryHostResponse)that);
return false;
}
public boolean equals(DescribeHistoryHostResponse that) {
if (that == null)
return false;
boolean this_present_numberOfShards = true && this.isSetNumberOfShards();
boolean that_present_numberOfShards = true && that.isSetNumberOfShards();
if (this_present_numberOfShards || that_present_numberOfShards) {
if (!(this_present_numberOfShards && that_present_numberOfShards))
return false;
if (this.numberOfShards != that.numberOfShards)
return false;
}
boolean this_present_shardIDs = true && this.isSetShardIDs();
boolean that_present_shardIDs = true && that.isSetShardIDs();
if (this_present_shardIDs || that_present_shardIDs) {
if (!(this_present_shardIDs && that_present_shardIDs))
return false;
if (!this.shardIDs.equals(that.shardIDs))
return false;
}
boolean this_present_domainCache = true && this.isSetDomainCache();
boolean that_present_domainCache = true && that.isSetDomainCache();
if (this_present_domainCache || that_present_domainCache) {
if (!(this_present_domainCache && that_present_domainCache))
return false;
if (!this.domainCache.equals(that.domainCache))
return false;
}
boolean this_present_shardControllerStatus = true && this.isSetShardControllerStatus();
boolean that_present_shardControllerStatus = true && that.isSetShardControllerStatus();
if (this_present_shardControllerStatus || that_present_shardControllerStatus) {
if (!(this_present_shardControllerStatus && that_present_shardControllerStatus))
return false;
if (!this.shardControllerStatus.equals(that.shardControllerStatus))
return false;
}
boolean this_present_address = true && this.isSetAddress();
boolean that_present_address = true && that.isSetAddress();
if (this_present_address || that_present_address) {
if (!(this_present_address && that_present_address))
return false;
if (!this.address.equals(that.address))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy