com.uber.cadence.DomainConfiguration 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 DomainConfiguration 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("DomainConfiguration");
private static final org.apache.thrift.protocol.TField WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowExecutionRetentionPeriodInDays", org.apache.thrift.protocol.TType.I32, (short)10);
private static final org.apache.thrift.protocol.TField EMIT_METRIC_FIELD_DESC = new org.apache.thrift.protocol.TField("emitMetric", org.apache.thrift.protocol.TType.BOOL, (short)20);
private static final org.apache.thrift.protocol.TField ARCHIVAL_BUCKET_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("archivalBucketName", org.apache.thrift.protocol.TType.STRING, (short)30);
private static final org.apache.thrift.protocol.TField ARCHIVAL_RETENTION_PERIOD_IN_DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("archivalRetentionPeriodInDays", org.apache.thrift.protocol.TType.I32, (short)40);
private static final org.apache.thrift.protocol.TField ARCHIVAL_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("archivalStatus", org.apache.thrift.protocol.TType.I32, (short)50);
private static final org.apache.thrift.protocol.TField ARCHIVAL_BUCKET_OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("archivalBucketOwner", org.apache.thrift.protocol.TType.STRING, (short)60);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new DomainConfigurationStandardSchemeFactory());
schemes.put(TupleScheme.class, new DomainConfigurationTupleSchemeFactory());
}
public int workflowExecutionRetentionPeriodInDays; // optional
public boolean emitMetric; // optional
public String archivalBucketName; // optional
public int archivalRetentionPeriodInDays; // optional
/**
*
* @see ArchivalStatus
*/
public ArchivalStatus archivalStatus; // optional
public String archivalBucketOwner; // 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 {
WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS((short)10, "workflowExecutionRetentionPeriodInDays"),
EMIT_METRIC((short)20, "emitMetric"),
ARCHIVAL_BUCKET_NAME((short)30, "archivalBucketName"),
ARCHIVAL_RETENTION_PERIOD_IN_DAYS((short)40, "archivalRetentionPeriodInDays"),
/**
*
* @see ArchivalStatus
*/
ARCHIVAL_STATUS((short)50, "archivalStatus"),
ARCHIVAL_BUCKET_OWNER((short)60, "archivalBucketOwner");
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: // WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS
return WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS;
case 20: // EMIT_METRIC
return EMIT_METRIC;
case 30: // ARCHIVAL_BUCKET_NAME
return ARCHIVAL_BUCKET_NAME;
case 40: // ARCHIVAL_RETENTION_PERIOD_IN_DAYS
return ARCHIVAL_RETENTION_PERIOD_IN_DAYS;
case 50: // ARCHIVAL_STATUS
return ARCHIVAL_STATUS;
case 60: // ARCHIVAL_BUCKET_OWNER
return ARCHIVAL_BUCKET_OWNER;
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 __WORKFLOWEXECUTIONRETENTIONPERIODINDAYS_ISSET_ID = 0;
private static final int __EMITMETRIC_ISSET_ID = 1;
private static final int __ARCHIVALRETENTIONPERIODINDAYS_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS,_Fields.EMIT_METRIC,_Fields.ARCHIVAL_BUCKET_NAME,_Fields.ARCHIVAL_RETENTION_PERIOD_IN_DAYS,_Fields.ARCHIVAL_STATUS,_Fields.ARCHIVAL_BUCKET_OWNER};
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.WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS, new org.apache.thrift.meta_data.FieldMetaData("workflowExecutionRetentionPeriodInDays", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.EMIT_METRIC, new org.apache.thrift.meta_data.FieldMetaData("emitMetric", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.ARCHIVAL_BUCKET_NAME, new org.apache.thrift.meta_data.FieldMetaData("archivalBucketName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ARCHIVAL_RETENTION_PERIOD_IN_DAYS, new org.apache.thrift.meta_data.FieldMetaData("archivalRetentionPeriodInDays", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.ARCHIVAL_STATUS, new org.apache.thrift.meta_data.FieldMetaData("archivalStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ArchivalStatus.class)));
tmpMap.put(_Fields.ARCHIVAL_BUCKET_OWNER, new org.apache.thrift.meta_data.FieldMetaData("archivalBucketOwner", 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(DomainConfiguration.class, metaDataMap);
}
public DomainConfiguration() {
}
/**
* Performs a deep copy on other.
*/
public DomainConfiguration(DomainConfiguration other) {
__isset_bitfield = other.__isset_bitfield;
this.workflowExecutionRetentionPeriodInDays = other.workflowExecutionRetentionPeriodInDays;
this.emitMetric = other.emitMetric;
if (other.isSetArchivalBucketName()) {
this.archivalBucketName = other.archivalBucketName;
}
this.archivalRetentionPeriodInDays = other.archivalRetentionPeriodInDays;
if (other.isSetArchivalStatus()) {
this.archivalStatus = other.archivalStatus;
}
if (other.isSetArchivalBucketOwner()) {
this.archivalBucketOwner = other.archivalBucketOwner;
}
}
public DomainConfiguration deepCopy() {
return new DomainConfiguration(this);
}
@Override
public void clear() {
setWorkflowExecutionRetentionPeriodInDaysIsSet(false);
this.workflowExecutionRetentionPeriodInDays = 0;
setEmitMetricIsSet(false);
this.emitMetric = false;
this.archivalBucketName = null;
setArchivalRetentionPeriodInDaysIsSet(false);
this.archivalRetentionPeriodInDays = 0;
this.archivalStatus = null;
this.archivalBucketOwner = null;
}
public int getWorkflowExecutionRetentionPeriodInDays() {
return this.workflowExecutionRetentionPeriodInDays;
}
public DomainConfiguration setWorkflowExecutionRetentionPeriodInDays(int workflowExecutionRetentionPeriodInDays) {
this.workflowExecutionRetentionPeriodInDays = workflowExecutionRetentionPeriodInDays;
setWorkflowExecutionRetentionPeriodInDaysIsSet(true);
return this;
}
public void unsetWorkflowExecutionRetentionPeriodInDays() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WORKFLOWEXECUTIONRETENTIONPERIODINDAYS_ISSET_ID);
}
/** Returns true if field workflowExecutionRetentionPeriodInDays is set (has been assigned a value) and false otherwise */
public boolean isSetWorkflowExecutionRetentionPeriodInDays() {
return EncodingUtils.testBit(__isset_bitfield, __WORKFLOWEXECUTIONRETENTIONPERIODINDAYS_ISSET_ID);
}
public void setWorkflowExecutionRetentionPeriodInDaysIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WORKFLOWEXECUTIONRETENTIONPERIODINDAYS_ISSET_ID, value);
}
public boolean isEmitMetric() {
return this.emitMetric;
}
public DomainConfiguration setEmitMetric(boolean emitMetric) {
this.emitMetric = emitMetric;
setEmitMetricIsSet(true);
return this;
}
public void unsetEmitMetric() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EMITMETRIC_ISSET_ID);
}
/** Returns true if field emitMetric is set (has been assigned a value) and false otherwise */
public boolean isSetEmitMetric() {
return EncodingUtils.testBit(__isset_bitfield, __EMITMETRIC_ISSET_ID);
}
public void setEmitMetricIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EMITMETRIC_ISSET_ID, value);
}
public String getArchivalBucketName() {
return this.archivalBucketName;
}
public DomainConfiguration setArchivalBucketName(String archivalBucketName) {
this.archivalBucketName = archivalBucketName;
return this;
}
public void unsetArchivalBucketName() {
this.archivalBucketName = null;
}
/** Returns true if field archivalBucketName is set (has been assigned a value) and false otherwise */
public boolean isSetArchivalBucketName() {
return this.archivalBucketName != null;
}
public void setArchivalBucketNameIsSet(boolean value) {
if (!value) {
this.archivalBucketName = null;
}
}
public int getArchivalRetentionPeriodInDays() {
return this.archivalRetentionPeriodInDays;
}
public DomainConfiguration setArchivalRetentionPeriodInDays(int archivalRetentionPeriodInDays) {
this.archivalRetentionPeriodInDays = archivalRetentionPeriodInDays;
setArchivalRetentionPeriodInDaysIsSet(true);
return this;
}
public void unsetArchivalRetentionPeriodInDays() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ARCHIVALRETENTIONPERIODINDAYS_ISSET_ID);
}
/** Returns true if field archivalRetentionPeriodInDays is set (has been assigned a value) and false otherwise */
public boolean isSetArchivalRetentionPeriodInDays() {
return EncodingUtils.testBit(__isset_bitfield, __ARCHIVALRETENTIONPERIODINDAYS_ISSET_ID);
}
public void setArchivalRetentionPeriodInDaysIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ARCHIVALRETENTIONPERIODINDAYS_ISSET_ID, value);
}
/**
*
* @see ArchivalStatus
*/
public ArchivalStatus getArchivalStatus() {
return this.archivalStatus;
}
/**
*
* @see ArchivalStatus
*/
public DomainConfiguration setArchivalStatus(ArchivalStatus archivalStatus) {
this.archivalStatus = archivalStatus;
return this;
}
public void unsetArchivalStatus() {
this.archivalStatus = null;
}
/** Returns true if field archivalStatus is set (has been assigned a value) and false otherwise */
public boolean isSetArchivalStatus() {
return this.archivalStatus != null;
}
public void setArchivalStatusIsSet(boolean value) {
if (!value) {
this.archivalStatus = null;
}
}
public String getArchivalBucketOwner() {
return this.archivalBucketOwner;
}
public DomainConfiguration setArchivalBucketOwner(String archivalBucketOwner) {
this.archivalBucketOwner = archivalBucketOwner;
return this;
}
public void unsetArchivalBucketOwner() {
this.archivalBucketOwner = null;
}
/** Returns true if field archivalBucketOwner is set (has been assigned a value) and false otherwise */
public boolean isSetArchivalBucketOwner() {
return this.archivalBucketOwner != null;
}
public void setArchivalBucketOwnerIsSet(boolean value) {
if (!value) {
this.archivalBucketOwner = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS:
if (value == null) {
unsetWorkflowExecutionRetentionPeriodInDays();
} else {
setWorkflowExecutionRetentionPeriodInDays((Integer)value);
}
break;
case EMIT_METRIC:
if (value == null) {
unsetEmitMetric();
} else {
setEmitMetric((Boolean)value);
}
break;
case ARCHIVAL_BUCKET_NAME:
if (value == null) {
unsetArchivalBucketName();
} else {
setArchivalBucketName((String)value);
}
break;
case ARCHIVAL_RETENTION_PERIOD_IN_DAYS:
if (value == null) {
unsetArchivalRetentionPeriodInDays();
} else {
setArchivalRetentionPeriodInDays((Integer)value);
}
break;
case ARCHIVAL_STATUS:
if (value == null) {
unsetArchivalStatus();
} else {
setArchivalStatus((ArchivalStatus)value);
}
break;
case ARCHIVAL_BUCKET_OWNER:
if (value == null) {
unsetArchivalBucketOwner();
} else {
setArchivalBucketOwner((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS:
return getWorkflowExecutionRetentionPeriodInDays();
case EMIT_METRIC:
return isEmitMetric();
case ARCHIVAL_BUCKET_NAME:
return getArchivalBucketName();
case ARCHIVAL_RETENTION_PERIOD_IN_DAYS:
return getArchivalRetentionPeriodInDays();
case ARCHIVAL_STATUS:
return getArchivalStatus();
case ARCHIVAL_BUCKET_OWNER:
return getArchivalBucketOwner();
}
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 WORKFLOW_EXECUTION_RETENTION_PERIOD_IN_DAYS:
return isSetWorkflowExecutionRetentionPeriodInDays();
case EMIT_METRIC:
return isSetEmitMetric();
case ARCHIVAL_BUCKET_NAME:
return isSetArchivalBucketName();
case ARCHIVAL_RETENTION_PERIOD_IN_DAYS:
return isSetArchivalRetentionPeriodInDays();
case ARCHIVAL_STATUS:
return isSetArchivalStatus();
case ARCHIVAL_BUCKET_OWNER:
return isSetArchivalBucketOwner();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof DomainConfiguration)
return this.equals((DomainConfiguration)that);
return false;
}
public boolean equals(DomainConfiguration that) {
if (that == null)
return false;
boolean this_present_workflowExecutionRetentionPeriodInDays = true && this.isSetWorkflowExecutionRetentionPeriodInDays();
boolean that_present_workflowExecutionRetentionPeriodInDays = true && that.isSetWorkflowExecutionRetentionPeriodInDays();
if (this_present_workflowExecutionRetentionPeriodInDays || that_present_workflowExecutionRetentionPeriodInDays) {
if (!(this_present_workflowExecutionRetentionPeriodInDays && that_present_workflowExecutionRetentionPeriodInDays))
return false;
if (this.workflowExecutionRetentionPeriodInDays != that.workflowExecutionRetentionPeriodInDays)
return false;
}
boolean this_present_emitMetric = true && this.isSetEmitMetric();
boolean that_present_emitMetric = true && that.isSetEmitMetric();
if (this_present_emitMetric || that_present_emitMetric) {
if (!(this_present_emitMetric && that_present_emitMetric))
return false;
if (this.emitMetric != that.emitMetric)
return false;
}
boolean this_present_archivalBucketName = true && this.isSetArchivalBucketName();
boolean that_present_archivalBucketName = true && that.isSetArchivalBucketName();
if (this_present_archivalBucketName || that_present_archivalBucketName) {
if (!(this_present_archivalBucketName && that_present_archivalBucketName))
return false;
if (!this.archivalBucketName.equals(that.archivalBucketName))
return false;
}
boolean this_present_archivalRetentionPeriodInDays = true && this.isSetArchivalRetentionPeriodInDays();
boolean that_present_archivalRetentionPeriodInDays = true && that.isSetArchivalRetentionPeriodInDays();
if (this_present_archivalRetentionPeriodInDays || that_present_archivalRetentionPeriodInDays) {
if (!(this_present_archivalRetentionPeriodInDays && that_present_archivalRetentionPeriodInDays))
return false;
if (this.archivalRetentionPeriodInDays != that.archivalRetentionPeriodInDays)
return false;
}
boolean this_present_archivalStatus = true && this.isSetArchivalStatus();
boolean that_present_archivalStatus = true && that.isSetArchivalStatus();
if (this_present_archivalStatus || that_present_archivalStatus) {
if (!(this_present_archivalStatus && that_present_archivalStatus))
return false;
if (!this.archivalStatus.equals(that.archivalStatus))
return false;
}
boolean this_present_archivalBucketOwner = true && this.isSetArchivalBucketOwner();
boolean that_present_archivalBucketOwner = true && that.isSetArchivalBucketOwner();
if (this_present_archivalBucketOwner || that_present_archivalBucketOwner) {
if (!(this_present_archivalBucketOwner && that_present_archivalBucketOwner))
return false;
if (!this.archivalBucketOwner.equals(that.archivalBucketOwner))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy