/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
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.2)", date = "2015-3-12")
public class MessageInfo implements org.apache.thrift.TBase<MessageInfo, MessageInfo._Fields>, java.io.Serializable, Cloneable, Comparable<MessageInfo> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MessageInfo");

  private static final org.apache.thrift.protocol.TField CMD_FIELD_DESC = new org.apache.thrift.protocol.TField("Cmd", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField NSP_FIELD_DESC = new org.apache.thrift.protocol.TField("Nsp", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField UID_FIELD_DESC = new org.apache.thrift.protocol.TField("Uid", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField CLIENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ClientType", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("Content", org.apache.thrift.protocol.TType.STRING, (short)5);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new MessageInfoStandardSchemeFactory());
    schemes.put(TupleScheme.class, new MessageInfoTupleSchemeFactory());
  }

  public int Cmd; // required
  public String Nsp; // required
  public String Uid; // required
  public String ClientType; // required
  public String Content; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    CMD((short)1, "Cmd"),
    NSP((short)2, "Nsp"),
    UID((short)3, "Uid"),
    CLIENT_TYPE((short)4, "ClientType"),
    CONTENT((short)5, "Content");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    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 1: // CMD
          return CMD;
        case 2: // NSP
          return NSP;
        case 3: // UID
          return UID;
        case 4: // CLIENT_TYPE
          return CLIENT_TYPE;
        case 5: // CONTENT
          return CONTENT;
        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 __CMD_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  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.CMD, new org.apache.thrift.meta_data.FieldMetaData("Cmd", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.NSP, new org.apache.thrift.meta_data.FieldMetaData("Nsp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.UID, new org.apache.thrift.meta_data.FieldMetaData("Uid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CLIENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ClientType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CONTENT, new org.apache.thrift.meta_data.FieldMetaData("Content", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MessageInfo.class, metaDataMap);
  }

  public MessageInfo() {
  }

  public MessageInfo(
    int Cmd,
    String Nsp,
    String Uid,
    String ClientType,
    String Content)
  {
    this();
    this.Cmd = Cmd;
    setCmdIsSet(true);
    this.Nsp = Nsp;
    this.Uid = Uid;
    this.ClientType = ClientType;
    this.Content = Content;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public MessageInfo(MessageInfo other) {
    __isset_bitfield = other.__isset_bitfield;
    this.Cmd = other.Cmd;
    if (other.isSetNsp()) {
      this.Nsp = other.Nsp;
    }
    if (other.isSetUid()) {
      this.Uid = other.Uid;
    }
    if (other.isSetClientType()) {
      this.ClientType = other.ClientType;
    }
    if (other.isSetContent()) {
      this.Content = other.Content;
    }
  }

  public MessageInfo deepCopy() {
    return new MessageInfo(this);
  }

  @Override
  public void clear() {
    setCmdIsSet(false);
    this.Cmd = 0;
    this.Nsp = null;
    this.Uid = null;
    this.ClientType = null;
    this.Content = null;
  }

  public int getCmd() {
    return this.Cmd;
  }

  public MessageInfo setCmd(int Cmd) {
    this.Cmd = Cmd;
    setCmdIsSet(true);
    return this;
  }

  public void unsetCmd() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CMD_ISSET_ID);
  }

  /** Returns true if field Cmd is set (has been assigned a value) and false otherwise */
  public boolean isSetCmd() {
    return EncodingUtils.testBit(__isset_bitfield, __CMD_ISSET_ID);
  }

  public void setCmdIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CMD_ISSET_ID, value);
  }

  public String getNsp() {
    return this.Nsp;
  }

  public MessageInfo setNsp(String Nsp) {
    this.Nsp = Nsp;
    return this;
  }

  public void unsetNsp() {
    this.Nsp = null;
  }

  /** Returns true if field Nsp is set (has been assigned a value) and false otherwise */
  public boolean isSetNsp() {
    return this.Nsp != null;
  }

  public void setNspIsSet(boolean value) {
    if (!value) {
      this.Nsp = null;
    }
  }

  public String getUid() {
    return this.Uid;
  }

  public MessageInfo setUid(String Uid) {
    this.Uid = Uid;
    return this;
  }

  public void unsetUid() {
    this.Uid = null;
  }

  /** Returns true if field Uid is set (has been assigned a value) and false otherwise */
  public boolean isSetUid() {
    return this.Uid != null;
  }

  public void setUidIsSet(boolean value) {
    if (!value) {
      this.Uid = null;
    }
  }

  public String getClientType() {
    return this.ClientType;
  }

  public MessageInfo setClientType(String ClientType) {
    this.ClientType = ClientType;
    return this;
  }

  public void unsetClientType() {
    this.ClientType = null;
  }

  /** Returns true if field ClientType is set (has been assigned a value) and false otherwise */
  public boolean isSetClientType() {
    return this.ClientType != null;
  }

  public void setClientTypeIsSet(boolean value) {
    if (!value) {
      this.ClientType = null;
    }
  }

  public String getContent() {
    return this.Content;
  }

  public MessageInfo setContent(String Content) {
    this.Content = Content;
    return this;
  }

  public void unsetContent() {
    this.Content = null;
  }

  /** Returns true if field Content is set (has been assigned a value) and false otherwise */
  public boolean isSetContent() {
    return this.Content != null;
  }

  public void setContentIsSet(boolean value) {
    if (!value) {
      this.Content = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case CMD:
      if (value == null) {
        unsetCmd();
      } else {
        setCmd((Integer)value);
      }
      break;

    case NSP:
      if (value == null) {
        unsetNsp();
      } else {
        setNsp((String)value);
      }
      break;

    case UID:
      if (value == null) {
        unsetUid();
      } else {
        setUid((String)value);
      }
      break;

    case CLIENT_TYPE:
      if (value == null) {
        unsetClientType();
      } else {
        setClientType((String)value);
      }
      break;

    case CONTENT:
      if (value == null) {
        unsetContent();
      } else {
        setContent((String)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case CMD:
      return Integer.valueOf(getCmd());

    case NSP:
      return getNsp();

    case UID:
      return getUid();

    case CLIENT_TYPE:
      return getClientType();

    case CONTENT:
      return getContent();

    }
    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 CMD:
      return isSetCmd();
    case NSP:
      return isSetNsp();
    case UID:
      return isSetUid();
    case CLIENT_TYPE:
      return isSetClientType();
    case CONTENT:
      return isSetContent();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof MessageInfo)
      return this.equals((MessageInfo)that);
    return false;
  }

  public boolean equals(MessageInfo that) {
    if (that == null)
      return false;

    boolean this_present_Cmd = true;
    boolean that_present_Cmd = true;
    if (this_present_Cmd || that_present_Cmd) {
      if (!(this_present_Cmd && that_present_Cmd))
        return false;
      if (this.Cmd != that.Cmd)
        return false;
    }

    boolean this_present_Nsp = true && this.isSetNsp();
    boolean that_present_Nsp = true && that.isSetNsp();
    if (this_present_Nsp || that_present_Nsp) {
      if (!(this_present_Nsp && that_present_Nsp))
        return false;
      if (!this.Nsp.equals(that.Nsp))
        return false;
    }

    boolean this_present_Uid = true && this.isSetUid();
    boolean that_present_Uid = true && that.isSetUid();
    if (this_present_Uid || that_present_Uid) {
      if (!(this_present_Uid && that_present_Uid))
        return false;
      if (!this.Uid.equals(that.Uid))
        return false;
    }

    boolean this_present_ClientType = true && this.isSetClientType();
    boolean that_present_ClientType = true && that.isSetClientType();
    if (this_present_ClientType || that_present_ClientType) {
      if (!(this_present_ClientType && that_present_ClientType))
        return false;
      if (!this.ClientType.equals(that.ClientType))
        return false;
    }

    boolean this_present_Content = true && this.isSetContent();
    boolean that_present_Content = true && that.isSetContent();
    if (this_present_Content || that_present_Content) {
      if (!(this_present_Content && that_present_Content))
        return false;
      if (!this.Content.equals(that.Content))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_Cmd = true;
    list.add(present_Cmd);
    if (present_Cmd)
      list.add(Cmd);

    boolean present_Nsp = true && (isSetNsp());
    list.add(present_Nsp);
    if (present_Nsp)
      list.add(Nsp);

    boolean present_Uid = true && (isSetUid());
    list.add(present_Uid);
    if (present_Uid)
      list.add(Uid);

    boolean present_ClientType = true && (isSetClientType());
    list.add(present_ClientType);
    if (present_ClientType)
      list.add(ClientType);

    boolean present_Content = true && (isSetContent());
    list.add(present_Content);
    if (present_Content)
      list.add(Content);

    return list.hashCode();
  }

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

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetCmd()).compareTo(other.isSetCmd());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCmd()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Cmd, other.Cmd);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNsp()).compareTo(other.isSetNsp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNsp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Nsp, other.Nsp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUid()).compareTo(other.isSetUid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Uid, other.Uid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetClientType()).compareTo(other.isSetClientType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetClientType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ClientType, other.ClientType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetContent()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Content, other.Content);
      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("MessageInfo(");
    boolean first = true;

    sb.append("Cmd:");
    sb.append(this.Cmd);
    first = false;
    if (!first) sb.append(", ");
    sb.append("Nsp:");
    if (this.Nsp == null) {
      sb.append("null");
    } else {
      sb.append(this.Nsp);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("Uid:");
    if (this.Uid == null) {
      sb.append("null");
    } else {
      sb.append(this.Uid);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("ClientType:");
    if (this.ClientType == null) {
      sb.append("null");
    } else {
      sb.append(this.ClientType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("Content:");
    if (this.Content == null) {
      sb.append("null");
    } else {
      sb.append(this.Content);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

  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 MessageInfoStandardSchemeFactory implements SchemeFactory {
    public MessageInfoStandardScheme getScheme() {
      return new MessageInfoStandardScheme();
    }
  }

  private static class MessageInfoStandardScheme extends StandardScheme<MessageInfo> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, MessageInfo 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 1: // CMD
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.Cmd = iprot.readI32();
              struct.setCmdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // NSP
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.Nsp = iprot.readString();
              struct.setNspIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // UID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.Uid = iprot.readString();
              struct.setUidIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CLIENT_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.ClientType = iprot.readString();
              struct.setClientTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // CONTENT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.Content = iprot.readString();
              struct.setContentIsSet(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, MessageInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CMD_FIELD_DESC);
      oprot.writeI32(struct.Cmd);
      oprot.writeFieldEnd();
      if (struct.Nsp != null) {
        oprot.writeFieldBegin(NSP_FIELD_DESC);
        oprot.writeString(struct.Nsp);
        oprot.writeFieldEnd();
      }
      if (struct.Uid != null) {
        oprot.writeFieldBegin(UID_FIELD_DESC);
        oprot.writeString(struct.Uid);
        oprot.writeFieldEnd();
      }
      if (struct.ClientType != null) {
        oprot.writeFieldBegin(CLIENT_TYPE_FIELD_DESC);
        oprot.writeString(struct.ClientType);
        oprot.writeFieldEnd();
      }
      if (struct.Content != null) {
        oprot.writeFieldBegin(CONTENT_FIELD_DESC);
        oprot.writeString(struct.Content);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class MessageInfoTupleSchemeFactory implements SchemeFactory {
    public MessageInfoTupleScheme getScheme() {
      return new MessageInfoTupleScheme();
    }
  }

  private static class MessageInfoTupleScheme extends TupleScheme<MessageInfo> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, MessageInfo struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetCmd()) {
        optionals.set(0);
      }
      if (struct.isSetNsp()) {
        optionals.set(1);
      }
      if (struct.isSetUid()) {
        optionals.set(2);
      }
      if (struct.isSetClientType()) {
        optionals.set(3);
      }
      if (struct.isSetContent()) {
        optionals.set(4);
      }
      oprot.writeBitSet(optionals, 5);
      if (struct.isSetCmd()) {
        oprot.writeI32(struct.Cmd);
      }
      if (struct.isSetNsp()) {
        oprot.writeString(struct.Nsp);
      }
      if (struct.isSetUid()) {
        oprot.writeString(struct.Uid);
      }
      if (struct.isSetClientType()) {
        oprot.writeString(struct.ClientType);
      }
      if (struct.isSetContent()) {
        oprot.writeString(struct.Content);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, MessageInfo struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(5);
      if (incoming.get(0)) {
        struct.Cmd = iprot.readI32();
        struct.setCmdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.Nsp = iprot.readString();
        struct.setNspIsSet(true);
      }
      if (incoming.get(2)) {
        struct.Uid = iprot.readString();
        struct.setUidIsSet(true);
      }
      if (incoming.get(3)) {
        struct.ClientType = iprot.readString();
        struct.setClientTypeIsSet(true);
      }
      if (incoming.get(4)) {
        struct.Content = iprot.readString();
        struct.setContentIsSet(true);
      }
    }
  }

}

