com.uber.cadence.PollForActivityTaskResponse 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 PollForActivityTaskResponse 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("PollForActivityTaskResponse");
private static final org.apache.thrift.protocol.TField TASK_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("taskToken", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecution", org.apache.thrift.protocol.TType.STRUCT, (short)20);
private static final org.apache.thrift.protocol.TField ACTIVITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("activityId", org.apache.thrift.protocol.TType.STRING, (short)30);
private static final org.apache.thrift.protocol.TField ACTIVITY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("activityType", org.apache.thrift.protocol.TType.STRUCT, (short)40);
private static final org.apache.thrift.protocol.TField INPUT_FIELD_DESC = new org.apache.thrift.protocol.TField("input", org.apache.thrift.protocol.TType.STRING, (short)50);
private static final org.apache.thrift.protocol.TField SCHEDULED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("scheduledTimestamp", org.apache.thrift.protocol.TType.I64, (short)70);
private static final org.apache.thrift.protocol.TField SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("scheduleToCloseTimeoutSeconds", org.apache.thrift.protocol.TType.I32, (short)80);
private static final org.apache.thrift.protocol.TField STARTED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("startedTimestamp", org.apache.thrift.protocol.TType.I64, (short)90);
private static final org.apache.thrift.protocol.TField START_TO_CLOSE_TIMEOUT_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("startToCloseTimeoutSeconds", org.apache.thrift.protocol.TType.I32, (short)100);
private static final org.apache.thrift.protocol.TField HEARTBEAT_TIMEOUT_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatTimeoutSeconds", org.apache.thrift.protocol.TType.I32, (short)110);
private static final org.apache.thrift.protocol.TField ATTEMPT_FIELD_DESC = new org.apache.thrift.protocol.TField("attempt", org.apache.thrift.protocol.TType.I32, (short)120);
private static final org.apache.thrift.protocol.TField SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT_FIELD_DESC = new org.apache.thrift.protocol.TField("scheduledTimestampOfThisAttempt", org.apache.thrift.protocol.TType.I64, (short)130);
private static final org.apache.thrift.protocol.TField HEARTBEAT_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatDetails", org.apache.thrift.protocol.TType.STRING, (short)140);
private static final org.apache.thrift.protocol.TField WORKFLOW_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowType", org.apache.thrift.protocol.TType.STRUCT, (short)150);
private static final org.apache.thrift.protocol.TField WORKFLOW_DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowDomain", org.apache.thrift.protocol.TType.STRING, (short)160);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new PollForActivityTaskResponseStandardSchemeFactory());
schemes.put(TupleScheme.class, new PollForActivityTaskResponseTupleSchemeFactory());
}
public ByteBuffer taskToken; // optional
public WorkflowExecution workflowExecution; // optional
public String activityId; // optional
public ActivityType activityType; // optional
public ByteBuffer input; // optional
public long scheduledTimestamp; // optional
public int scheduleToCloseTimeoutSeconds; // optional
public long startedTimestamp; // optional
public int startToCloseTimeoutSeconds; // optional
public int heartbeatTimeoutSeconds; // optional
public int attempt; // optional
public long scheduledTimestampOfThisAttempt; // optional
public ByteBuffer heartbeatDetails; // optional
public WorkflowType workflowType; // optional
public String workflowDomain; // 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 {
TASK_TOKEN((short)10, "taskToken"),
WORKFLOW_EXECUTION((short)20, "workflowExecution"),
ACTIVITY_ID((short)30, "activityId"),
ACTIVITY_TYPE((short)40, "activityType"),
INPUT((short)50, "input"),
SCHEDULED_TIMESTAMP((short)70, "scheduledTimestamp"),
SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS((short)80, "scheduleToCloseTimeoutSeconds"),
STARTED_TIMESTAMP((short)90, "startedTimestamp"),
START_TO_CLOSE_TIMEOUT_SECONDS((short)100, "startToCloseTimeoutSeconds"),
HEARTBEAT_TIMEOUT_SECONDS((short)110, "heartbeatTimeoutSeconds"),
ATTEMPT((short)120, "attempt"),
SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT((short)130, "scheduledTimestampOfThisAttempt"),
HEARTBEAT_DETAILS((short)140, "heartbeatDetails"),
WORKFLOW_TYPE((short)150, "workflowType"),
WORKFLOW_DOMAIN((short)160, "workflowDomain");
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: // TASK_TOKEN
return TASK_TOKEN;
case 20: // WORKFLOW_EXECUTION
return WORKFLOW_EXECUTION;
case 30: // ACTIVITY_ID
return ACTIVITY_ID;
case 40: // ACTIVITY_TYPE
return ACTIVITY_TYPE;
case 50: // INPUT
return INPUT;
case 70: // SCHEDULED_TIMESTAMP
return SCHEDULED_TIMESTAMP;
case 80: // SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS
return SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS;
case 90: // STARTED_TIMESTAMP
return STARTED_TIMESTAMP;
case 100: // START_TO_CLOSE_TIMEOUT_SECONDS
return START_TO_CLOSE_TIMEOUT_SECONDS;
case 110: // HEARTBEAT_TIMEOUT_SECONDS
return HEARTBEAT_TIMEOUT_SECONDS;
case 120: // ATTEMPT
return ATTEMPT;
case 130: // SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT
return SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT;
case 140: // HEARTBEAT_DETAILS
return HEARTBEAT_DETAILS;
case 150: // WORKFLOW_TYPE
return WORKFLOW_TYPE;
case 160: // WORKFLOW_DOMAIN
return WORKFLOW_DOMAIN;
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 __SCHEDULEDTIMESTAMP_ISSET_ID = 0;
private static final int __SCHEDULETOCLOSETIMEOUTSECONDS_ISSET_ID = 1;
private static final int __STARTEDTIMESTAMP_ISSET_ID = 2;
private static final int __STARTTOCLOSETIMEOUTSECONDS_ISSET_ID = 3;
private static final int __HEARTBEATTIMEOUTSECONDS_ISSET_ID = 4;
private static final int __ATTEMPT_ISSET_ID = 5;
private static final int __SCHEDULEDTIMESTAMPOFTHISATTEMPT_ISSET_ID = 6;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TASK_TOKEN,_Fields.WORKFLOW_EXECUTION,_Fields.ACTIVITY_ID,_Fields.ACTIVITY_TYPE,_Fields.INPUT,_Fields.SCHEDULED_TIMESTAMP,_Fields.SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS,_Fields.STARTED_TIMESTAMP,_Fields.START_TO_CLOSE_TIMEOUT_SECONDS,_Fields.HEARTBEAT_TIMEOUT_SECONDS,_Fields.ATTEMPT,_Fields.SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT,_Fields.HEARTBEAT_DETAILS,_Fields.WORKFLOW_TYPE,_Fields.WORKFLOW_DOMAIN};
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.TASK_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("taskToken", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.WORKFLOW_EXECUTION, new org.apache.thrift.meta_data.FieldMetaData("workflowExecution", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowExecution.class)));
tmpMap.put(_Fields.ACTIVITY_ID, new org.apache.thrift.meta_data.FieldMetaData("activityId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ACTIVITY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("activityType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActivityType.class)));
tmpMap.put(_Fields.INPUT, new org.apache.thrift.meta_data.FieldMetaData("input", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.SCHEDULED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("scheduledTimestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("scheduleToCloseTimeoutSeconds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.STARTED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("startedTimestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.START_TO_CLOSE_TIMEOUT_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("startToCloseTimeoutSeconds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.HEARTBEAT_TIMEOUT_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("heartbeatTimeoutSeconds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.ATTEMPT, new org.apache.thrift.meta_data.FieldMetaData("attempt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT, new org.apache.thrift.meta_data.FieldMetaData("scheduledTimestampOfThisAttempt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.HEARTBEAT_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("heartbeatDetails", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.WORKFLOW_TYPE, new org.apache.thrift.meta_data.FieldMetaData("workflowType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowType.class)));
tmpMap.put(_Fields.WORKFLOW_DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("workflowDomain", 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(PollForActivityTaskResponse.class, metaDataMap);
}
public PollForActivityTaskResponse() {
}
/**
* Performs a deep copy on other.
*/
public PollForActivityTaskResponse(PollForActivityTaskResponse other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTaskToken()) {
this.taskToken = org.apache.thrift.TBaseHelper.copyBinary(other.taskToken);
}
if (other.isSetWorkflowExecution()) {
this.workflowExecution = new WorkflowExecution(other.workflowExecution);
}
if (other.isSetActivityId()) {
this.activityId = other.activityId;
}
if (other.isSetActivityType()) {
this.activityType = new ActivityType(other.activityType);
}
if (other.isSetInput()) {
this.input = org.apache.thrift.TBaseHelper.copyBinary(other.input);
}
this.scheduledTimestamp = other.scheduledTimestamp;
this.scheduleToCloseTimeoutSeconds = other.scheduleToCloseTimeoutSeconds;
this.startedTimestamp = other.startedTimestamp;
this.startToCloseTimeoutSeconds = other.startToCloseTimeoutSeconds;
this.heartbeatTimeoutSeconds = other.heartbeatTimeoutSeconds;
this.attempt = other.attempt;
this.scheduledTimestampOfThisAttempt = other.scheduledTimestampOfThisAttempt;
if (other.isSetHeartbeatDetails()) {
this.heartbeatDetails = org.apache.thrift.TBaseHelper.copyBinary(other.heartbeatDetails);
}
if (other.isSetWorkflowType()) {
this.workflowType = new WorkflowType(other.workflowType);
}
if (other.isSetWorkflowDomain()) {
this.workflowDomain = other.workflowDomain;
}
}
public PollForActivityTaskResponse deepCopy() {
return new PollForActivityTaskResponse(this);
}
@Override
public void clear() {
this.taskToken = null;
this.workflowExecution = null;
this.activityId = null;
this.activityType = null;
this.input = null;
setScheduledTimestampIsSet(false);
this.scheduledTimestamp = 0;
setScheduleToCloseTimeoutSecondsIsSet(false);
this.scheduleToCloseTimeoutSeconds = 0;
setStartedTimestampIsSet(false);
this.startedTimestamp = 0;
setStartToCloseTimeoutSecondsIsSet(false);
this.startToCloseTimeoutSeconds = 0;
setHeartbeatTimeoutSecondsIsSet(false);
this.heartbeatTimeoutSeconds = 0;
setAttemptIsSet(false);
this.attempt = 0;
setScheduledTimestampOfThisAttemptIsSet(false);
this.scheduledTimestampOfThisAttempt = 0;
this.heartbeatDetails = null;
this.workflowType = null;
this.workflowDomain = null;
}
public byte[] getTaskToken() {
setTaskToken(org.apache.thrift.TBaseHelper.rightSize(taskToken));
return taskToken == null ? null : taskToken.array();
}
public ByteBuffer bufferForTaskToken() {
return org.apache.thrift.TBaseHelper.copyBinary(taskToken);
}
public PollForActivityTaskResponse setTaskToken(byte[] taskToken) {
this.taskToken = taskToken == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(taskToken, taskToken.length));
return this;
}
public PollForActivityTaskResponse setTaskToken(ByteBuffer taskToken) {
this.taskToken = org.apache.thrift.TBaseHelper.copyBinary(taskToken);
return this;
}
public void unsetTaskToken() {
this.taskToken = null;
}
/** Returns true if field taskToken is set (has been assigned a value) and false otherwise */
public boolean isSetTaskToken() {
return this.taskToken != null;
}
public void setTaskTokenIsSet(boolean value) {
if (!value) {
this.taskToken = null;
}
}
public WorkflowExecution getWorkflowExecution() {
return this.workflowExecution;
}
public PollForActivityTaskResponse setWorkflowExecution(WorkflowExecution workflowExecution) {
this.workflowExecution = workflowExecution;
return this;
}
public void unsetWorkflowExecution() {
this.workflowExecution = null;
}
/** Returns true if field workflowExecution is set (has been assigned a value) and false otherwise */
public boolean isSetWorkflowExecution() {
return this.workflowExecution != null;
}
public void setWorkflowExecutionIsSet(boolean value) {
if (!value) {
this.workflowExecution = null;
}
}
public String getActivityId() {
return this.activityId;
}
public PollForActivityTaskResponse setActivityId(String activityId) {
this.activityId = activityId;
return this;
}
public void unsetActivityId() {
this.activityId = null;
}
/** Returns true if field activityId is set (has been assigned a value) and false otherwise */
public boolean isSetActivityId() {
return this.activityId != null;
}
public void setActivityIdIsSet(boolean value) {
if (!value) {
this.activityId = null;
}
}
public ActivityType getActivityType() {
return this.activityType;
}
public PollForActivityTaskResponse setActivityType(ActivityType activityType) {
this.activityType = activityType;
return this;
}
public void unsetActivityType() {
this.activityType = null;
}
/** Returns true if field activityType is set (has been assigned a value) and false otherwise */
public boolean isSetActivityType() {
return this.activityType != null;
}
public void setActivityTypeIsSet(boolean value) {
if (!value) {
this.activityType = null;
}
}
public byte[] getInput() {
setInput(org.apache.thrift.TBaseHelper.rightSize(input));
return input == null ? null : input.array();
}
public ByteBuffer bufferForInput() {
return org.apache.thrift.TBaseHelper.copyBinary(input);
}
public PollForActivityTaskResponse setInput(byte[] input) {
this.input = input == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(input, input.length));
return this;
}
public PollForActivityTaskResponse setInput(ByteBuffer input) {
this.input = org.apache.thrift.TBaseHelper.copyBinary(input);
return this;
}
public void unsetInput() {
this.input = null;
}
/** Returns true if field input is set (has been assigned a value) and false otherwise */
public boolean isSetInput() {
return this.input != null;
}
public void setInputIsSet(boolean value) {
if (!value) {
this.input = null;
}
}
public long getScheduledTimestamp() {
return this.scheduledTimestamp;
}
public PollForActivityTaskResponse setScheduledTimestamp(long scheduledTimestamp) {
this.scheduledTimestamp = scheduledTimestamp;
setScheduledTimestampIsSet(true);
return this;
}
public void unsetScheduledTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCHEDULEDTIMESTAMP_ISSET_ID);
}
/** Returns true if field scheduledTimestamp is set (has been assigned a value) and false otherwise */
public boolean isSetScheduledTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __SCHEDULEDTIMESTAMP_ISSET_ID);
}
public void setScheduledTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCHEDULEDTIMESTAMP_ISSET_ID, value);
}
public int getScheduleToCloseTimeoutSeconds() {
return this.scheduleToCloseTimeoutSeconds;
}
public PollForActivityTaskResponse setScheduleToCloseTimeoutSeconds(int scheduleToCloseTimeoutSeconds) {
this.scheduleToCloseTimeoutSeconds = scheduleToCloseTimeoutSeconds;
setScheduleToCloseTimeoutSecondsIsSet(true);
return this;
}
public void unsetScheduleToCloseTimeoutSeconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCHEDULETOCLOSETIMEOUTSECONDS_ISSET_ID);
}
/** Returns true if field scheduleToCloseTimeoutSeconds is set (has been assigned a value) and false otherwise */
public boolean isSetScheduleToCloseTimeoutSeconds() {
return EncodingUtils.testBit(__isset_bitfield, __SCHEDULETOCLOSETIMEOUTSECONDS_ISSET_ID);
}
public void setScheduleToCloseTimeoutSecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCHEDULETOCLOSETIMEOUTSECONDS_ISSET_ID, value);
}
public long getStartedTimestamp() {
return this.startedTimestamp;
}
public PollForActivityTaskResponse setStartedTimestamp(long startedTimestamp) {
this.startedTimestamp = startedTimestamp;
setStartedTimestampIsSet(true);
return this;
}
public void unsetStartedTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTEDTIMESTAMP_ISSET_ID);
}
/** Returns true if field startedTimestamp is set (has been assigned a value) and false otherwise */
public boolean isSetStartedTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __STARTEDTIMESTAMP_ISSET_ID);
}
public void setStartedTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTEDTIMESTAMP_ISSET_ID, value);
}
public int getStartToCloseTimeoutSeconds() {
return this.startToCloseTimeoutSeconds;
}
public PollForActivityTaskResponse setStartToCloseTimeoutSeconds(int startToCloseTimeoutSeconds) {
this.startToCloseTimeoutSeconds = startToCloseTimeoutSeconds;
setStartToCloseTimeoutSecondsIsSet(true);
return this;
}
public void unsetStartToCloseTimeoutSeconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTOCLOSETIMEOUTSECONDS_ISSET_ID);
}
/** Returns true if field startToCloseTimeoutSeconds is set (has been assigned a value) and false otherwise */
public boolean isSetStartToCloseTimeoutSeconds() {
return EncodingUtils.testBit(__isset_bitfield, __STARTTOCLOSETIMEOUTSECONDS_ISSET_ID);
}
public void setStartToCloseTimeoutSecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTOCLOSETIMEOUTSECONDS_ISSET_ID, value);
}
public int getHeartbeatTimeoutSeconds() {
return this.heartbeatTimeoutSeconds;
}
public PollForActivityTaskResponse setHeartbeatTimeoutSeconds(int heartbeatTimeoutSeconds) {
this.heartbeatTimeoutSeconds = heartbeatTimeoutSeconds;
setHeartbeatTimeoutSecondsIsSet(true);
return this;
}
public void unsetHeartbeatTimeoutSeconds() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATTIMEOUTSECONDS_ISSET_ID);
}
/** Returns true if field heartbeatTimeoutSeconds is set (has been assigned a value) and false otherwise */
public boolean isSetHeartbeatTimeoutSeconds() {
return EncodingUtils.testBit(__isset_bitfield, __HEARTBEATTIMEOUTSECONDS_ISSET_ID);
}
public void setHeartbeatTimeoutSecondsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEARTBEATTIMEOUTSECONDS_ISSET_ID, value);
}
public int getAttempt() {
return this.attempt;
}
public PollForActivityTaskResponse setAttempt(int attempt) {
this.attempt = attempt;
setAttemptIsSet(true);
return this;
}
public void unsetAttempt() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ATTEMPT_ISSET_ID);
}
/** Returns true if field attempt is set (has been assigned a value) and false otherwise */
public boolean isSetAttempt() {
return EncodingUtils.testBit(__isset_bitfield, __ATTEMPT_ISSET_ID);
}
public void setAttemptIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ATTEMPT_ISSET_ID, value);
}
public long getScheduledTimestampOfThisAttempt() {
return this.scheduledTimestampOfThisAttempt;
}
public PollForActivityTaskResponse setScheduledTimestampOfThisAttempt(long scheduledTimestampOfThisAttempt) {
this.scheduledTimestampOfThisAttempt = scheduledTimestampOfThisAttempt;
setScheduledTimestampOfThisAttemptIsSet(true);
return this;
}
public void unsetScheduledTimestampOfThisAttempt() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCHEDULEDTIMESTAMPOFTHISATTEMPT_ISSET_ID);
}
/** Returns true if field scheduledTimestampOfThisAttempt is set (has been assigned a value) and false otherwise */
public boolean isSetScheduledTimestampOfThisAttempt() {
return EncodingUtils.testBit(__isset_bitfield, __SCHEDULEDTIMESTAMPOFTHISATTEMPT_ISSET_ID);
}
public void setScheduledTimestampOfThisAttemptIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCHEDULEDTIMESTAMPOFTHISATTEMPT_ISSET_ID, value);
}
public byte[] getHeartbeatDetails() {
setHeartbeatDetails(org.apache.thrift.TBaseHelper.rightSize(heartbeatDetails));
return heartbeatDetails == null ? null : heartbeatDetails.array();
}
public ByteBuffer bufferForHeartbeatDetails() {
return org.apache.thrift.TBaseHelper.copyBinary(heartbeatDetails);
}
public PollForActivityTaskResponse setHeartbeatDetails(byte[] heartbeatDetails) {
this.heartbeatDetails = heartbeatDetails == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(heartbeatDetails, heartbeatDetails.length));
return this;
}
public PollForActivityTaskResponse setHeartbeatDetails(ByteBuffer heartbeatDetails) {
this.heartbeatDetails = org.apache.thrift.TBaseHelper.copyBinary(heartbeatDetails);
return this;
}
public void unsetHeartbeatDetails() {
this.heartbeatDetails = null;
}
/** Returns true if field heartbeatDetails is set (has been assigned a value) and false otherwise */
public boolean isSetHeartbeatDetails() {
return this.heartbeatDetails != null;
}
public void setHeartbeatDetailsIsSet(boolean value) {
if (!value) {
this.heartbeatDetails = null;
}
}
public WorkflowType getWorkflowType() {
return this.workflowType;
}
public PollForActivityTaskResponse setWorkflowType(WorkflowType workflowType) {
this.workflowType = workflowType;
return this;
}
public void unsetWorkflowType() {
this.workflowType = null;
}
/** Returns true if field workflowType is set (has been assigned a value) and false otherwise */
public boolean isSetWorkflowType() {
return this.workflowType != null;
}
public void setWorkflowTypeIsSet(boolean value) {
if (!value) {
this.workflowType = null;
}
}
public String getWorkflowDomain() {
return this.workflowDomain;
}
public PollForActivityTaskResponse setWorkflowDomain(String workflowDomain) {
this.workflowDomain = workflowDomain;
return this;
}
public void unsetWorkflowDomain() {
this.workflowDomain = null;
}
/** Returns true if field workflowDomain is set (has been assigned a value) and false otherwise */
public boolean isSetWorkflowDomain() {
return this.workflowDomain != null;
}
public void setWorkflowDomainIsSet(boolean value) {
if (!value) {
this.workflowDomain = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case TASK_TOKEN:
if (value == null) {
unsetTaskToken();
} else {
setTaskToken((ByteBuffer)value);
}
break;
case WORKFLOW_EXECUTION:
if (value == null) {
unsetWorkflowExecution();
} else {
setWorkflowExecution((WorkflowExecution)value);
}
break;
case ACTIVITY_ID:
if (value == null) {
unsetActivityId();
} else {
setActivityId((String)value);
}
break;
case ACTIVITY_TYPE:
if (value == null) {
unsetActivityType();
} else {
setActivityType((ActivityType)value);
}
break;
case INPUT:
if (value == null) {
unsetInput();
} else {
setInput((ByteBuffer)value);
}
break;
case SCHEDULED_TIMESTAMP:
if (value == null) {
unsetScheduledTimestamp();
} else {
setScheduledTimestamp((Long)value);
}
break;
case SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS:
if (value == null) {
unsetScheduleToCloseTimeoutSeconds();
} else {
setScheduleToCloseTimeoutSeconds((Integer)value);
}
break;
case STARTED_TIMESTAMP:
if (value == null) {
unsetStartedTimestamp();
} else {
setStartedTimestamp((Long)value);
}
break;
case START_TO_CLOSE_TIMEOUT_SECONDS:
if (value == null) {
unsetStartToCloseTimeoutSeconds();
} else {
setStartToCloseTimeoutSeconds((Integer)value);
}
break;
case HEARTBEAT_TIMEOUT_SECONDS:
if (value == null) {
unsetHeartbeatTimeoutSeconds();
} else {
setHeartbeatTimeoutSeconds((Integer)value);
}
break;
case ATTEMPT:
if (value == null) {
unsetAttempt();
} else {
setAttempt((Integer)value);
}
break;
case SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT:
if (value == null) {
unsetScheduledTimestampOfThisAttempt();
} else {
setScheduledTimestampOfThisAttempt((Long)value);
}
break;
case HEARTBEAT_DETAILS:
if (value == null) {
unsetHeartbeatDetails();
} else {
setHeartbeatDetails((ByteBuffer)value);
}
break;
case WORKFLOW_TYPE:
if (value == null) {
unsetWorkflowType();
} else {
setWorkflowType((WorkflowType)value);
}
break;
case WORKFLOW_DOMAIN:
if (value == null) {
unsetWorkflowDomain();
} else {
setWorkflowDomain((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case TASK_TOKEN:
return getTaskToken();
case WORKFLOW_EXECUTION:
return getWorkflowExecution();
case ACTIVITY_ID:
return getActivityId();
case ACTIVITY_TYPE:
return getActivityType();
case INPUT:
return getInput();
case SCHEDULED_TIMESTAMP:
return getScheduledTimestamp();
case SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS:
return getScheduleToCloseTimeoutSeconds();
case STARTED_TIMESTAMP:
return getStartedTimestamp();
case START_TO_CLOSE_TIMEOUT_SECONDS:
return getStartToCloseTimeoutSeconds();
case HEARTBEAT_TIMEOUT_SECONDS:
return getHeartbeatTimeoutSeconds();
case ATTEMPT:
return getAttempt();
case SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT:
return getScheduledTimestampOfThisAttempt();
case HEARTBEAT_DETAILS:
return getHeartbeatDetails();
case WORKFLOW_TYPE:
return getWorkflowType();
case WORKFLOW_DOMAIN:
return getWorkflowDomain();
}
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 TASK_TOKEN:
return isSetTaskToken();
case WORKFLOW_EXECUTION:
return isSetWorkflowExecution();
case ACTIVITY_ID:
return isSetActivityId();
case ACTIVITY_TYPE:
return isSetActivityType();
case INPUT:
return isSetInput();
case SCHEDULED_TIMESTAMP:
return isSetScheduledTimestamp();
case SCHEDULE_TO_CLOSE_TIMEOUT_SECONDS:
return isSetScheduleToCloseTimeoutSeconds();
case STARTED_TIMESTAMP:
return isSetStartedTimestamp();
case START_TO_CLOSE_TIMEOUT_SECONDS:
return isSetStartToCloseTimeoutSeconds();
case HEARTBEAT_TIMEOUT_SECONDS:
return isSetHeartbeatTimeoutSeconds();
case ATTEMPT:
return isSetAttempt();
case SCHEDULED_TIMESTAMP_OF_THIS_ATTEMPT:
return isSetScheduledTimestampOfThisAttempt();
case HEARTBEAT_DETAILS:
return isSetHeartbeatDetails();
case WORKFLOW_TYPE:
return isSetWorkflowType();
case WORKFLOW_DOMAIN:
return isSetWorkflowDomain();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof PollForActivityTaskResponse)
return this.equals((PollForActivityTaskResponse)that);
return false;
}
public boolean equals(PollForActivityTaskResponse that) {
if (that == null)
return false;
boolean this_present_taskToken = true && this.isSetTaskToken();
boolean that_present_taskToken = true && that.isSetTaskToken();
if (this_present_taskToken || that_present_taskToken) {
if (!(this_present_taskToken && that_present_taskToken))
return false;
if (!this.taskToken.equals(that.taskToken))
return false;
}
boolean this_present_workflowExecution = true && this.isSetWorkflowExecution();
boolean that_present_workflowExecution = true && that.isSetWorkflowExecution();
if (this_present_workflowExecution || that_present_workflowExecution) {
if (!(this_present_workflowExecution && that_present_workflowExecution))
return false;
if (!this.workflowExecution.equals(that.workflowExecution))
return false;
}
boolean this_present_activityId = true && this.isSetActivityId();
boolean that_present_activityId = true && that.isSetActivityId();
if (this_present_activityId || that_present_activityId) {
if (!(this_present_activityId && that_present_activityId))
return false;
if (!this.activityId.equals(that.activityId))
return false;
}
boolean this_present_activityType = true && this.isSetActivityType();
boolean that_present_activityType = true && that.isSetActivityType();
if (this_present_activityType || that_present_activityType) {
if (!(this_present_activityType && that_present_activityType))
return false;
if (!this.activityType.equals(that.activityType))
return false;
}
boolean this_present_input = true && this.isSetInput();
boolean that_present_input = true && that.isSetInput();
if (this_present_input || that_present_input) {
if (!(this_present_input && that_present_input))
return false;
if (!this.input.equals(that.input))
return false;
}
boolean this_present_scheduledTimestamp = true && this.isSetScheduledTimestamp();
boolean that_present_scheduledTimestamp = true && that.isSetScheduledTimestamp();
if (this_present_scheduledTimestamp || that_present_scheduledTimestamp) {
if (!(this_present_scheduledTimestamp && that_present_scheduledTimestamp))
return false;
if (this.scheduledTimestamp != that.scheduledTimestamp)
return false;
}
boolean this_present_scheduleToCloseTimeoutSeconds = true && this.isSetScheduleToCloseTimeoutSeconds();
boolean that_present_scheduleToCloseTimeoutSeconds = true && that.isSetScheduleToCloseTimeoutSeconds();
if (this_present_scheduleToCloseTimeoutSeconds || that_present_scheduleToCloseTimeoutSeconds) {
if (!(this_present_scheduleToCloseTimeoutSeconds && that_present_scheduleToCloseTimeoutSeconds))
return false;
if (this.scheduleToCloseTimeoutSeconds != that.scheduleToCloseTimeoutSeconds)
return false;
}
boolean this_present_startedTimestamp = true && this.isSetStartedTimestamp();
boolean that_present_startedTimestamp = true && that.isSetStartedTimestamp();
if (this_present_startedTimestamp || that_present_startedTimestamp) {
if (!(this_present_startedTimestamp && that_present_startedTimestamp))
return false;
if (this.startedTimestamp != that.startedTimestamp)
return false;
}
boolean this_present_startToCloseTimeoutSeconds = true && this.isSetStartToCloseTimeoutSeconds();
boolean that_present_startToCloseTimeoutSeconds = true && that.isSetStartToCloseTimeoutSeconds();
if (this_present_startToCloseTimeoutSeconds || that_present_startToCloseTimeoutSeconds) {
if (!(this_present_startToCloseTimeoutSeconds && that_present_startToCloseTimeoutSeconds))
return false;
if (this.startToCloseTimeoutSeconds != that.startToCloseTimeoutSeconds)
return false;
}
boolean this_present_heartbeatTimeoutSeconds = true && this.isSetHeartbeatTimeoutSeconds();
boolean that_present_heartbeatTimeoutSeconds = true && that.isSetHeartbeatTimeoutSeconds();
if (this_present_heartbeatTimeoutSeconds || that_present_heartbeatTimeoutSeconds) {
if (!(this_present_heartbeatTimeoutSeconds && that_present_heartbeatTimeoutSeconds))
return false;
if (this.heartbeatTimeoutSeconds != that.heartbeatTimeoutSeconds)
return false;
}
boolean this_present_attempt = true && this.isSetAttempt();
boolean that_present_attempt = true && that.isSetAttempt();
if (this_present_attempt || that_present_attempt) {
if (!(this_present_attempt && that_present_attempt))
return false;
if (this.attempt != that.attempt)
return false;
}
boolean this_present_scheduledTimestampOfThisAttempt = true && this.isSetScheduledTimestampOfThisAttempt();
boolean that_present_scheduledTimestampOfThisAttempt = true && that.isSetScheduledTimestampOfThisAttempt();
if (this_present_scheduledTimestampOfThisAttempt || that_present_scheduledTimestampOfThisAttempt) {
if (!(this_present_scheduledTimestampOfThisAttempt && that_present_scheduledTimestampOfThisAttempt))
return false;
if (this.scheduledTimestampOfThisAttempt != that.scheduledTimestampOfThisAttempt)
return false;
}
boolean this_present_heartbeatDetails = true && this.isSetHeartbeatDetails();
boolean that_present_heartbeatDetails = true && that.isSetHeartbeatDetails();
if (this_present_heartbeatDetails || that_present_heartbeatDetails) {
if (!(this_present_heartbeatDetails && that_present_heartbeatDetails))
return false;
if (!this.heartbeatDetails.equals(that.heartbeatDetails))
return false;
}
boolean this_present_workflowType = true && this.isSetWorkflowType();
boolean that_present_workflowType = true && that.isSetWorkflowType();
if (this_present_workflowType || that_present_workflowType) {
if (!(this_present_workflowType && that_present_workflowType))
return false;
if (!this.workflowType.equals(that.workflowType))
return false;
}
boolean this_present_workflowDomain = true && this.isSetWorkflowDomain();
boolean that_present_workflowDomain = true && that.isSetWorkflowDomain();
if (this_present_workflowDomain || that_present_workflowDomain) {
if (!(this_present_workflowDomain && that_present_workflowDomain))
return false;
if (!this.workflowDomain.equals(that.workflowDomain))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy