com.uber.cadence.GetWorkflowExecutionHistoryResponse 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 GetWorkflowExecutionHistoryResponse 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("GetWorkflowExecutionHistoryResponse");
private static final org.apache.thrift.protocol.TField HISTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("history", org.apache.thrift.protocol.TType.STRUCT, (short)10);
private static final org.apache.thrift.protocol.TField NEXT_PAGE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("nextPageToken", org.apache.thrift.protocol.TType.STRING, (short)20);
private static final org.apache.thrift.protocol.TField ARCHIVED_FIELD_DESC = new org.apache.thrift.protocol.TField("archived", org.apache.thrift.protocol.TType.BOOL, (short)30);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new GetWorkflowExecutionHistoryResponseStandardSchemeFactory());
schemes.put(TupleScheme.class, new GetWorkflowExecutionHistoryResponseTupleSchemeFactory());
}
public History history; // optional
public ByteBuffer nextPageToken; // optional
public boolean archived; // 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 {
HISTORY((short)10, "history"),
NEXT_PAGE_TOKEN((short)20, "nextPageToken"),
ARCHIVED((short)30, "archived");
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: // HISTORY
return HISTORY;
case 20: // NEXT_PAGE_TOKEN
return NEXT_PAGE_TOKEN;
case 30: // ARCHIVED
return ARCHIVED;
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 __ARCHIVED_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.HISTORY,_Fields.NEXT_PAGE_TOKEN,_Fields.ARCHIVED};
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.HISTORY, new org.apache.thrift.meta_data.FieldMetaData("history", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, History.class)));
tmpMap.put(_Fields.NEXT_PAGE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("nextPageToken", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.ARCHIVED, new org.apache.thrift.meta_data.FieldMetaData("archived", 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(GetWorkflowExecutionHistoryResponse.class, metaDataMap);
}
public GetWorkflowExecutionHistoryResponse() {
}
/**
* Performs a deep copy on other.
*/
public GetWorkflowExecutionHistoryResponse(GetWorkflowExecutionHistoryResponse other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetHistory()) {
this.history = new History(other.history);
}
if (other.isSetNextPageToken()) {
this.nextPageToken = org.apache.thrift.TBaseHelper.copyBinary(other.nextPageToken);
}
this.archived = other.archived;
}
public GetWorkflowExecutionHistoryResponse deepCopy() {
return new GetWorkflowExecutionHistoryResponse(this);
}
@Override
public void clear() {
this.history = null;
this.nextPageToken = null;
setArchivedIsSet(false);
this.archived = false;
}
public History getHistory() {
return this.history;
}
public GetWorkflowExecutionHistoryResponse setHistory(History history) {
this.history = history;
return this;
}
public void unsetHistory() {
this.history = null;
}
/** Returns true if field history is set (has been assigned a value) and false otherwise */
public boolean isSetHistory() {
return this.history != null;
}
public void setHistoryIsSet(boolean value) {
if (!value) {
this.history = null;
}
}
public byte[] getNextPageToken() {
setNextPageToken(org.apache.thrift.TBaseHelper.rightSize(nextPageToken));
return nextPageToken == null ? null : nextPageToken.array();
}
public ByteBuffer bufferForNextPageToken() {
return org.apache.thrift.TBaseHelper.copyBinary(nextPageToken);
}
public GetWorkflowExecutionHistoryResponse setNextPageToken(byte[] nextPageToken) {
this.nextPageToken = nextPageToken == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nextPageToken, nextPageToken.length));
return this;
}
public GetWorkflowExecutionHistoryResponse setNextPageToken(ByteBuffer nextPageToken) {
this.nextPageToken = org.apache.thrift.TBaseHelper.copyBinary(nextPageToken);
return this;
}
public void unsetNextPageToken() {
this.nextPageToken = null;
}
/** Returns true if field nextPageToken is set (has been assigned a value) and false otherwise */
public boolean isSetNextPageToken() {
return this.nextPageToken != null;
}
public void setNextPageTokenIsSet(boolean value) {
if (!value) {
this.nextPageToken = null;
}
}
public boolean isArchived() {
return this.archived;
}
public GetWorkflowExecutionHistoryResponse setArchived(boolean archived) {
this.archived = archived;
setArchivedIsSet(true);
return this;
}
public void unsetArchived() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ARCHIVED_ISSET_ID);
}
/** Returns true if field archived is set (has been assigned a value) and false otherwise */
public boolean isSetArchived() {
return EncodingUtils.testBit(__isset_bitfield, __ARCHIVED_ISSET_ID);
}
public void setArchivedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ARCHIVED_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case HISTORY:
if (value == null) {
unsetHistory();
} else {
setHistory((History)value);
}
break;
case NEXT_PAGE_TOKEN:
if (value == null) {
unsetNextPageToken();
} else {
setNextPageToken((ByteBuffer)value);
}
break;
case ARCHIVED:
if (value == null) {
unsetArchived();
} else {
setArchived((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case HISTORY:
return getHistory();
case NEXT_PAGE_TOKEN:
return getNextPageToken();
case ARCHIVED:
return isArchived();
}
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 HISTORY:
return isSetHistory();
case NEXT_PAGE_TOKEN:
return isSetNextPageToken();
case ARCHIVED:
return isSetArchived();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof GetWorkflowExecutionHistoryResponse)
return this.equals((GetWorkflowExecutionHistoryResponse)that);
return false;
}
public boolean equals(GetWorkflowExecutionHistoryResponse that) {
if (that == null)
return false;
boolean this_present_history = true && this.isSetHistory();
boolean that_present_history = true && that.isSetHistory();
if (this_present_history || that_present_history) {
if (!(this_present_history && that_present_history))
return false;
if (!this.history.equals(that.history))
return false;
}
boolean this_present_nextPageToken = true && this.isSetNextPageToken();
boolean that_present_nextPageToken = true && that.isSetNextPageToken();
if (this_present_nextPageToken || that_present_nextPageToken) {
if (!(this_present_nextPageToken && that_present_nextPageToken))
return false;
if (!this.nextPageToken.equals(that.nextPageToken))
return false;
}
boolean this_present_archived = true && this.isSetArchived();
boolean that_present_archived = true && that.isSetArchived();
if (this_present_archived || that_present_archived) {
if (!(this_present_archived && that_present_archived))
return false;
if (this.archived != that.archived)
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy