TMySQLTable.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TMySQLTable implements org.apache.thrift.TBase<TMySQLTable, TMySQLTable._Fields>, java.io.Serializable, Cloneable, Comparable<TMySQLTable> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMySQLTable");
private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)5);
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)6);
private static final org.apache.thrift.protocol.TField CHARSET_FIELD_DESC = new org.apache.thrift.protocol.TField("charset", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TMySQLTableStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TMySQLTableTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String host; // required
public @org.apache.thrift.annotation.Nullable java.lang.String port; // required
public @org.apache.thrift.annotation.Nullable java.lang.String user; // required
public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // required
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String table; // required
public @org.apache.thrift.annotation.Nullable java.lang.String charset; // 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 {
HOST((short)1, "host"),
PORT((short)2, "port"),
USER((short)3, "user"),
PASSWD((short)4, "passwd"),
DB((short)5, "db"),
TABLE((short)6, "table"),
CHARSET((short)7, "charset");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HOST
return HOST;
case 2: // PORT
return PORT;
case 3: // USER
return USER;
case 4: // PASSWD
return PASSWD;
case 5: // DB
return DB;
case 6: // TABLE
return TABLE;
case 7: // CHARSET
return CHARSET;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CHARSET, new org.apache.thrift.meta_data.FieldMetaData("charset", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TMySQLTable.class, metaDataMap);
}
public TMySQLTable() {
}
public TMySQLTable(
java.lang.String host,
java.lang.String port,
java.lang.String user,
java.lang.String passwd,
java.lang.String db,
java.lang.String table,
java.lang.String charset)
{
this();
this.host = host;
this.port = port;
this.user = user;
this.passwd = passwd;
this.db = db;
this.table = table;
this.charset = charset;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TMySQLTable(TMySQLTable other) {
if (other.isSetHost()) {
this.host = other.host;
}
if (other.isSetPort()) {
this.port = other.port;
}
if (other.isSetUser()) {
this.user = other.user;
}
if (other.isSetPasswd()) {
this.passwd = other.passwd;
}
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTable()) {
this.table = other.table;
}
if (other.isSetCharset()) {
this.charset = other.charset;
}
}
public TMySQLTable deepCopy() {
return new TMySQLTable(this);
}
@Override
public void clear() {
this.host = null;
this.port = null;
this.user = null;
this.passwd = null;
this.db = null;
this.table = null;
this.charset = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getHost() {
return this.host;
}
public TMySQLTable setHost(@org.apache.thrift.annotation.Nullable java.lang.String host) {
this.host = host;
return this;
}
public void unsetHost() {
this.host = null;
}
/** Returns true if field host is set (has been assigned a value) and false otherwise */
public boolean isSetHost() {
return this.host != null;
}
public void setHostIsSet(boolean value) {
if (!value) {
this.host = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPort() {
return this.port;
}
public TMySQLTable setPort(@org.apache.thrift.annotation.Nullable java.lang.String port) {
this.port = port;
return this;
}
public void unsetPort() {
this.port = null;
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean isSetPort() {
return this.port != null;
}
public void setPortIsSet(boolean value) {
if (!value) {
this.port = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getUser() {
return this.user;
}
public TMySQLTable setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) {
this.user = user;
return this;
}
public void unsetUser() {
this.user = null;
}
/** Returns true if field user is set (has been assigned a value) and false otherwise */
public boolean isSetUser() {
return this.user != null;
}
public void setUserIsSet(boolean value) {
if (!value) {
this.user = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPasswd() {
return this.passwd;
}
public TMySQLTable setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) {
this.passwd = passwd;
return this;
}
public void unsetPasswd() {
this.passwd = null;
}
/** Returns true if field passwd is set (has been assigned a value) and false otherwise */
public boolean isSetPasswd() {
return this.passwd != null;
}
public void setPasswdIsSet(boolean value) {
if (!value) {
this.passwd = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public TMySQLTable setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTable() {
return this.table;
}
public TMySQLTable setTable(@org.apache.thrift.annotation.Nullable java.lang.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;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCharset() {
return this.charset;
}
public TMySQLTable setCharset(@org.apache.thrift.annotation.Nullable java.lang.String charset) {
this.charset = charset;
return this;
}
public void unsetCharset() {
this.charset = null;
}
/** Returns true if field charset is set (has been assigned a value) and false otherwise */
public boolean isSetCharset() {
return this.charset != null;
}
public void setCharsetIsSet(boolean value) {
if (!value) {
this.charset = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case HOST:
if (value == null) {
unsetHost();
} else {
setHost((java.lang.String)value);
}
break;
case PORT:
if (value == null) {
unsetPort();
} else {
setPort((java.lang.String)value);
}
break;
case USER:
if (value == null) {
unsetUser();
} else {
setUser((java.lang.String)value);
}
break;
case PASSWD:
if (value == null) {
unsetPasswd();
} else {
setPasswd((java.lang.String)value);
}
break;
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((java.lang.String)value);
}
break;
case CHARSET:
if (value == null) {
unsetCharset();
} else {
setCharset((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOST:
return getHost();
case PORT:
return getPort();
case USER:
return getUser();
case PASSWD:
return getPasswd();
case DB:
return getDb();
case TABLE:
return getTable();
case CHARSET:
return getCharset();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case HOST:
return isSetHost();
case PORT:
return isSetPort();
case USER:
return isSetUser();
case PASSWD:
return isSetPasswd();
case DB:
return isSetDb();
case TABLE:
return isSetTable();
case CHARSET:
return isSetCharset();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TMySQLTable)
return this.equals((TMySQLTable)that);
return false;
}
public boolean equals(TMySQLTable that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_host = true && this.isSetHost();
boolean that_present_host = true && that.isSetHost();
if (this_present_host || that_present_host) {
if (!(this_present_host && that_present_host))
return false;
if (!this.host.equals(that.host))
return false;
}
boolean this_present_port = true && this.isSetPort();
boolean that_present_port = true && that.isSetPort();
if (this_present_port || that_present_port) {
if (!(this_present_port && that_present_port))
return false;
if (!this.port.equals(that.port))
return false;
}
boolean this_present_user = true && this.isSetUser();
boolean that_present_user = true && that.isSetUser();
if (this_present_user || that_present_user) {
if (!(this_present_user && that_present_user))
return false;
if (!this.user.equals(that.user))
return false;
}
boolean this_present_passwd = true && this.isSetPasswd();
boolean that_present_passwd = true && that.isSetPasswd();
if (this_present_passwd || that_present_passwd) {
if (!(this_present_passwd && that_present_passwd))
return false;
if (!this.passwd.equals(that.passwd))
return false;
}
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
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_charset = true && this.isSetCharset();
boolean that_present_charset = true && that.isSetCharset();
if (this_present_charset || that_present_charset) {
if (!(this_present_charset && that_present_charset))
return false;
if (!this.charset.equals(that.charset))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetHost()) ? 131071 : 524287);
if (isSetHost())
hashCode = hashCode * 8191 + host.hashCode();
hashCode = hashCode * 8191 + ((isSetPort()) ? 131071 : 524287);
if (isSetPort())
hashCode = hashCode * 8191 + port.hashCode();
hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
if (isSetUser())
hashCode = hashCode * 8191 + user.hashCode();
hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287);
if (isSetPasswd())
hashCode = hashCode * 8191 + passwd.hashCode();
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
if (isSetTable())
hashCode = hashCode * 8191 + table.hashCode();
hashCode = hashCode * 8191 + ((isSetCharset()) ? 131071 : 524287);
if (isSetCharset())
hashCode = hashCode * 8191 + charset.hashCode();
return hashCode;
}
@Override
public int compareTo(TMySQLTable other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetHost(), other.isSetHost());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHost()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPort(), other.isSetPort());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPort()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUser()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPasswd()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTable(), 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 = java.lang.Boolean.compare(isSetCharset(), other.isSetCharset());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCharset()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.charset, other.charset);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TMySQLTable(");
boolean first = true;
sb.append("host:");
if (this.host == null) {
sb.append("null");
} else {
sb.append(this.host);
}
first = false;
if (!first) sb.append(", ");
sb.append("port:");
if (this.port == null) {
sb.append("null");
} else {
sb.append(this.port);
}
first = false;
if (!first) sb.append(", ");
sb.append("user:");
if (this.user == null) {
sb.append("null");
} else {
sb.append(this.user);
}
first = false;
if (!first) sb.append(", ");
sb.append("passwd:");
if (this.passwd == null) {
sb.append("null");
} else {
sb.append(this.passwd);
}
first = false;
if (!first) sb.append(", ");
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
sb.append(this.table);
}
first = false;
if (!first) sb.append(", ");
sb.append("charset:");
if (this.charset == null) {
sb.append("null");
} else {
sb.append(this.charset);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (host == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'host' was not present! Struct: " + toString());
}
if (port == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'port' was not present! Struct: " + toString());
}
if (user == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' was not present! Struct: " + toString());
}
if (passwd == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'passwd' was not present! Struct: " + toString());
}
if (db == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'db' was not present! Struct: " + toString());
}
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (charset == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'charset' 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, java.lang.ClassNotFoundException {
try {
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 TMySQLTableStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMySQLTableStandardScheme getScheme() {
return new TMySQLTableStandardScheme();
}
}
private static class TMySQLTableStandardScheme extends org.apache.thrift.scheme.StandardScheme<TMySQLTable> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TMySQLTable 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: // HOST
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.host = iprot.readString();
struct.setHostIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PORT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.port = iprot.readString();
struct.setPortIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // USER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.user = iprot.readString();
struct.setUserIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // PASSWD
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.passwd = iprot.readString();
struct.setPasswdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // 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 7: // CHARSET
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.charset = iprot.readString();
struct.setCharsetIsSet(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, TMySQLTable struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.host != null) {
oprot.writeFieldBegin(HOST_FIELD_DESC);
oprot.writeString(struct.host);
oprot.writeFieldEnd();
}
if (struct.port != null) {
oprot.writeFieldBegin(PORT_FIELD_DESC);
oprot.writeString(struct.port);
oprot.writeFieldEnd();
}
if (struct.user != null) {
oprot.writeFieldBegin(USER_FIELD_DESC);
oprot.writeString(struct.user);
oprot.writeFieldEnd();
}
if (struct.passwd != null) {
oprot.writeFieldBegin(PASSWD_FIELD_DESC);
oprot.writeString(struct.passwd);
oprot.writeFieldEnd();
}
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeString(struct.table);
oprot.writeFieldEnd();
}
if (struct.charset != null) {
oprot.writeFieldBegin(CHARSET_FIELD_DESC);
oprot.writeString(struct.charset);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TMySQLTableTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMySQLTableTupleScheme getScheme() {
return new TMySQLTableTupleScheme();
}
}
private static class TMySQLTableTupleScheme extends org.apache.thrift.scheme.TupleScheme<TMySQLTable> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TMySQLTable struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.host);
oprot.writeString(struct.port);
oprot.writeString(struct.user);
oprot.writeString(struct.passwd);
oprot.writeString(struct.db);
oprot.writeString(struct.table);
oprot.writeString(struct.charset);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TMySQLTable struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.host = iprot.readString();
struct.setHostIsSet(true);
struct.port = iprot.readString();
struct.setPortIsSet(true);
struct.user = iprot.readString();
struct.setUserIsSet(true);
struct.passwd = iprot.readString();
struct.setPasswdIsSet(true);
struct.db = iprot.readString();
struct.setDbIsSet(true);
struct.table = iprot.readString();
struct.setTableIsSet(true);
struct.charset = iprot.readString();
struct.setCharsetIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}