TGetDbsResult.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-20")
public class TGetDbsResult implements org.apache.thrift.TBase<TGetDbsResult, TGetDbsResult._Fields>, java.io.Serializable, Cloneable, Comparable<TGetDbsResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetDbsResult");
private static final org.apache.thrift.protocol.TField DBS_FIELD_DESC = new org.apache.thrift.protocol.TField("dbs", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField CATALOGS_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogs", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField DB_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("db_ids", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField CATALOG_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("catalog_ids", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TGetDbsResultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TGetDbsResultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> dbs; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> catalogs; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> db_ids; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> catalog_ids; // 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 {
DBS((short)1, "dbs"),
CATALOGS((short)2, "catalogs"),
DB_IDS((short)3, "db_ids"),
CATALOG_IDS((short)4, "catalog_ids");
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: // DBS
return DBS;
case 2: // CATALOGS
return CATALOGS;
case 3: // DB_IDS
return DB_IDS;
case 4: // CATALOG_IDS
return CATALOG_IDS;
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
private static final _Fields optionals[] = {_Fields.DBS,_Fields.CATALOGS,_Fields.DB_IDS,_Fields.CATALOG_IDS};
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.DBS, new org.apache.thrift.meta_data.FieldMetaData("dbs", 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.CATALOGS, new org.apache.thrift.meta_data.FieldMetaData("catalogs", 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.DB_IDS, new org.apache.thrift.meta_data.FieldMetaData("db_ids", 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.I64))));
tmpMap.put(_Fields.CATALOG_IDS, new org.apache.thrift.meta_data.FieldMetaData("catalog_ids", 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.I64))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetDbsResult.class, metaDataMap);
}
public TGetDbsResult() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TGetDbsResult(TGetDbsResult other) {
if (other.isSetDbs()) {
java.util.List<java.lang.String> __this__dbs = new java.util.ArrayList<java.lang.String>(other.dbs);
this.dbs = __this__dbs;
}
if (other.isSetCatalogs()) {
java.util.List<java.lang.String> __this__catalogs = new java.util.ArrayList<java.lang.String>(other.catalogs);
this.catalogs = __this__catalogs;
}
if (other.isSetDbIds()) {
java.util.List<java.lang.Long> __this__db_ids = new java.util.ArrayList<java.lang.Long>(other.db_ids);
this.db_ids = __this__db_ids;
}
if (other.isSetCatalogIds()) {
java.util.List<java.lang.Long> __this__catalog_ids = new java.util.ArrayList<java.lang.Long>(other.catalog_ids);
this.catalog_ids = __this__catalog_ids;
}
}
public TGetDbsResult deepCopy() {
return new TGetDbsResult(this);
}
@Override
public void clear() {
this.dbs = null;
this.catalogs = null;
this.db_ids = null;
this.catalog_ids = null;
}
public int getDbsSize() {
return (this.dbs == null) ? 0 : this.dbs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getDbsIterator() {
return (this.dbs == null) ? null : this.dbs.iterator();
}
public void addToDbs(java.lang.String elem) {
if (this.dbs == null) {
this.dbs = new java.util.ArrayList<java.lang.String>();
}
this.dbs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getDbs() {
return this.dbs;
}
public TGetDbsResult setDbs(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> dbs) {
this.dbs = dbs;
return this;
}
public void unsetDbs() {
this.dbs = null;
}
/** Returns true if field dbs is set (has been assigned a value) and false otherwise */
public boolean isSetDbs() {
return this.dbs != null;
}
public void setDbsIsSet(boolean value) {
if (!value) {
this.dbs = null;
}
}
public int getCatalogsSize() {
return (this.catalogs == null) ? 0 : this.catalogs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getCatalogsIterator() {
return (this.catalogs == null) ? null : this.catalogs.iterator();
}
public void addToCatalogs(java.lang.String elem) {
if (this.catalogs == null) {
this.catalogs = new java.util.ArrayList<java.lang.String>();
}
this.catalogs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getCatalogs() {
return this.catalogs;
}
public TGetDbsResult setCatalogs(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> catalogs) {
this.catalogs = catalogs;
return this;
}
public void unsetCatalogs() {
this.catalogs = null;
}
/** Returns true if field catalogs is set (has been assigned a value) and false otherwise */
public boolean isSetCatalogs() {
return this.catalogs != null;
}
public void setCatalogsIsSet(boolean value) {
if (!value) {
this.catalogs = null;
}
}
public int getDbIdsSize() {
return (this.db_ids == null) ? 0 : this.db_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getDbIdsIterator() {
return (this.db_ids == null) ? null : this.db_ids.iterator();
}
public void addToDbIds(long elem) {
if (this.db_ids == null) {
this.db_ids = new java.util.ArrayList<java.lang.Long>();
}
this.db_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getDbIds() {
return this.db_ids;
}
public TGetDbsResult setDbIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> db_ids) {
this.db_ids = db_ids;
return this;
}
public void unsetDbIds() {
this.db_ids = null;
}
/** Returns true if field db_ids is set (has been assigned a value) and false otherwise */
public boolean isSetDbIds() {
return this.db_ids != null;
}
public void setDbIdsIsSet(boolean value) {
if (!value) {
this.db_ids = null;
}
}
public int getCatalogIdsSize() {
return (this.catalog_ids == null) ? 0 : this.catalog_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getCatalogIdsIterator() {
return (this.catalog_ids == null) ? null : this.catalog_ids.iterator();
}
public void addToCatalogIds(long elem) {
if (this.catalog_ids == null) {
this.catalog_ids = new java.util.ArrayList<java.lang.Long>();
}
this.catalog_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getCatalogIds() {
return this.catalog_ids;
}
public TGetDbsResult setCatalogIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> catalog_ids) {
this.catalog_ids = catalog_ids;
return this;
}
public void unsetCatalogIds() {
this.catalog_ids = null;
}
/** Returns true if field catalog_ids is set (has been assigned a value) and false otherwise */
public boolean isSetCatalogIds() {
return this.catalog_ids != null;
}
public void setCatalogIdsIsSet(boolean value) {
if (!value) {
this.catalog_ids = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DBS:
if (value == null) {
unsetDbs();
} else {
setDbs((java.util.List<java.lang.String>)value);
}
break;
case CATALOGS:
if (value == null) {
unsetCatalogs();
} else {
setCatalogs((java.util.List<java.lang.String>)value);
}
break;
case DB_IDS:
if (value == null) {
unsetDbIds();
} else {
setDbIds((java.util.List<java.lang.Long>)value);
}
break;
case CATALOG_IDS:
if (value == null) {
unsetCatalogIds();
} else {
setCatalogIds((java.util.List<java.lang.Long>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DBS:
return getDbs();
case CATALOGS:
return getCatalogs();
case DB_IDS:
return getDbIds();
case CATALOG_IDS:
return getCatalogIds();
}
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 DBS:
return isSetDbs();
case CATALOGS:
return isSetCatalogs();
case DB_IDS:
return isSetDbIds();
case CATALOG_IDS:
return isSetCatalogIds();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TGetDbsResult)
return this.equals((TGetDbsResult)that);
return false;
}
public boolean equals(TGetDbsResult that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_dbs = true && this.isSetDbs();
boolean that_present_dbs = true && that.isSetDbs();
if (this_present_dbs || that_present_dbs) {
if (!(this_present_dbs && that_present_dbs))
return false;
if (!this.dbs.equals(that.dbs))
return false;
}
boolean this_present_catalogs = true && this.isSetCatalogs();
boolean that_present_catalogs = true && that.isSetCatalogs();
if (this_present_catalogs || that_present_catalogs) {
if (!(this_present_catalogs && that_present_catalogs))
return false;
if (!this.catalogs.equals(that.catalogs))
return false;
}
boolean this_present_db_ids = true && this.isSetDbIds();
boolean that_present_db_ids = true && that.isSetDbIds();
if (this_present_db_ids || that_present_db_ids) {
if (!(this_present_db_ids && that_present_db_ids))
return false;
if (!this.db_ids.equals(that.db_ids))
return false;
}
boolean this_present_catalog_ids = true && this.isSetCatalogIds();
boolean that_present_catalog_ids = true && that.isSetCatalogIds();
if (this_present_catalog_ids || that_present_catalog_ids) {
if (!(this_present_catalog_ids && that_present_catalog_ids))
return false;
if (!this.catalog_ids.equals(that.catalog_ids))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDbs()) ? 131071 : 524287);
if (isSetDbs())
hashCode = hashCode * 8191 + dbs.hashCode();
hashCode = hashCode * 8191 + ((isSetCatalogs()) ? 131071 : 524287);
if (isSetCatalogs())
hashCode = hashCode * 8191 + catalogs.hashCode();
hashCode = hashCode * 8191 + ((isSetDbIds()) ? 131071 : 524287);
if (isSetDbIds())
hashCode = hashCode * 8191 + db_ids.hashCode();
hashCode = hashCode * 8191 + ((isSetCatalogIds()) ? 131071 : 524287);
if (isSetCatalogIds())
hashCode = hashCode * 8191 + catalog_ids.hashCode();
return hashCode;
}
@Override
public int compareTo(TGetDbsResult other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetDbs(), other.isSetDbs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDbs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbs, other.dbs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCatalogs(), other.isSetCatalogs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCatalogs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogs, other.catalogs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDbIds(), other.isSetDbIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDbIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_ids, other.db_ids);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCatalogIds(), other.isSetCatalogIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCatalogIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalog_ids, other.catalog_ids);
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("TGetDbsResult(");
boolean first = true;
if (isSetDbs()) {
sb.append("dbs:");
if (this.dbs == null) {
sb.append("null");
} else {
sb.append(this.dbs);
}
first = false;
}
if (isSetCatalogs()) {
if (!first) sb.append(", ");
sb.append("catalogs:");
if (this.catalogs == null) {
sb.append("null");
} else {
sb.append(this.catalogs);
}
first = false;
}
if (isSetDbIds()) {
if (!first) sb.append(", ");
sb.append("db_ids:");
if (this.db_ids == null) {
sb.append("null");
} else {
sb.append(this.db_ids);
}
first = false;
}
if (isSetCatalogIds()) {
if (!first) sb.append(", ");
sb.append("catalog_ids:");
if (this.catalog_ids == null) {
sb.append("null");
} else {
sb.append(this.catalog_ids);
}
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, 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 TGetDbsResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetDbsResultStandardScheme getScheme() {
return new TGetDbsResultStandardScheme();
}
}
private static class TGetDbsResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetDbsResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetDbsResult 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: // DBS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
struct.dbs = new java.util.ArrayList<java.lang.String>(_list64.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem65;
for (int _i66 = 0; _i66 < _list64.size; ++_i66)
{
_elem65 = iprot.readString();
struct.dbs.add(_elem65);
}
iprot.readListEnd();
}
struct.setDbsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // CATALOGS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list67 = iprot.readListBegin();
struct.catalogs = new java.util.ArrayList<java.lang.String>(_list67.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem68;
for (int _i69 = 0; _i69 < _list67.size; ++_i69)
{
_elem68 = iprot.readString();
struct.catalogs.add(_elem68);
}
iprot.readListEnd();
}
struct.setCatalogsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DB_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
struct.db_ids = new java.util.ArrayList<java.lang.Long>(_list70.size);
long _elem71;
for (int _i72 = 0; _i72 < _list70.size; ++_i72)
{
_elem71 = iprot.readI64();
struct.db_ids.add(_elem71);
}
iprot.readListEnd();
}
struct.setDbIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // CATALOG_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list73 = iprot.readListBegin();
struct.catalog_ids = new java.util.ArrayList<java.lang.Long>(_list73.size);
long _elem74;
for (int _i75 = 0; _i75 < _list73.size; ++_i75)
{
_elem74 = iprot.readI64();
struct.catalog_ids.add(_elem74);
}
iprot.readListEnd();
}
struct.setCatalogIdsIsSet(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, TGetDbsResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.dbs != null) {
if (struct.isSetDbs()) {
oprot.writeFieldBegin(DBS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.dbs.size()));
for (java.lang.String _iter76 : struct.dbs)
{
oprot.writeString(_iter76);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.catalogs != null) {
if (struct.isSetCatalogs()) {
oprot.writeFieldBegin(CATALOGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.catalogs.size()));
for (java.lang.String _iter77 : struct.catalogs)
{
oprot.writeString(_iter77);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.db_ids != null) {
if (struct.isSetDbIds()) {
oprot.writeFieldBegin(DB_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.db_ids.size()));
for (long _iter78 : struct.db_ids)
{
oprot.writeI64(_iter78);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.catalog_ids != null) {
if (struct.isSetCatalogIds()) {
oprot.writeFieldBegin(CATALOG_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.catalog_ids.size()));
for (long _iter79 : struct.catalog_ids)
{
oprot.writeI64(_iter79);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetDbsResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetDbsResultTupleScheme getScheme() {
return new TGetDbsResultTupleScheme();
}
}
private static class TGetDbsResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetDbsResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetDbsResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDbs()) {
optionals.set(0);
}
if (struct.isSetCatalogs()) {
optionals.set(1);
}
if (struct.isSetDbIds()) {
optionals.set(2);
}
if (struct.isSetCatalogIds()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetDbs()) {
{
oprot.writeI32(struct.dbs.size());
for (java.lang.String _iter80 : struct.dbs)
{
oprot.writeString(_iter80);
}
}
}
if (struct.isSetCatalogs()) {
{
oprot.writeI32(struct.catalogs.size());
for (java.lang.String _iter81 : struct.catalogs)
{
oprot.writeString(_iter81);
}
}
}
if (struct.isSetDbIds()) {
{
oprot.writeI32(struct.db_ids.size());
for (long _iter82 : struct.db_ids)
{
oprot.writeI64(_iter82);
}
}
}
if (struct.isSetCatalogIds()) {
{
oprot.writeI32(struct.catalog_ids.size());
for (long _iter83 : struct.catalog_ids)
{
oprot.writeI64(_iter83);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetDbsResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list84 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.dbs = new java.util.ArrayList<java.lang.String>(_list84.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem85;
for (int _i86 = 0; _i86 < _list84.size; ++_i86)
{
_elem85 = iprot.readString();
struct.dbs.add(_elem85);
}
}
struct.setDbsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.catalogs = new java.util.ArrayList<java.lang.String>(_list87.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem88;
for (int _i89 = 0; _i89 < _list87.size; ++_i89)
{
_elem88 = iprot.readString();
struct.catalogs.add(_elem88);
}
}
struct.setCatalogsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list90 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.db_ids = new java.util.ArrayList<java.lang.Long>(_list90.size);
long _elem91;
for (int _i92 = 0; _i92 < _list90.size; ++_i92)
{
_elem91 = iprot.readI64();
struct.db_ids.add(_elem91);
}
}
struct.setDbIdsIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list93 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.catalog_ids = new java.util.ArrayList<java.lang.Long>(_list93.size);
long _elem94;
for (int _i95 = 0; _i95 < _list93.size; ++_i95)
{
_elem94 = iprot.readI64();
struct.catalog_ids.add(_elem94);
}
}
struct.setCatalogIdsIsSet(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();
}
}