com.uber.cadence.DescribeHistoryHostRequest 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 DescribeHistoryHostRequest 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("DescribeHistoryHostRequest");
private static final org.apache.thrift.protocol.TField HOST_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hostAddress", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField SHARD_ID_FOR_HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("shardIdForHost", org.apache.thrift.protocol.TType.I32, (short)20);
private static final org.apache.thrift.protocol.TField EXECUTION_FOR_HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("executionForHost", org.apache.thrift.protocol.TType.STRUCT, (short)30);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new DescribeHistoryHostRequestStandardSchemeFactory());
schemes.put(TupleScheme.class, new DescribeHistoryHostRequestTupleSchemeFactory());
}
public String hostAddress; // optional
public int shardIdForHost; // optional
public WorkflowExecution executionForHost; // 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 {
HOST_ADDRESS((short)10, "hostAddress"),
SHARD_ID_FOR_HOST((short)20, "shardIdForHost"),
EXECUTION_FOR_HOST((short)30, "executionForHost");
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: // HOST_ADDRESS
return HOST_ADDRESS;
case 20: // SHARD_ID_FOR_HOST
return SHARD_ID_FOR_HOST;
case 30: // EXECUTION_FOR_HOST
return EXECUTION_FOR_HOST;
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 __SHARDIDFORHOST_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.HOST_ADDRESS,_Fields.SHARD_ID_FOR_HOST,_Fields.EXECUTION_FOR_HOST};
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.HOST_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("hostAddress", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SHARD_ID_FOR_HOST, new org.apache.thrift.meta_data.FieldMetaData("shardIdForHost", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.EXECUTION_FOR_HOST, new org.apache.thrift.meta_data.FieldMetaData("executionForHost", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecution.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DescribeHistoryHostRequest.class, metaDataMap);
}
public DescribeHistoryHostRequest() {
}
/**
* Performs a deep copy on other.
*/
public DescribeHistoryHostRequest(DescribeHistoryHostRequest other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetHostAddress()) {
this.hostAddress = other.hostAddress;
}
this.shardIdForHost = other.shardIdForHost;
if (other.isSetExecutionForHost()) {
this.executionForHost = new WorkflowExecution(other.executionForHost);
}
}
public DescribeHistoryHostRequest deepCopy() {
return new DescribeHistoryHostRequest(this);
}
@Override
public void clear() {
this.hostAddress = null;
setShardIdForHostIsSet(false);
this.shardIdForHost = 0;
this.executionForHost = null;
}
public String getHostAddress() {
return this.hostAddress;
}
public DescribeHistoryHostRequest setHostAddress(String hostAddress) {
this.hostAddress = hostAddress;
return this;
}
public void unsetHostAddress() {
this.hostAddress = null;
}
/** Returns true if field hostAddress is set (has been assigned a value) and false otherwise */
public boolean isSetHostAddress() {
return this.hostAddress != null;
}
public void setHostAddressIsSet(boolean value) {
if (!value) {
this.hostAddress = null;
}
}
public int getShardIdForHost() {
return this.shardIdForHost;
}
public DescribeHistoryHostRequest setShardIdForHost(int shardIdForHost) {
this.shardIdForHost = shardIdForHost;
setShardIdForHostIsSet(true);
return this;
}
public void unsetShardIdForHost() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARDIDFORHOST_ISSET_ID);
}
/** Returns true if field shardIdForHost is set (has been assigned a value) and false otherwise */
public boolean isSetShardIdForHost() {
return EncodingUtils.testBit(__isset_bitfield, __SHARDIDFORHOST_ISSET_ID);
}
public void setShardIdForHostIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARDIDFORHOST_ISSET_ID, value);
}
public WorkflowExecution getExecutionForHost() {
return this.executionForHost;
}
public DescribeHistoryHostRequest setExecutionForHost(WorkflowExecution executionForHost) {
this.executionForHost = executionForHost;
return this;
}
public void unsetExecutionForHost() {
this.executionForHost = null;
}
/** Returns true if field executionForHost is set (has been assigned a value) and false otherwise */
public boolean isSetExecutionForHost() {
return this.executionForHost != null;
}
public void setExecutionForHostIsSet(boolean value) {
if (!value) {
this.executionForHost = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HOST_ADDRESS:
if (value == null) {
unsetHostAddress();
} else {
setHostAddress((String)value);
}
break;
case SHARD_ID_FOR_HOST:
if (value == null) {
unsetShardIdForHost();
} else {
setShardIdForHost((Integer)value);
}
break;
case EXECUTION_FOR_HOST:
if (value == null) {
unsetExecutionForHost();
} else {
setExecutionForHost((WorkflowExecution)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HOST_ADDRESS:
return getHostAddress();
case SHARD_ID_FOR_HOST:
return getShardIdForHost();
case EXECUTION_FOR_HOST:
return getExecutionForHost();
}
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 HOST_ADDRESS:
return isSetHostAddress();
case SHARD_ID_FOR_HOST:
return isSetShardIdForHost();
case EXECUTION_FOR_HOST:
return isSetExecutionForHost();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof DescribeHistoryHostRequest)
return this.equals((DescribeHistoryHostRequest)that);
return false;
}
public boolean equals(DescribeHistoryHostRequest that) {
if (that == null)
return false;
boolean this_present_hostAddress = true && this.isSetHostAddress();
boolean that_present_hostAddress = true && that.isSetHostAddress();
if (this_present_hostAddress || that_present_hostAddress) {
if (!(this_present_hostAddress && that_present_hostAddress))
return false;
if (!this.hostAddress.equals(that.hostAddress))
return false;
}
boolean this_present_shardIdForHost = true && this.isSetShardIdForHost();
boolean that_present_shardIdForHost = true && that.isSetShardIdForHost();
if (this_present_shardIdForHost || that_present_shardIdForHost) {
if (!(this_present_shardIdForHost && that_present_shardIdForHost))
return false;
if (this.shardIdForHost != that.shardIdForHost)
return false;
}
boolean this_present_executionForHost = true && this.isSetExecutionForHost();
boolean that_present_executionForHost = true && that.isSetExecutionForHost();
if (this_present_executionForHost || that_present_executionForHost) {
if (!(this_present_executionForHost && that_present_executionForHost))
return false;
if (!this.executionForHost.equals(that.executionForHost))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy