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

io.snappydata.thrift.ServiceMetaDataArgs Maven / Gradle / Ivy

There is a newer version: 1.6.7
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 io.snappydata.thrift;

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-08-09")
public class ServiceMetaDataArgs 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("ServiceMetaDataArgs");

  private static final org.apache.thrift.protocol.TField CONN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("connId", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField DRIVER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("driverType", org.apache.thrift.protocol.TType.BYTE, (short)2);
  private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("schema", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField TABLE_TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("tableTypes", org.apache.thrift.protocol.TType.LIST, (short)6);
  private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField FOREIGN_SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignSchema", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField FOREIGN_TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignTable", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField PROCEDURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("procedureName", org.apache.thrift.protocol.TType.STRING, (short)10);
  private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)11);
  private static final org.apache.thrift.protocol.TField ATTRIBUTE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("attributeName", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField TYPE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("typeName", org.apache.thrift.protocol.TType.STRING, (short)13);
  private static final org.apache.thrift.protocol.TField TYPE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("typeId", org.apache.thrift.protocol.TType.I32, (short)14);

  private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new ServiceMetaDataArgsStandardSchemeFactory());
    schemes.put(TupleScheme.class, new ServiceMetaDataArgsTupleSchemeFactory());
  }

  public long connId; // required
  public byte driverType; // required
  public ByteBuffer token; // required
  public String schema; // optional
  public String table; // optional
  public List tableTypes; // optional
  public String columnName; // optional
  public String foreignSchema; // optional
  public String foreignTable; // optional
  public String procedureName; // optional
  public String functionName; // optional
  public String attributeName; // optional
  public String typeName; // optional
  /**
   * 
   * @see SnappyType
   */
  public SnappyType typeId; // 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 {
    CONN_ID((short)1, "connId"),
    DRIVER_TYPE((short)2, "driverType"),
    TOKEN((short)3, "token"),
    SCHEMA((short)4, "schema"),
    TABLE((short)5, "table"),
    TABLE_TYPES((short)6, "tableTypes"),
    COLUMN_NAME((short)7, "columnName"),
    FOREIGN_SCHEMA((short)8, "foreignSchema"),
    FOREIGN_TABLE((short)9, "foreignTable"),
    PROCEDURE_NAME((short)10, "procedureName"),
    FUNCTION_NAME((short)11, "functionName"),
    ATTRIBUTE_NAME((short)12, "attributeName"),
    TYPE_NAME((short)13, "typeName"),
    /**
     * 
     * @see SnappyType
     */
    TYPE_ID((short)14, "typeId");

    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 1: // CONN_ID
          return CONN_ID;
        case 2: // DRIVER_TYPE
          return DRIVER_TYPE;
        case 3: // TOKEN
          return TOKEN;
        case 4: // SCHEMA
          return SCHEMA;
        case 5: // TABLE
          return TABLE;
        case 6: // TABLE_TYPES
          return TABLE_TYPES;
        case 7: // COLUMN_NAME
          return COLUMN_NAME;
        case 8: // FOREIGN_SCHEMA
          return FOREIGN_SCHEMA;
        case 9: // FOREIGN_TABLE
          return FOREIGN_TABLE;
        case 10: // PROCEDURE_NAME
          return PROCEDURE_NAME;
        case 11: // FUNCTION_NAME
          return FUNCTION_NAME;
        case 12: // ATTRIBUTE_NAME
          return ATTRIBUTE_NAME;
        case 13: // TYPE_NAME
          return TYPE_NAME;
        case 14: // TYPE_ID
          return TYPE_ID;
        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 __CONNID_ISSET_ID = 0;
  private static final int __DRIVERTYPE_ISSET_ID = 1;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.SCHEMA,_Fields.TABLE,_Fields.TABLE_TYPES,_Fields.COLUMN_NAME,_Fields.FOREIGN_SCHEMA,_Fields.FOREIGN_TABLE,_Fields.PROCEDURE_NAME,_Fields.FUNCTION_NAME,_Fields.ATTRIBUTE_NAME,_Fields.TYPE_NAME,_Fields.TYPE_ID};
  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.CONN_ID, new org.apache.thrift.meta_data.FieldMetaData("connId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DRIVER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("driverType", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
    tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
    tmpMap.put(_Fields.SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("schema", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE_TYPES, new org.apache.thrift.meta_data.FieldMetaData("tableTypes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("columnName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FOREIGN_SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("foreignSchema", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FOREIGN_TABLE, new org.apache.thrift.meta_data.FieldMetaData("foreignTable", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PROCEDURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("procedureName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ATTRIBUTE_NAME, new org.apache.thrift.meta_data.FieldMetaData("attributeName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TYPE_NAME, new org.apache.thrift.meta_data.FieldMetaData("typeName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TYPE_ID, new org.apache.thrift.meta_data.FieldMetaData("typeId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SnappyType.class)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServiceMetaDataArgs.class, metaDataMap);
  }

  public ServiceMetaDataArgs() {
  }

  public ServiceMetaDataArgs(
    long connId,
    byte driverType,
    ByteBuffer token)
  {
    this();
    this.connId = connId;
    setConnIdIsSet(true);
    this.driverType = driverType;
    setDriverTypeIsSet(true);
    this.token = org.apache.thrift.TBaseHelper.copyBinary(token);
  }

  /**
   * Performs a deep copy on other.
   */
  public ServiceMetaDataArgs(ServiceMetaDataArgs other) {
    __isset_bitfield = other.__isset_bitfield;
    this.connId = other.connId;
    this.driverType = other.driverType;
    if (other.isSetToken()) {
      this.token = org.apache.thrift.TBaseHelper.copyBinary(other.token);
    }
    if (other.isSetSchema()) {
      this.schema = other.schema;
    }
    if (other.isSetTable()) {
      this.table = other.table;
    }
    if (other.isSetTableTypes()) {
      List __this__tableTypes = new ArrayList(other.tableTypes);
      this.tableTypes = __this__tableTypes;
    }
    if (other.isSetColumnName()) {
      this.columnName = other.columnName;
    }
    if (other.isSetForeignSchema()) {
      this.foreignSchema = other.foreignSchema;
    }
    if (other.isSetForeignTable()) {
      this.foreignTable = other.foreignTable;
    }
    if (other.isSetProcedureName()) {
      this.procedureName = other.procedureName;
    }
    if (other.isSetFunctionName()) {
      this.functionName = other.functionName;
    }
    if (other.isSetAttributeName()) {
      this.attributeName = other.attributeName;
    }
    if (other.isSetTypeName()) {
      this.typeName = other.typeName;
    }
    if (other.isSetTypeId()) {
      this.typeId = other.typeId;
    }
  }

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

  @Override
  public void clear() {
    setConnIdIsSet(false);
    this.connId = 0;
    setDriverTypeIsSet(false);
    this.driverType = 0;
    this.token = null;
    this.schema = null;
    this.table = null;
    this.tableTypes = null;
    this.columnName = null;
    this.foreignSchema = null;
    this.foreignTable = null;
    this.procedureName = null;
    this.functionName = null;
    this.attributeName = null;
    this.typeName = null;
    this.typeId = null;
  }

  public long getConnId() {
    return this.connId;
  }

  public ServiceMetaDataArgs setConnId(long connId) {
    this.connId = connId;
    setConnIdIsSet(true);
    return this;
  }

  public void unsetConnId() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CONNID_ISSET_ID);
  }

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

  public void setConnIdIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CONNID_ISSET_ID, value);
  }

  public byte getDriverType() {
    return this.driverType;
  }

  public ServiceMetaDataArgs setDriverType(byte driverType) {
    this.driverType = driverType;
    setDriverTypeIsSet(true);
    return this;
  }

  public void unsetDriverType() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DRIVERTYPE_ISSET_ID);
  }

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

  public void setDriverTypeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DRIVERTYPE_ISSET_ID, value);
  }

  public byte[] getToken() {
    setToken(org.apache.thrift.TBaseHelper.rightSize(token));
    return token == null ? null : token.array();
  }

  public ByteBuffer bufferForToken() {
    return org.apache.thrift.TBaseHelper.copyBinary(token);
  }

  public ServiceMetaDataArgs setToken(byte[] token) {
    this.token = token == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(token, token.length));
    return this;
  }

  public ServiceMetaDataArgs setToken(ByteBuffer token) {
    this.token = org.apache.thrift.TBaseHelper.copyBinary(token);
    return this;
  }

  public void unsetToken() {
    this.token = null;
  }

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

  public void setTokenIsSet(boolean value) {
    if (!value) {
      this.token = null;
    }
  }

  public String getSchema() {
    return this.schema;
  }

  public ServiceMetaDataArgs setSchema(String schema) {
    this.schema = schema;
    return this;
  }

  public void unsetSchema() {
    this.schema = null;
  }

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

  public void setSchemaIsSet(boolean value) {
    if (!value) {
      this.schema = null;
    }
  }

  public String getTable() {
    return this.table;
  }

  public ServiceMetaDataArgs setTable(String table) {
    this.table = table;
    return this;
  }

  public void unsetTable() {
    this.table = null;
  }

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

  public void setTableIsSet(boolean value) {
    if (!value) {
      this.table = null;
    }
  }

  public int getTableTypesSize() {
    return (this.tableTypes == null) ? 0 : this.tableTypes.size();
  }

  public java.util.Iterator getTableTypesIterator() {
    return (this.tableTypes == null) ? null : this.tableTypes.iterator();
  }

  public void addToTableTypes(String elem) {
    if (this.tableTypes == null) {
      this.tableTypes = new ArrayList();
    }
    this.tableTypes.add(elem);
  }

  public List getTableTypes() {
    return this.tableTypes;
  }

  public ServiceMetaDataArgs setTableTypes(List tableTypes) {
    this.tableTypes = tableTypes;
    return this;
  }

  public void unsetTableTypes() {
    this.tableTypes = null;
  }

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

  public void setTableTypesIsSet(boolean value) {
    if (!value) {
      this.tableTypes = null;
    }
  }

  public String getColumnName() {
    return this.columnName;
  }

  public ServiceMetaDataArgs setColumnName(String columnName) {
    this.columnName = columnName;
    return this;
  }

  public void unsetColumnName() {
    this.columnName = null;
  }

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

  public void setColumnNameIsSet(boolean value) {
    if (!value) {
      this.columnName = null;
    }
  }

  public String getForeignSchema() {
    return this.foreignSchema;
  }

  public ServiceMetaDataArgs setForeignSchema(String foreignSchema) {
    this.foreignSchema = foreignSchema;
    return this;
  }

  public void unsetForeignSchema() {
    this.foreignSchema = null;
  }

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

  public void setForeignSchemaIsSet(boolean value) {
    if (!value) {
      this.foreignSchema = null;
    }
  }

  public String getForeignTable() {
    return this.foreignTable;
  }

  public ServiceMetaDataArgs setForeignTable(String foreignTable) {
    this.foreignTable = foreignTable;
    return this;
  }

  public void unsetForeignTable() {
    this.foreignTable = null;
  }

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

  public void setForeignTableIsSet(boolean value) {
    if (!value) {
      this.foreignTable = null;
    }
  }

  public String getProcedureName() {
    return this.procedureName;
  }

  public ServiceMetaDataArgs setProcedureName(String procedureName) {
    this.procedureName = procedureName;
    return this;
  }

  public void unsetProcedureName() {
    this.procedureName = null;
  }

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

  public void setProcedureNameIsSet(boolean value) {
    if (!value) {
      this.procedureName = null;
    }
  }

  public String getFunctionName() {
    return this.functionName;
  }

  public ServiceMetaDataArgs setFunctionName(String functionName) {
    this.functionName = functionName;
    return this;
  }

  public void unsetFunctionName() {
    this.functionName = null;
  }

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

  public void setFunctionNameIsSet(boolean value) {
    if (!value) {
      this.functionName = null;
    }
  }

  public String getAttributeName() {
    return this.attributeName;
  }

  public ServiceMetaDataArgs setAttributeName(String attributeName) {
    this.attributeName = attributeName;
    return this;
  }

  public void unsetAttributeName() {
    this.attributeName = null;
  }

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

  public void setAttributeNameIsSet(boolean value) {
    if (!value) {
      this.attributeName = null;
    }
  }

  public String getTypeName() {
    return this.typeName;
  }

  public ServiceMetaDataArgs setTypeName(String typeName) {
    this.typeName = typeName;
    return this;
  }

  public void unsetTypeName() {
    this.typeName = null;
  }

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

  public void setTypeNameIsSet(boolean value) {
    if (!value) {
      this.typeName = null;
    }
  }

  /**
   * 
   * @see SnappyType
   */
  public SnappyType getTypeId() {
    return this.typeId;
  }

  /**
   * 
   * @see SnappyType
   */
  public ServiceMetaDataArgs setTypeId(SnappyType typeId) {
    this.typeId = typeId;
    return this;
  }

  public void unsetTypeId() {
    this.typeId = null;
  }

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

  public void setTypeIdIsSet(boolean value) {
    if (!value) {
      this.typeId = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case CONN_ID:
      if (value == null) {
        unsetConnId();
      } else {
        setConnId((Long)value);
      }
      break;

    case DRIVER_TYPE:
      if (value == null) {
        unsetDriverType();
      } else {
        setDriverType((Byte)value);
      }
      break;

    case TOKEN:
      if (value == null) {
        unsetToken();
      } else {
        setToken((ByteBuffer)value);
      }
      break;

    case SCHEMA:
      if (value == null) {
        unsetSchema();
      } else {
        setSchema((String)value);
      }
      break;

    case TABLE:
      if (value == null) {
        unsetTable();
      } else {
        setTable((String)value);
      }
      break;

    case TABLE_TYPES:
      if (value == null) {
        unsetTableTypes();
      } else {
        setTableTypes((List)value);
      }
      break;

    case COLUMN_NAME:
      if (value == null) {
        unsetColumnName();
      } else {
        setColumnName((String)value);
      }
      break;

    case FOREIGN_SCHEMA:
      if (value == null) {
        unsetForeignSchema();
      } else {
        setForeignSchema((String)value);
      }
      break;

    case FOREIGN_TABLE:
      if (value == null) {
        unsetForeignTable();
      } else {
        setForeignTable((String)value);
      }
      break;

    case PROCEDURE_NAME:
      if (value == null) {
        unsetProcedureName();
      } else {
        setProcedureName((String)value);
      }
      break;

    case FUNCTION_NAME:
      if (value == null) {
        unsetFunctionName();
      } else {
        setFunctionName((String)value);
      }
      break;

    case ATTRIBUTE_NAME:
      if (value == null) {
        unsetAttributeName();
      } else {
        setAttributeName((String)value);
      }
      break;

    case TYPE_NAME:
      if (value == null) {
        unsetTypeName();
      } else {
        setTypeName((String)value);
      }
      break;

    case TYPE_ID:
      if (value == null) {
        unsetTypeId();
      } else {
        setTypeId((SnappyType)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case CONN_ID:
      return getConnId();

    case DRIVER_TYPE:
      return getDriverType();

    case TOKEN:
      return getToken();

    case SCHEMA:
      return getSchema();

    case TABLE:
      return getTable();

    case TABLE_TYPES:
      return getTableTypes();

    case COLUMN_NAME:
      return getColumnName();

    case FOREIGN_SCHEMA:
      return getForeignSchema();

    case FOREIGN_TABLE:
      return getForeignTable();

    case PROCEDURE_NAME:
      return getProcedureName();

    case FUNCTION_NAME:
      return getFunctionName();

    case ATTRIBUTE_NAME:
      return getAttributeName();

    case TYPE_NAME:
      return getTypeName();

    case TYPE_ID:
      return getTypeId();

    }
    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 CONN_ID:
      return isSetConnId();
    case DRIVER_TYPE:
      return isSetDriverType();
    case TOKEN:
      return isSetToken();
    case SCHEMA:
      return isSetSchema();
    case TABLE:
      return isSetTable();
    case TABLE_TYPES:
      return isSetTableTypes();
    case COLUMN_NAME:
      return isSetColumnName();
    case FOREIGN_SCHEMA:
      return isSetForeignSchema();
    case FOREIGN_TABLE:
      return isSetForeignTable();
    case PROCEDURE_NAME:
      return isSetProcedureName();
    case FUNCTION_NAME:
      return isSetFunctionName();
    case ATTRIBUTE_NAME:
      return isSetAttributeName();
    case TYPE_NAME:
      return isSetTypeName();
    case TYPE_ID:
      return isSetTypeId();
    }
    throw new IllegalStateException();
  }

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

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

    boolean this_present_connId = true;
    boolean that_present_connId = true;
    if (this_present_connId || that_present_connId) {
      if (!(this_present_connId && that_present_connId))
        return false;
      if (this.connId != that.connId)
        return false;
    }

    boolean this_present_driverType = true;
    boolean that_present_driverType = true;
    if (this_present_driverType || that_present_driverType) {
      if (!(this_present_driverType && that_present_driverType))
        return false;
      if (this.driverType != that.driverType)
        return false;
    }

    boolean this_present_token = true && this.isSetToken();
    boolean that_present_token = true && that.isSetToken();
    if (this_present_token || that_present_token) {
      if (!(this_present_token && that_present_token))
        return false;
      if (!this.token.equals(that.token))
        return false;
    }

    boolean this_present_schema = true && this.isSetSchema();
    boolean that_present_schema = true && that.isSetSchema();
    if (this_present_schema || that_present_schema) {
      if (!(this_present_schema && that_present_schema))
        return false;
      if (!this.schema.equals(that.schema))
        return false;
    }

    boolean this_present_table = true && this.isSetTable();
    boolean that_present_table = true && that.isSetTable();
    if (this_present_table || that_present_table) {
      if (!(this_present_table && that_present_table))
        return false;
      if (!this.table.equals(that.table))
        return false;
    }

    boolean this_present_tableTypes = true && this.isSetTableTypes();
    boolean that_present_tableTypes = true && that.isSetTableTypes();
    if (this_present_tableTypes || that_present_tableTypes) {
      if (!(this_present_tableTypes && that_present_tableTypes))
        return false;
      if (!this.tableTypes.equals(that.tableTypes))
        return false;
    }

    boolean this_present_columnName = true && this.isSetColumnName();
    boolean that_present_columnName = true && that.isSetColumnName();
    if (this_present_columnName || that_present_columnName) {
      if (!(this_present_columnName && that_present_columnName))
        return false;
      if (!this.columnName.equals(that.columnName))
        return false;
    }

    boolean this_present_foreignSchema = true && this.isSetForeignSchema();
    boolean that_present_foreignSchema = true && that.isSetForeignSchema();
    if (this_present_foreignSchema || that_present_foreignSchema) {
      if (!(this_present_foreignSchema && that_present_foreignSchema))
        return false;
      if (!this.foreignSchema.equals(that.foreignSchema))
        return false;
    }

    boolean this_present_foreignTable = true && this.isSetForeignTable();
    boolean that_present_foreignTable = true && that.isSetForeignTable();
    if (this_present_foreignTable || that_present_foreignTable) {
      if (!(this_present_foreignTable && that_present_foreignTable))
        return false;
      if (!this.foreignTable.equals(that.foreignTable))
        return false;
    }

    boolean this_present_procedureName = true && this.isSetProcedureName();
    boolean that_present_procedureName = true && that.isSetProcedureName();
    if (this_present_procedureName || that_present_procedureName) {
      if (!(this_present_procedureName && that_present_procedureName))
        return false;
      if (!this.procedureName.equals(that.procedureName))
        return false;
    }

    boolean this_present_functionName = true && this.isSetFunctionName();
    boolean that_present_functionName = true && that.isSetFunctionName();
    if (this_present_functionName || that_present_functionName) {
      if (!(this_present_functionName && that_present_functionName))
        return false;
      if (!this.functionName.equals(that.functionName))
        return false;
    }

    boolean this_present_attributeName = true && this.isSetAttributeName();
    boolean that_present_attributeName = true && that.isSetAttributeName();
    if (this_present_attributeName || that_present_attributeName) {
      if (!(this_present_attributeName && that_present_attributeName))
        return false;
      if (!this.attributeName.equals(that.attributeName))
        return false;
    }

    boolean this_present_typeName = true && this.isSetTypeName();
    boolean that_present_typeName = true && that.isSetTypeName();
    if (this_present_typeName || that_present_typeName) {
      if (!(this_present_typeName && that_present_typeName))
        return false;
      if (!this.typeName.equals(that.typeName))
        return false;
    }

    boolean this_present_typeId = true && this.isSetTypeId();
    boolean that_present_typeId = true && that.isSetTypeId();
    if (this_present_typeId || that_present_typeId) {
      if (!(this_present_typeId && that_present_typeId))
        return false;
      if (!this.typeId.equals(that.typeId))
        return false;
    }

    return true;
  }

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

    boolean present_connId = true;
    list.add(present_connId);
    if (present_connId)
      list.add(connId);

    boolean present_driverType = true;
    list.add(present_driverType);
    if (present_driverType)
      list.add(driverType);

    boolean present_token = true && (isSetToken());
    list.add(present_token);
    if (present_token)
      list.add(token);

    boolean present_schema = true && (isSetSchema());
    list.add(present_schema);
    if (present_schema)
      list.add(schema);

    boolean present_table = true && (isSetTable());
    list.add(present_table);
    if (present_table)
      list.add(table);

    boolean present_tableTypes = true && (isSetTableTypes());
    list.add(present_tableTypes);
    if (present_tableTypes)
      list.add(tableTypes);

    boolean present_columnName = true && (isSetColumnName());
    list.add(present_columnName);
    if (present_columnName)
      list.add(columnName);

    boolean present_foreignSchema = true && (isSetForeignSchema());
    list.add(present_foreignSchema);
    if (present_foreignSchema)
      list.add(foreignSchema);

    boolean present_foreignTable = true && (isSetForeignTable());
    list.add(present_foreignTable);
    if (present_foreignTable)
      list.add(foreignTable);

    boolean present_procedureName = true && (isSetProcedureName());
    list.add(present_procedureName);
    if (present_procedureName)
      list.add(procedureName);

    boolean present_functionName = true && (isSetFunctionName());
    list.add(present_functionName);
    if (present_functionName)
      list.add(functionName);

    boolean present_attributeName = true && (isSetAttributeName());
    list.add(present_attributeName);
    if (present_attributeName)
      list.add(attributeName);

    boolean present_typeName = true && (isSetTypeName());
    list.add(present_typeName);
    if (present_typeName)
      list.add(typeName);

    boolean present_typeId = true && (isSetTypeId());
    list.add(present_typeId);
    if (present_typeId)
      list.add(typeId.getValue());

    return list.hashCode();
  }

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

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetConnId()).compareTo(other.isSetConnId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConnId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connId, other.connId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDriverType()).compareTo(other.isSetDriverType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDriverType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.driverType, other.driverType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetToken()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSchema()).compareTo(other.isSetSchema());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSchema()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTableTypes()).compareTo(other.isSetTableTypes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableTypes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableTypes, other.tableTypes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetForeignSchema()).compareTo(other.isSetForeignSchema());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetForeignSchema()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignSchema, other.foreignSchema);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetForeignTable()).compareTo(other.isSetForeignTable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetForeignTable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignTable, other.foreignTable);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProcedureName()).compareTo(other.isSetProcedureName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProcedureName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.procedureName, other.procedureName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(other.isSetFunctionName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFunctionName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, other.functionName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAttributeName()).compareTo(other.isSetAttributeName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAttributeName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributeName, other.attributeName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTypeName()).compareTo(other.isSetTypeName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTypeName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeName, other.typeName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTypeId()).compareTo(other.isSetTypeId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTypeId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeId, other.typeId);
      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("ServiceMetaDataArgs(");
    boolean first = true;

    sb.append("connId:");
    sb.append(this.connId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("driverType:");
    sb.append(this.driverType);
    first = false;
    if (!first) sb.append(", ");
    sb.append("token:");
    if (this.token == null) {
      sb.append("null");
    } else {
      org.apache.thrift.TBaseHelper.toString(this.token, sb);
    }
    first = false;
    if (isSetSchema()) {
      if (!first) sb.append(", ");
      sb.append("schema:");
      if (this.schema == null) {
        sb.append("null");
      } else {
        sb.append(this.schema);
      }
      first = false;
    }
    if (isSetTable()) {
      if (!first) sb.append(", ");
      sb.append("table:");
      if (this.table == null) {
        sb.append("null");
      } else {
        sb.append(this.table);
      }
      first = false;
    }
    if (isSetTableTypes()) {
      if (!first) sb.append(", ");
      sb.append("tableTypes:");
      if (this.tableTypes == null) {
        sb.append("null");
      } else {
        sb.append(this.tableTypes);
      }
      first = false;
    }
    if (isSetColumnName()) {
      if (!first) sb.append(", ");
      sb.append("columnName:");
      if (this.columnName == null) {
        sb.append("null");
      } else {
        sb.append(this.columnName);
      }
      first = false;
    }
    if (isSetForeignSchema()) {
      if (!first) sb.append(", ");
      sb.append("foreignSchema:");
      if (this.foreignSchema == null) {
        sb.append("null");
      } else {
        sb.append(this.foreignSchema);
      }
      first = false;
    }
    if (isSetForeignTable()) {
      if (!first) sb.append(", ");
      sb.append("foreignTable:");
      if (this.foreignTable == null) {
        sb.append("null");
      } else {
        sb.append(this.foreignTable);
      }
      first = false;
    }
    if (isSetProcedureName()) {
      if (!first) sb.append(", ");
      sb.append("procedureName:");
      if (this.procedureName == null) {
        sb.append("null");
      } else {
        sb.append(this.procedureName);
      }
      first = false;
    }
    if (isSetFunctionName()) {
      if (!first) sb.append(", ");
      sb.append("functionName:");
      if (this.functionName == null) {
        sb.append("null");
      } else {
        sb.append(this.functionName);
      }
      first = false;
    }
    if (isSetAttributeName()) {
      if (!first) sb.append(", ");
      sb.append("attributeName:");
      if (this.attributeName == null) {
        sb.append("null");
      } else {
        sb.append(this.attributeName);
      }
      first = false;
    }
    if (isSetTypeName()) {
      if (!first) sb.append(", ");
      sb.append("typeName:");
      if (this.typeName == null) {
        sb.append("null");
      } else {
        sb.append(this.typeName);
      }
      first = false;
    }
    if (isSetTypeId()) {
      if (!first) sb.append(", ");
      sb.append("typeId:");
      if (this.typeId == null) {
        sb.append("null");
      } else {
        sb.append(this.typeId);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // alas, we cannot check 'connId' because it's a primitive and you chose the non-beans generator.
    // alas, we cannot check 'driverType' because it's a primitive and you chose the non-beans generator.
    if (token == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'token' was not present! Struct: " + toString());
    }
    // 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 ServiceMetaDataArgsStandardSchemeFactory implements SchemeFactory {
    public ServiceMetaDataArgsStandardScheme getScheme() {
      return new ServiceMetaDataArgsStandardScheme();
    }
  }

  private static class ServiceMetaDataArgsStandardScheme extends StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, ServiceMetaDataArgs 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: // CONN_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.connId = iprot.readI64();
              struct.setConnIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // DRIVER_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
              struct.driverType = iprot.readByte();
              struct.setDriverTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TOKEN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.token = iprot.readBinary();
              struct.setTokenIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // SCHEMA
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.schema = iprot.readString();
              struct.setSchemaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // TABLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.table = iprot.readString();
              struct.setTableIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // TABLE_TYPES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
                struct.tableTypes = new ArrayList(_list94.size);
                String _elem95;
                for (int _i96 = 0; _i96 < _list94.size; ++_i96)
                {
                  _elem95 = iprot.readString();
                  struct.tableTypes.add(_elem95);
                }
                iprot.readListEnd();
              }
              struct.setTableTypesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // COLUMN_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.columnName = iprot.readString();
              struct.setColumnNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // FOREIGN_SCHEMA
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.foreignSchema = iprot.readString();
              struct.setForeignSchemaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // FOREIGN_TABLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.foreignTable = iprot.readString();
              struct.setForeignTableIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // PROCEDURE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.procedureName = iprot.readString();
              struct.setProcedureNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // FUNCTION_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.functionName = iprot.readString();
              struct.setFunctionNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // ATTRIBUTE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.attributeName = iprot.readString();
              struct.setAttributeNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // TYPE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.typeName = iprot.readString();
              struct.setTypeNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // TYPE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.typeId = io.snappydata.thrift.SnappyType.findByValue(iprot.readI32());
              struct.setTypeIdIsSet(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
      if (!struct.isSetConnId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'connId' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetDriverType()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'driverType' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(CONN_ID_FIELD_DESC);
      oprot.writeI64(struct.connId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(DRIVER_TYPE_FIELD_DESC);
      oprot.writeByte(struct.driverType);
      oprot.writeFieldEnd();
      if (struct.token != null) {
        oprot.writeFieldBegin(TOKEN_FIELD_DESC);
        oprot.writeBinary(struct.token);
        oprot.writeFieldEnd();
      }
      if (struct.schema != null) {
        if (struct.isSetSchema()) {
          oprot.writeFieldBegin(SCHEMA_FIELD_DESC);
          oprot.writeString(struct.schema);
          oprot.writeFieldEnd();
        }
      }
      if (struct.table != null) {
        if (struct.isSetTable()) {
          oprot.writeFieldBegin(TABLE_FIELD_DESC);
          oprot.writeString(struct.table);
          oprot.writeFieldEnd();
        }
      }
      if (struct.tableTypes != null) {
        if (struct.isSetTableTypes()) {
          oprot.writeFieldBegin(TABLE_TYPES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tableTypes.size()));
            for (String _iter97 : struct.tableTypes)
            {
              oprot.writeString(_iter97);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.columnName != null) {
        if (struct.isSetColumnName()) {
          oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
          oprot.writeString(struct.columnName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.foreignSchema != null) {
        if (struct.isSetForeignSchema()) {
          oprot.writeFieldBegin(FOREIGN_SCHEMA_FIELD_DESC);
          oprot.writeString(struct.foreignSchema);
          oprot.writeFieldEnd();
        }
      }
      if (struct.foreignTable != null) {
        if (struct.isSetForeignTable()) {
          oprot.writeFieldBegin(FOREIGN_TABLE_FIELD_DESC);
          oprot.writeString(struct.foreignTable);
          oprot.writeFieldEnd();
        }
      }
      if (struct.procedureName != null) {
        if (struct.isSetProcedureName()) {
          oprot.writeFieldBegin(PROCEDURE_NAME_FIELD_DESC);
          oprot.writeString(struct.procedureName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.functionName != null) {
        if (struct.isSetFunctionName()) {
          oprot.writeFieldBegin(FUNCTION_NAME_FIELD_DESC);
          oprot.writeString(struct.functionName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.attributeName != null) {
        if (struct.isSetAttributeName()) {
          oprot.writeFieldBegin(ATTRIBUTE_NAME_FIELD_DESC);
          oprot.writeString(struct.attributeName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.typeName != null) {
        if (struct.isSetTypeName()) {
          oprot.writeFieldBegin(TYPE_NAME_FIELD_DESC);
          oprot.writeString(struct.typeName);
          oprot.writeFieldEnd();
        }
      }
      if (struct.typeId != null) {
        if (struct.isSetTypeId()) {
          oprot.writeFieldBegin(TYPE_ID_FIELD_DESC);
          oprot.writeI32(struct.typeId.getValue());
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class ServiceMetaDataArgsTupleSchemeFactory implements SchemeFactory {
    public ServiceMetaDataArgsTupleScheme getScheme() {
      return new ServiceMetaDataArgsTupleScheme();
    }
  }

  private static class ServiceMetaDataArgsTupleScheme extends TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, ServiceMetaDataArgs struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeI64(struct.connId);
      oprot.writeByte(struct.driverType);
      oprot.writeBinary(struct.token);
      BitSet optionals = new BitSet();
      if (struct.isSetSchema()) {
        optionals.set(0);
      }
      if (struct.isSetTable()) {
        optionals.set(1);
      }
      if (struct.isSetTableTypes()) {
        optionals.set(2);
      }
      if (struct.isSetColumnName()) {
        optionals.set(3);
      }
      if (struct.isSetForeignSchema()) {
        optionals.set(4);
      }
      if (struct.isSetForeignTable()) {
        optionals.set(5);
      }
      if (struct.isSetProcedureName()) {
        optionals.set(6);
      }
      if (struct.isSetFunctionName()) {
        optionals.set(7);
      }
      if (struct.isSetAttributeName()) {
        optionals.set(8);
      }
      if (struct.isSetTypeName()) {
        optionals.set(9);
      }
      if (struct.isSetTypeId()) {
        optionals.set(10);
      }
      oprot.writeBitSet(optionals, 11);
      if (struct.isSetSchema()) {
        oprot.writeString(struct.schema);
      }
      if (struct.isSetTable()) {
        oprot.writeString(struct.table);
      }
      if (struct.isSetTableTypes()) {
        {
          oprot.writeI32(struct.tableTypes.size());
          for (String _iter98 : struct.tableTypes)
          {
            oprot.writeString(_iter98);
          }
        }
      }
      if (struct.isSetColumnName()) {
        oprot.writeString(struct.columnName);
      }
      if (struct.isSetForeignSchema()) {
        oprot.writeString(struct.foreignSchema);
      }
      if (struct.isSetForeignTable()) {
        oprot.writeString(struct.foreignTable);
      }
      if (struct.isSetProcedureName()) {
        oprot.writeString(struct.procedureName);
      }
      if (struct.isSetFunctionName()) {
        oprot.writeString(struct.functionName);
      }
      if (struct.isSetAttributeName()) {
        oprot.writeString(struct.attributeName);
      }
      if (struct.isSetTypeName()) {
        oprot.writeString(struct.typeName);
      }
      if (struct.isSetTypeId()) {
        oprot.writeI32(struct.typeId.getValue());
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, ServiceMetaDataArgs struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.connId = iprot.readI64();
      struct.setConnIdIsSet(true);
      struct.driverType = iprot.readByte();
      struct.setDriverTypeIsSet(true);
      struct.token = iprot.readBinary();
      struct.setTokenIsSet(true);
      BitSet incoming = iprot.readBitSet(11);
      if (incoming.get(0)) {
        struct.schema = iprot.readString();
        struct.setSchemaIsSet(true);
      }
      if (incoming.get(1)) {
        struct.table = iprot.readString();
        struct.setTableIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TList _list99 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.tableTypes = new ArrayList(_list99.size);
          String _elem100;
          for (int _i101 = 0; _i101 < _list99.size; ++_i101)
          {
            _elem100 = iprot.readString();
            struct.tableTypes.add(_elem100);
          }
        }
        struct.setTableTypesIsSet(true);
      }
      if (incoming.get(3)) {
        struct.columnName = iprot.readString();
        struct.setColumnNameIsSet(true);
      }
      if (incoming.get(4)) {
        struct.foreignSchema = iprot.readString();
        struct.setForeignSchemaIsSet(true);
      }
      if (incoming.get(5)) {
        struct.foreignTable = iprot.readString();
        struct.setForeignTableIsSet(true);
      }
      if (incoming.get(6)) {
        struct.procedureName = iprot.readString();
        struct.setProcedureNameIsSet(true);
      }
      if (incoming.get(7)) {
        struct.functionName = iprot.readString();
        struct.setFunctionNameIsSet(true);
      }
      if (incoming.get(8)) {
        struct.attributeName = iprot.readString();
        struct.setAttributeNameIsSet(true);
      }
      if (incoming.get(9)) {
        struct.typeName = iprot.readString();
        struct.setTypeNameIsSet(true);
      }
      if (incoming.get(10)) {
        struct.typeId = io.snappydata.thrift.SnappyType.findByValue(iprot.readI32());
        struct.setTypeIdIsSet(true);
      }
    }
  }

}