com.uber.cadence.UpdateDomainResponse 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 UpdateDomainResponse 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("UpdateDomainResponse");
private static final org.apache.thrift.protocol.TField DOMAIN_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("domainInfo", org.apache.thrift.protocol.TType.STRUCT, (short)10);
private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.STRUCT, (short)20);
private static final org.apache.thrift.protocol.TField REPLICATION_CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("replicationConfiguration", org.apache.thrift.protocol.TType.STRUCT, (short)30);
private static final org.apache.thrift.protocol.TField FAILOVER_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("failoverVersion", org.apache.thrift.protocol.TType.I64, (short)40);
private static final org.apache.thrift.protocol.TField IS_GLOBAL_DOMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("isGlobalDomain", org.apache.thrift.protocol.TType.BOOL, (short)50);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new UpdateDomainResponseStandardSchemeFactory());
schemes.put(TupleScheme.class, new UpdateDomainResponseTupleSchemeFactory());
}
public DomainInfo domainInfo; // optional
public DomainConfiguration configuration; // optional
public DomainReplicationConfiguration replicationConfiguration; // optional
public long failoverVersion; // optional
public boolean isGlobalDomain; // 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_INFO((short)10, "domainInfo"),
CONFIGURATION((short)20, "configuration"),
REPLICATION_CONFIGURATION((short)30, "replicationConfiguration"),
FAILOVER_VERSION((short)40, "failoverVersion"),
IS_GLOBAL_DOMAIN((short)50, "isGlobalDomain");
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_INFO
return DOMAIN_INFO;
case 20: // CONFIGURATION
return CONFIGURATION;
case 30: // REPLICATION_CONFIGURATION
return REPLICATION_CONFIGURATION;
case 40: // FAILOVER_VERSION
return FAILOVER_VERSION;
case 50: // IS_GLOBAL_DOMAIN
return IS_GLOBAL_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 __FAILOVERVERSION_ISSET_ID = 0;
private static final int __ISGLOBALDOMAIN_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DOMAIN_INFO,_Fields.CONFIGURATION,_Fields.REPLICATION_CONFIGURATION,_Fields.FAILOVER_VERSION,_Fields.IS_GLOBAL_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.DOMAIN_INFO, new org.apache.thrift.meta_data.FieldMetaData("domainInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DomainInfo.class)));
tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DomainConfiguration.class)));
tmpMap.put(_Fields.REPLICATION_CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("replicationConfiguration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DomainReplicationConfiguration.class)));
tmpMap.put(_Fields.FAILOVER_VERSION, new org.apache.thrift.meta_data.FieldMetaData("failoverVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.IS_GLOBAL_DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("isGlobalDomain", 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(UpdateDomainResponse.class, metaDataMap);
}
public UpdateDomainResponse() {
}
/**
* Performs a deep copy on other.
*/
public UpdateDomainResponse(UpdateDomainResponse other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetDomainInfo()) {
this.domainInfo = new DomainInfo(other.domainInfo);
}
if (other.isSetConfiguration()) {
this.configuration = new DomainConfiguration(other.configuration);
}
if (other.isSetReplicationConfiguration()) {
this.replicationConfiguration = new DomainReplicationConfiguration(other.replicationConfiguration);
}
this.failoverVersion = other.failoverVersion;
this.isGlobalDomain = other.isGlobalDomain;
}
public UpdateDomainResponse deepCopy() {
return new UpdateDomainResponse(this);
}
@Override
public void clear() {
this.domainInfo = null;
this.configuration = null;
this.replicationConfiguration = null;
setFailoverVersionIsSet(false);
this.failoverVersion = 0;
setIsGlobalDomainIsSet(false);
this.isGlobalDomain = false;
}
public DomainInfo getDomainInfo() {
return this.domainInfo;
}
public UpdateDomainResponse setDomainInfo(DomainInfo domainInfo) {
this.domainInfo = domainInfo;
return this;
}
public void unsetDomainInfo() {
this.domainInfo = null;
}
/** Returns true if field domainInfo is set (has been assigned a value) and false otherwise */
public boolean isSetDomainInfo() {
return this.domainInfo != null;
}
public void setDomainInfoIsSet(boolean value) {
if (!value) {
this.domainInfo = null;
}
}
public DomainConfiguration getConfiguration() {
return this.configuration;
}
public UpdateDomainResponse setConfiguration(DomainConfiguration configuration) {
this.configuration = configuration;
return this;
}
public void unsetConfiguration() {
this.configuration = null;
}
/** Returns true if field configuration is set (has been assigned a value) and false otherwise */
public boolean isSetConfiguration() {
return this.configuration != null;
}
public void setConfigurationIsSet(boolean value) {
if (!value) {
this.configuration = null;
}
}
public DomainReplicationConfiguration getReplicationConfiguration() {
return this.replicationConfiguration;
}
public UpdateDomainResponse setReplicationConfiguration(DomainReplicationConfiguration replicationConfiguration) {
this.replicationConfiguration = replicationConfiguration;
return this;
}
public void unsetReplicationConfiguration() {
this.replicationConfiguration = null;
}
/** Returns true if field replicationConfiguration is set (has been assigned a value) and false otherwise */
public boolean isSetReplicationConfiguration() {
return this.replicationConfiguration != null;
}
public void setReplicationConfigurationIsSet(boolean value) {
if (!value) {
this.replicationConfiguration = null;
}
}
public long getFailoverVersion() {
return this.failoverVersion;
}
public UpdateDomainResponse setFailoverVersion(long failoverVersion) {
this.failoverVersion = failoverVersion;
setFailoverVersionIsSet(true);
return this;
}
public void unsetFailoverVersion() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FAILOVERVERSION_ISSET_ID);
}
/** Returns true if field failoverVersion is set (has been assigned a value) and false otherwise */
public boolean isSetFailoverVersion() {
return EncodingUtils.testBit(__isset_bitfield, __FAILOVERVERSION_ISSET_ID);
}
public void setFailoverVersionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FAILOVERVERSION_ISSET_ID, value);
}
public boolean isIsGlobalDomain() {
return this.isGlobalDomain;
}
public UpdateDomainResponse setIsGlobalDomain(boolean isGlobalDomain) {
this.isGlobalDomain = isGlobalDomain;
setIsGlobalDomainIsSet(true);
return this;
}
public void unsetIsGlobalDomain() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISGLOBALDOMAIN_ISSET_ID);
}
/** Returns true if field isGlobalDomain is set (has been assigned a value) and false otherwise */
public boolean isSetIsGlobalDomain() {
return EncodingUtils.testBit(__isset_bitfield, __ISGLOBALDOMAIN_ISSET_ID);
}
public void setIsGlobalDomainIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISGLOBALDOMAIN_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DOMAIN_INFO:
if (value == null) {
unsetDomainInfo();
} else {
setDomainInfo((DomainInfo)value);
}
break;
case CONFIGURATION:
if (value == null) {
unsetConfiguration();
} else {
setConfiguration((DomainConfiguration)value);
}
break;
case REPLICATION_CONFIGURATION:
if (value == null) {
unsetReplicationConfiguration();
} else {
setReplicationConfiguration((DomainReplicationConfiguration)value);
}
break;
case FAILOVER_VERSION:
if (value == null) {
unsetFailoverVersion();
} else {
setFailoverVersion((Long)value);
}
break;
case IS_GLOBAL_DOMAIN:
if (value == null) {
unsetIsGlobalDomain();
} else {
setIsGlobalDomain((Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DOMAIN_INFO:
return getDomainInfo();
case CONFIGURATION:
return getConfiguration();
case REPLICATION_CONFIGURATION:
return getReplicationConfiguration();
case FAILOVER_VERSION:
return getFailoverVersion();
case IS_GLOBAL_DOMAIN:
return isIsGlobalDomain();
}
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_INFO:
return isSetDomainInfo();
case CONFIGURATION:
return isSetConfiguration();
case REPLICATION_CONFIGURATION:
return isSetReplicationConfiguration();
case FAILOVER_VERSION:
return isSetFailoverVersion();
case IS_GLOBAL_DOMAIN:
return isSetIsGlobalDomain();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof UpdateDomainResponse)
return this.equals((UpdateDomainResponse)that);
return false;
}
public boolean equals(UpdateDomainResponse that) {
if (that == null)
return false;
boolean this_present_domainInfo = true && this.isSetDomainInfo();
boolean that_present_domainInfo = true && that.isSetDomainInfo();
if (this_present_domainInfo || that_present_domainInfo) {
if (!(this_present_domainInfo && that_present_domainInfo))
return false;
if (!this.domainInfo.equals(that.domainInfo))
return false;
}
boolean this_present_configuration = true && this.isSetConfiguration();
boolean that_present_configuration = true && that.isSetConfiguration();
if (this_present_configuration || that_present_configuration) {
if (!(this_present_configuration && that_present_configuration))
return false;
if (!this.configuration.equals(that.configuration))
return false;
}
boolean this_present_replicationConfiguration = true && this.isSetReplicationConfiguration();
boolean that_present_replicationConfiguration = true && that.isSetReplicationConfiguration();
if (this_present_replicationConfiguration || that_present_replicationConfiguration) {
if (!(this_present_replicationConfiguration && that_present_replicationConfiguration))
return false;
if (!this.replicationConfiguration.equals(that.replicationConfiguration))
return false;
}
boolean this_present_failoverVersion = true && this.isSetFailoverVersion();
boolean that_present_failoverVersion = true && that.isSetFailoverVersion();
if (this_present_failoverVersion || that_present_failoverVersion) {
if (!(this_present_failoverVersion && that_present_failoverVersion))
return false;
if (this.failoverVersion != that.failoverVersion)
return false;
}
boolean this_present_isGlobalDomain = true && this.isSetIsGlobalDomain();
boolean that_present_isGlobalDomain = true && that.isSetIsGlobalDomain();
if (this_present_isGlobalDomain || that_present_isGlobalDomain) {
if (!(this_present_isGlobalDomain && that_present_isGlobalDomain))
return false;
if (this.isGlobalDomain != that.isGlobalDomain)
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy