All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.uber.cadence.UpdateDomainResponse Maven / Gradle / Ivy

There is a newer version: 3.12.5
Show newest version
/**
 * 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 list = new ArrayList();

    boolean present_domainInfo = true && (isSetDomainInfo());
    list.add(present_domainInfo);
    if (present_domainInfo)
      list.add(domainInfo);

    boolean present_configuration = true && (isSetConfiguration());
    list.add(present_configuration);
    if (present_configuration)
      list.add(configuration);

    boolean present_replicationConfiguration = true && (isSetReplicationConfiguration());
    list.add(present_replicationConfiguration);
    if (present_replicationConfiguration)
      list.add(replicationConfiguration);

    boolean present_failoverVersion = true && (isSetFailoverVersion());
    list.add(present_failoverVersion);
    if (present_failoverVersion)
      list.add(failoverVersion);

    boolean present_isGlobalDomain = true && (isSetIsGlobalDomain());
    list.add(present_isGlobalDomain);
    if (present_isGlobalDomain)
      list.add(isGlobalDomain);

    return list.hashCode();
  }

  @Override
  public int compareTo(UpdateDomainResponse other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetDomainInfo()).compareTo(other.isSetDomainInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDomainInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.domainInfo, other.domainInfo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConfiguration()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetReplicationConfiguration()).compareTo(other.isSetReplicationConfiguration());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReplicationConfiguration()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicationConfiguration, other.replicationConfiguration);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFailoverVersion()).compareTo(other.isSetFailoverVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFailoverVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failoverVersion, other.failoverVersion);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsGlobalDomain()).compareTo(other.isSetIsGlobalDomain());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsGlobalDomain()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isGlobalDomain, other.isGlobalDomain);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("UpdateDomainResponse(");
    boolean first = true;

    if (isSetDomainInfo()) {
      sb.append("domainInfo:");
      if (this.domainInfo == null) {
        sb.append("null");
      } else {
        sb.append(this.domainInfo);
      }
      first = false;
    }
    if (isSetConfiguration()) {
      if (!first) sb.append(", ");
      sb.append("configuration:");
      if (this.configuration == null) {
        sb.append("null");
      } else {
        sb.append(this.configuration);
      }
      first = false;
    }
    if (isSetReplicationConfiguration()) {
      if (!first) sb.append(", ");
      sb.append("replicationConfiguration:");
      if (this.replicationConfiguration == null) {
        sb.append("null");
      } else {
        sb.append(this.replicationConfiguration);
      }
      first = false;
    }
    if (isSetFailoverVersion()) {
      if (!first) sb.append(", ");
      sb.append("failoverVersion:");
      sb.append(this.failoverVersion);
      first = false;
    }
    if (isSetIsGlobalDomain()) {
      if (!first) sb.append(", ");
      sb.append("isGlobalDomain:");
      sb.append(this.isGlobalDomain);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
    if (domainInfo != null) {
      domainInfo.validate();
    }
    if (configuration != null) {
      configuration.validate();
    }
    if (replicationConfiguration != null) {
      replicationConfiguration.validate();
    }
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class UpdateDomainResponseStandardSchemeFactory implements SchemeFactory {
    public UpdateDomainResponseStandardScheme getScheme() {
      return new UpdateDomainResponseStandardScheme();
    }
  }

  private static class UpdateDomainResponseStandardScheme extends StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, UpdateDomainResponse struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 10: // DOMAIN_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.domainInfo = new DomainInfo();
              struct.domainInfo.read(iprot);
              struct.setDomainInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 20: // CONFIGURATION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.configuration = new DomainConfiguration();
              struct.configuration.read(iprot);
              struct.setConfigurationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 30: // REPLICATION_CONFIGURATION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.replicationConfiguration = new DomainReplicationConfiguration();
              struct.replicationConfiguration.read(iprot);
              struct.setReplicationConfigurationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 40: // FAILOVER_VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.failoverVersion = iprot.readI64();
              struct.setFailoverVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 50: // IS_GLOBAL_DOMAIN
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isGlobalDomain = iprot.readBool();
              struct.setIsGlobalDomainIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, UpdateDomainResponse struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.domainInfo != null) {
        if (struct.isSetDomainInfo()) {
          oprot.writeFieldBegin(DOMAIN_INFO_FIELD_DESC);
          struct.domainInfo.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.configuration != null) {
        if (struct.isSetConfiguration()) {
          oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC);
          struct.configuration.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.replicationConfiguration != null) {
        if (struct.isSetReplicationConfiguration()) {
          oprot.writeFieldBegin(REPLICATION_CONFIGURATION_FIELD_DESC);
          struct.replicationConfiguration.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetFailoverVersion()) {
        oprot.writeFieldBegin(FAILOVER_VERSION_FIELD_DESC);
        oprot.writeI64(struct.failoverVersion);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsGlobalDomain()) {
        oprot.writeFieldBegin(IS_GLOBAL_DOMAIN_FIELD_DESC);
        oprot.writeBool(struct.isGlobalDomain);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class UpdateDomainResponseTupleSchemeFactory implements SchemeFactory {
    public UpdateDomainResponseTupleScheme getScheme() {
      return new UpdateDomainResponseTupleScheme();
    }
  }

  private static class UpdateDomainResponseTupleScheme extends TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, UpdateDomainResponse struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetDomainInfo()) {
        optionals.set(0);
      }
      if (struct.isSetConfiguration()) {
        optionals.set(1);
      }
      if (struct.isSetReplicationConfiguration()) {
        optionals.set(2);
      }
      if (struct.isSetFailoverVersion()) {
        optionals.set(3);
      }
      if (struct.isSetIsGlobalDomain()) {
        optionals.set(4);
      }
      oprot.writeBitSet(optionals, 5);
      if (struct.isSetDomainInfo()) {
        struct.domainInfo.write(oprot);
      }
      if (struct.isSetConfiguration()) {
        struct.configuration.write(oprot);
      }
      if (struct.isSetReplicationConfiguration()) {
        struct.replicationConfiguration.write(oprot);
      }
      if (struct.isSetFailoverVersion()) {
        oprot.writeI64(struct.failoverVersion);
      }
      if (struct.isSetIsGlobalDomain()) {
        oprot.writeBool(struct.isGlobalDomain);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, UpdateDomainResponse struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(5);
      if (incoming.get(0)) {
        struct.domainInfo = new DomainInfo();
        struct.domainInfo.read(iprot);
        struct.setDomainInfoIsSet(true);
      }
      if (incoming.get(1)) {
        struct.configuration = new DomainConfiguration();
        struct.configuration.read(iprot);
        struct.setConfigurationIsSet(true);
      }
      if (incoming.get(2)) {
        struct.replicationConfiguration = new DomainReplicationConfiguration();
        struct.replicationConfiguration.read(iprot);
        struct.setReplicationConfigurationIsSet(true);
      }
      if (incoming.get(3)) {
        struct.failoverVersion = iprot.readI64();
        struct.setFailoverVersionIsSet(true);
      }
      if (incoming.get(4)) {
        struct.isGlobalDomain = iprot.readBool();
        struct.setIsGlobalDomainIsSet(true);
      }
    }
  }

}