com.uber.cadence.DescribeTaskListRequest 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 DescribeTaskListRequest 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("DescribeTaskListRequest");
private static final org.apache.thrift.protocol.TField DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("domain", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField TASK_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("taskList", org.apache.thrift.protocol.TType.STRUCT, (short)20);
private static final org.apache.thrift.protocol.TField TASK_LIST_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("taskListType", org.apache.thrift.protocol.TType.I32, (short)30);
private static final org.apache.thrift.protocol.TField INCLUDE_TASK_LIST_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("includeTaskListStatus", org.apache.thrift.protocol.TType.BOOL, (short)40);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new DescribeTaskListRequestStandardSchemeFactory());
schemes.put(TupleScheme.class, new DescribeTaskListRequestTupleSchemeFactory());
}
public String domain; // optional
public TaskList taskList; // optional
public TaskListType taskListType; // optional
public boolean includeTaskListStatus; // 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 {
DOMAIN((short)10, "domain"),
TASK_LIST((short)20, "taskList"),
TASK_LIST_TYPE((short)30, "taskListType"),
INCLUDE_TASK_LIST_STATUS((short)40, "includeTaskListStatus");
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: // DOMAIN
return DOMAIN;
case 20: // TASK_LIST
return TASK_LIST;
case 30: // TASK_LIST_TYPE
return TASK_LIST_TYPE;
case 40: // INCLUDE_TASK_LIST_STATUS
return INCLUDE_TASK_LIST_STATUS;
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 __INCLUDETASKLISTSTATUS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DOMAIN,_Fields.TASK_LIST,_Fields.TASK_LIST_TYPE,_Fields.INCLUDE_TASK_LIST_STATUS};
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.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TASK_LIST, new org.apache.thrift.meta_data.FieldMetaData("taskList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TaskList.class)));
tmpMap.put(_Fields.TASK_LIST_TYPE, new org.apache.thrift.meta_data.FieldMetaData("taskListType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.ENUM , "TaskListType")));
tmpMap.put(_Fields.INCLUDE_TASK_LIST_STATUS, new org.apache.thrift.meta_data.FieldMetaData("includeTaskListStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DescribeTaskListRequest.class, metaDataMap);
}
public DescribeTaskListRequest() {
}
/**
* Performs a deep copy on other.
*/
public DescribeTaskListRequest(DescribeTaskListRequest other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetDomain()) {
this.domain = other.domain;
}
if (other.isSetTaskList()) {
this.taskList = new TaskList(other.taskList);
}
if (other.isSetTaskListType()) {
this.taskListType = other.taskListType;
}
this.includeTaskListStatus = other.includeTaskListStatus;
}
public DescribeTaskListRequest deepCopy() {
return new DescribeTaskListRequest(this);
}
@Override
public void clear() {
this.domain = null;
this.taskList = null;
this.taskListType = null;
setIncludeTaskListStatusIsSet(false);
this.includeTaskListStatus = false;
}
public String getDomain() {
return this.domain;
}
public DescribeTaskListRequest setDomain(String domain) {
this.domain = domain;
return this;
}
public void unsetDomain() {
this.domain = null;
}
/** Returns true if field domain is set (has been assigned a value) and false otherwise */
public boolean isSetDomain() {
return this.domain != null;
}
public void setDomainIsSet(boolean value) {
if (!value) {
this.domain = null;
}
}
public TaskList getTaskList() {
return this.taskList;
}
public DescribeTaskListRequest setTaskList(TaskList taskList) {
this.taskList = taskList;
return this;
}
public void unsetTaskList() {
this.taskList = null;
}
/** Returns true if field taskList is set (has been assigned a value) and false otherwise */
public boolean isSetTaskList() {
return this.taskList != null;
}
public void setTaskListIsSet(boolean value) {
if (!value) {
this.taskList = null;
}
}
public TaskListType getTaskListType() {
return this.taskListType;
}
public DescribeTaskListRequest setTaskListType(TaskListType taskListType) {
this.taskListType = taskListType;
return this;
}
public void unsetTaskListType() {
this.taskListType = null;
}
/** Returns true if field taskListType is set (has been assigned a value) and false otherwise */
public boolean isSetTaskListType() {
return this.taskListType != null;
}
public void setTaskListTypeIsSet(boolean value) {
if (!value) {
this.taskListType = null;
}
}
public boolean isIncludeTaskListStatus() {
return this.includeTaskListStatus;
}
public DescribeTaskListRequest setIncludeTaskListStatus(boolean includeTaskListStatus) {
this.includeTaskListStatus = includeTaskListStatus;
setIncludeTaskListStatusIsSet(true);
return this;
}
public void unsetIncludeTaskListStatus() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INCLUDETASKLISTSTATUS_ISSET_ID);
}
/** Returns true if field includeTaskListStatus is set (has been assigned a value) and false otherwise */
public boolean isSetIncludeTaskListStatus() {
return EncodingUtils.testBit(__isset_bitfield, __INCLUDETASKLISTSTATUS_ISSET_ID);
}
public void setIncludeTaskListStatusIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INCLUDETASKLISTSTATUS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DOMAIN:
if (value == null) {
unsetDomain();
} else {
setDomain((String)value);
}
break;
case TASK_LIST:
if (value == null) {
unsetTaskList();
} else {
setTaskList((TaskList)value);
}
break;
case TASK_LIST_TYPE:
if (value == null) {
unsetTaskListType();
} else {
setTaskListType((TaskListType)value);
}
break;
case INCLUDE_TASK_LIST_STATUS:
if (value == null) {
unsetIncludeTaskListStatus();
} else {
setIncludeTaskListStatus((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DOMAIN:
return getDomain();
case TASK_LIST:
return getTaskList();
case TASK_LIST_TYPE:
return getTaskListType();
case INCLUDE_TASK_LIST_STATUS:
return isIncludeTaskListStatus();
}
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 DOMAIN:
return isSetDomain();
case TASK_LIST:
return isSetTaskList();
case TASK_LIST_TYPE:
return isSetTaskListType();
case INCLUDE_TASK_LIST_STATUS:
return isSetIncludeTaskListStatus();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof DescribeTaskListRequest)
return this.equals((DescribeTaskListRequest)that);
return false;
}
public boolean equals(DescribeTaskListRequest that) {
if (that == null)
return false;
boolean this_present_domain = true && this.isSetDomain();
boolean that_present_domain = true && that.isSetDomain();
if (this_present_domain || that_present_domain) {
if (!(this_present_domain && that_present_domain))
return false;
if (!this.domain.equals(that.domain))
return false;
}
boolean this_present_taskList = true && this.isSetTaskList();
boolean that_present_taskList = true && that.isSetTaskList();
if (this_present_taskList || that_present_taskList) {
if (!(this_present_taskList && that_present_taskList))
return false;
if (!this.taskList.equals(that.taskList))
return false;
}
boolean this_present_taskListType = true && this.isSetTaskListType();
boolean that_present_taskListType = true && that.isSetTaskListType();
if (this_present_taskListType || that_present_taskListType) {
if (!(this_present_taskListType && that_present_taskListType))
return false;
if (!this.taskListType.equals(that.taskListType))
return false;
}
boolean this_present_includeTaskListStatus = true && this.isSetIncludeTaskListStatus();
boolean that_present_includeTaskListStatus = true && that.isSetIncludeTaskListStatus();
if (this_present_includeTaskListStatus || that_present_includeTaskListStatus) {
if (!(this_present_includeTaskListStatus && that_present_includeTaskListStatus))
return false;
if (this.includeTaskListStatus != that.includeTaskListStatus)
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy