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

com.databricks.jdbc.client.impl.thrift.generated.TSQLVariable Maven / Gradle / Ivy

There is a newer version: 2.6.40-patch-1
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.19.0)
 *
 * 

DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * * @generated */ package com.databricks.jdbc.client.impl.thrift.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) @javax.annotation.Generated( value = "Autogenerated by Thrift Compiler (0.19.0)", date = "2024-05-06") public class TSQLVariable 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("TSQLVariable"); private static final org.apache.thrift.protocol.TField CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField( "catalogName", org.apache.thrift.protocol.TType.STRING, (short) 1); private static final org.apache.thrift.protocol.TField SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField( "schemaName", org.apache.thrift.protocol.TType.STRING, (short) 2); private static final org.apache.thrift.protocol.TField VARIABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField( "variableName", org.apache.thrift.protocol.TType.STRING, (short) 3); private static final org.apache.thrift.protocol.TField DEFAULT_EXPRESSION_SQL_FIELD_DESC = new org.apache.thrift.protocol.TField( "defaultExpressionSQL", org.apache.thrift.protocol.TType.STRING, (short) 4); private static final org.apache.thrift.protocol.TField VARIABLE_DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField( "variableDataType", org.apache.thrift.protocol.TType.STRING, (short) 5); private static final org.apache.thrift.protocol.TField CURRENT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField( "currentValue", org.apache.thrift.protocol.TType.STRING, (short) 6); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQLVariableStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQLVariableTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String catalogName; // optional public @org.apache.thrift.annotation.Nullable java.lang.String schemaName; // optional public @org.apache.thrift.annotation.Nullable java.lang.String variableName; // optional public @org.apache.thrift.annotation.Nullable java.lang.String defaultExpressionSQL; // optional public @org.apache.thrift.annotation.Nullable java.lang.String variableDataType; // optional public @org.apache.thrift.annotation.Nullable java.lang.String currentValue; // 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 { CATALOG_NAME((short) 1, "catalogName"), SCHEMA_NAME((short) 2, "schemaName"), VARIABLE_NAME((short) 3, "variableName"), DEFAULT_EXPRESSION_SQL((short) 4, "defaultExpressionSQL"), VARIABLE_DATA_TYPE((short) 5, "variableDataType"), CURRENT_VALUE((short) 6, "currentValue"); private static final java.util.Map byName = new java.util.HashMap(); 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: // CATALOG_NAME return CATALOG_NAME; case 2: // SCHEMA_NAME return SCHEMA_NAME; case 3: // VARIABLE_NAME return VARIABLE_NAME; case 4: // DEFAULT_EXPRESSION_SQL return DEFAULT_EXPRESSION_SQL; case 5: // VARIABLE_DATA_TYPE return VARIABLE_DATA_TYPE; case 6: // CURRENT_VALUE return CURRENT_VALUE; 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; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = { _Fields.CATALOG_NAME, _Fields.SCHEMA_NAME, _Fields.VARIABLE_NAME, _Fields.DEFAULT_EXPRESSION_SQL, _Fields.VARIABLE_DATA_TYPE, _Fields.CURRENT_VALUE }; 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.CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData( "catalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData( org.apache.thrift.protocol.TType.STRING, "TIdentifier"))); tmpMap.put( _Fields.SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData( "schemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData( org.apache.thrift.protocol.TType.STRING, "TIdentifier"))); tmpMap.put( _Fields.VARIABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData( "variableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData( org.apache.thrift.protocol.TType.STRING, "TIdentifier"))); tmpMap.put( _Fields.DEFAULT_EXPRESSION_SQL, new org.apache.thrift.meta_data.FieldMetaData( "defaultExpressionSQL", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData( org.apache.thrift.protocol.TType.STRING))); tmpMap.put( _Fields.VARIABLE_DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData( "variableDataType", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData( org.apache.thrift.protocol.TType.STRING))); tmpMap.put( _Fields.CURRENT_VALUE, new org.apache.thrift.meta_data.FieldMetaData( "currentValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, 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(TSQLVariable.class, metaDataMap); } public TSQLVariable() {} /** Performs a deep copy on other. */ public TSQLVariable(TSQLVariable other) { if (other.isSetCatalogName()) { this.catalogName = other.catalogName; } if (other.isSetSchemaName()) { this.schemaName = other.schemaName; } if (other.isSetVariableName()) { this.variableName = other.variableName; } if (other.isSetDefaultExpressionSQL()) { this.defaultExpressionSQL = other.defaultExpressionSQL; } if (other.isSetVariableDataType()) { this.variableDataType = other.variableDataType; } if (other.isSetCurrentValue()) { this.currentValue = other.currentValue; } } @Override public TSQLVariable deepCopy() { return new TSQLVariable(this); } @Override public void clear() { this.catalogName = null; this.schemaName = null; this.variableName = null; this.defaultExpressionSQL = null; this.variableDataType = null; this.currentValue = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getCatalogName() { return this.catalogName; } public TSQLVariable setCatalogName( @org.apache.thrift.annotation.Nullable java.lang.String catalogName) { this.catalogName = catalogName; return this; } public void unsetCatalogName() { this.catalogName = null; } /** Returns true if field catalogName is set (has been assigned a value) and false otherwise */ public boolean isSetCatalogName() { return this.catalogName != null; } public void setCatalogNameIsSet(boolean value) { if (!value) { this.catalogName = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getSchemaName() { return this.schemaName; } public TSQLVariable setSchemaName( @org.apache.thrift.annotation.Nullable java.lang.String schemaName) { this.schemaName = schemaName; return this; } public void unsetSchemaName() { this.schemaName = null; } /** Returns true if field schemaName is set (has been assigned a value) and false otherwise */ public boolean isSetSchemaName() { return this.schemaName != null; } public void setSchemaNameIsSet(boolean value) { if (!value) { this.schemaName = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getVariableName() { return this.variableName; } public TSQLVariable setVariableName( @org.apache.thrift.annotation.Nullable java.lang.String variableName) { this.variableName = variableName; return this; } public void unsetVariableName() { this.variableName = null; } /** Returns true if field variableName is set (has been assigned a value) and false otherwise */ public boolean isSetVariableName() { return this.variableName != null; } public void setVariableNameIsSet(boolean value) { if (!value) { this.variableName = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDefaultExpressionSQL() { return this.defaultExpressionSQL; } public TSQLVariable setDefaultExpressionSQL( @org.apache.thrift.annotation.Nullable java.lang.String defaultExpressionSQL) { this.defaultExpressionSQL = defaultExpressionSQL; return this; } public void unsetDefaultExpressionSQL() { this.defaultExpressionSQL = null; } /** * Returns true if field defaultExpressionSQL is set (has been assigned a value) and false * otherwise */ public boolean isSetDefaultExpressionSQL() { return this.defaultExpressionSQL != null; } public void setDefaultExpressionSQLIsSet(boolean value) { if (!value) { this.defaultExpressionSQL = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getVariableDataType() { return this.variableDataType; } public TSQLVariable setVariableDataType( @org.apache.thrift.annotation.Nullable java.lang.String variableDataType) { this.variableDataType = variableDataType; return this; } public void unsetVariableDataType() { this.variableDataType = null; } /** * Returns true if field variableDataType is set (has been assigned a value) and false otherwise */ public boolean isSetVariableDataType() { return this.variableDataType != null; } public void setVariableDataTypeIsSet(boolean value) { if (!value) { this.variableDataType = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getCurrentValue() { return this.currentValue; } public TSQLVariable setCurrentValue( @org.apache.thrift.annotation.Nullable java.lang.String currentValue) { this.currentValue = currentValue; return this; } public void unsetCurrentValue() { this.currentValue = null; } /** Returns true if field currentValue is set (has been assigned a value) and false otherwise */ public boolean isSetCurrentValue() { return this.currentValue != null; } public void setCurrentValueIsSet(boolean value) { if (!value) { this.currentValue = null; } } @Override public void setFieldValue( _Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case CATALOG_NAME: if (value == null) { unsetCatalogName(); } else { setCatalogName((java.lang.String) value); } break; case SCHEMA_NAME: if (value == null) { unsetSchemaName(); } else { setSchemaName((java.lang.String) value); } break; case VARIABLE_NAME: if (value == null) { unsetVariableName(); } else { setVariableName((java.lang.String) value); } break; case DEFAULT_EXPRESSION_SQL: if (value == null) { unsetDefaultExpressionSQL(); } else { setDefaultExpressionSQL((java.lang.String) value); } break; case VARIABLE_DATA_TYPE: if (value == null) { unsetVariableDataType(); } else { setVariableDataType((java.lang.String) value); } break; case CURRENT_VALUE: if (value == null) { unsetCurrentValue(); } else { setCurrentValue((java.lang.String) value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case CATALOG_NAME: return getCatalogName(); case SCHEMA_NAME: return getSchemaName(); case VARIABLE_NAME: return getVariableName(); case DEFAULT_EXPRESSION_SQL: return getDefaultExpressionSQL(); case VARIABLE_DATA_TYPE: return getVariableDataType(); case CURRENT_VALUE: return getCurrentValue(); } throw new java.lang.IllegalStateException(); } /** * Returns true if field corresponding to fieldID is set (has been assigned a value) and false * otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case CATALOG_NAME: return isSetCatalogName(); case SCHEMA_NAME: return isSetSchemaName(); case VARIABLE_NAME: return isSetVariableName(); case DEFAULT_EXPRESSION_SQL: return isSetDefaultExpressionSQL(); case VARIABLE_DATA_TYPE: return isSetVariableDataType(); case CURRENT_VALUE: return isSetCurrentValue(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof TSQLVariable) return this.equals((TSQLVariable) that); return false; } public boolean equals(TSQLVariable that) { if (that == null) return false; if (this == that) return true; boolean this_present_catalogName = true && this.isSetCatalogName(); boolean that_present_catalogName = true && that.isSetCatalogName(); if (this_present_catalogName || that_present_catalogName) { if (!(this_present_catalogName && that_present_catalogName)) return false; if (!this.catalogName.equals(that.catalogName)) return false; } boolean this_present_schemaName = true && this.isSetSchemaName(); boolean that_present_schemaName = true && that.isSetSchemaName(); if (this_present_schemaName || that_present_schemaName) { if (!(this_present_schemaName && that_present_schemaName)) return false; if (!this.schemaName.equals(that.schemaName)) return false; } boolean this_present_variableName = true && this.isSetVariableName(); boolean that_present_variableName = true && that.isSetVariableName(); if (this_present_variableName || that_present_variableName) { if (!(this_present_variableName && that_present_variableName)) return false; if (!this.variableName.equals(that.variableName)) return false; } boolean this_present_defaultExpressionSQL = true && this.isSetDefaultExpressionSQL(); boolean that_present_defaultExpressionSQL = true && that.isSetDefaultExpressionSQL(); if (this_present_defaultExpressionSQL || that_present_defaultExpressionSQL) { if (!(this_present_defaultExpressionSQL && that_present_defaultExpressionSQL)) return false; if (!this.defaultExpressionSQL.equals(that.defaultExpressionSQL)) return false; } boolean this_present_variableDataType = true && this.isSetVariableDataType(); boolean that_present_variableDataType = true && that.isSetVariableDataType(); if (this_present_variableDataType || that_present_variableDataType) { if (!(this_present_variableDataType && that_present_variableDataType)) return false; if (!this.variableDataType.equals(that.variableDataType)) return false; } boolean this_present_currentValue = true && this.isSetCurrentValue(); boolean that_present_currentValue = true && that.isSetCurrentValue(); if (this_present_currentValue || that_present_currentValue) { if (!(this_present_currentValue && that_present_currentValue)) return false; if (!this.currentValue.equals(that.currentValue)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetCatalogName()) ? 131071 : 524287); if (isSetCatalogName()) hashCode = hashCode * 8191 + catalogName.hashCode(); hashCode = hashCode * 8191 + ((isSetSchemaName()) ? 131071 : 524287); if (isSetSchemaName()) hashCode = hashCode * 8191 + schemaName.hashCode(); hashCode = hashCode * 8191 + ((isSetVariableName()) ? 131071 : 524287); if (isSetVariableName()) hashCode = hashCode * 8191 + variableName.hashCode(); hashCode = hashCode * 8191 + ((isSetDefaultExpressionSQL()) ? 131071 : 524287); if (isSetDefaultExpressionSQL()) hashCode = hashCode * 8191 + defaultExpressionSQL.hashCode(); hashCode = hashCode * 8191 + ((isSetVariableDataType()) ? 131071 : 524287); if (isSetVariableDataType()) hashCode = hashCode * 8191 + variableDataType.hashCode(); hashCode = hashCode * 8191 + ((isSetCurrentValue()) ? 131071 : 524287); if (isSetCurrentValue()) hashCode = hashCode * 8191 + currentValue.hashCode(); return hashCode; } @Override public int compareTo(TSQLVariable other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetCatalogName(), other.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSchemaName(), other.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetVariableName(), other.isSetVariableName()); if (lastComparison != 0) { return lastComparison; } if (isSetVariableName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.variableName, other.variableName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDefaultExpressionSQL(), other.isSetDefaultExpressionSQL()); if (lastComparison != 0) { return lastComparison; } if (isSetDefaultExpressionSQL()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.defaultExpressionSQL, other.defaultExpressionSQL); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetVariableDataType(), other.isSetVariableDataType()); if (lastComparison != 0) { return lastComparison; } if (isSetVariableDataType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.variableDataType, other.variableDataType); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCurrentValue(), other.isSetCurrentValue()); if (lastComparison != 0) { return lastComparison; } if (isSetCurrentValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentValue, other.currentValue); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override 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("TSQLVariable("); boolean first = true; if (isSetCatalogName()) { sb.append("catalogName:"); if (this.catalogName == null) { sb.append("null"); } else { sb.append(this.catalogName); } first = false; } if (isSetSchemaName()) { if (!first) sb.append(", "); sb.append("schemaName:"); if (this.schemaName == null) { sb.append("null"); } else { sb.append(this.schemaName); } first = false; } if (isSetVariableName()) { if (!first) sb.append(", "); sb.append("variableName:"); if (this.variableName == null) { sb.append("null"); } else { sb.append(this.variableName); } first = false; } if (isSetDefaultExpressionSQL()) { if (!first) sb.append(", "); sb.append("defaultExpressionSQL:"); if (this.defaultExpressionSQL == null) { sb.append("null"); } else { sb.append(this.defaultExpressionSQL); } first = false; } if (isSetVariableDataType()) { if (!first) sb.append(", "); sb.append("variableDataType:"); if (this.variableDataType == null) { sb.append("null"); } else { sb.append(this.variableDataType); } first = false; } if (isSetCurrentValue()) { if (!first) sb.append(", "); sb.append("currentValue:"); if (this.currentValue == null) { sb.append("null"); } else { sb.append(this.currentValue); } 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 TSQLVariableStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public TSQLVariableStandardScheme getScheme() { return new TSQLVariableStandardScheme(); } } private static class TSQLVariableStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TSQLVariable 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: // CATALOG_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.catalogName = iprot.readString(); struct.setCatalogNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SCHEMA_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.schemaName = iprot.readString(); struct.setSchemaNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // VARIABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.variableName = iprot.readString(); struct.setVariableNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DEFAULT_EXPRESSION_SQL if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.defaultExpressionSQL = iprot.readString(); struct.setDefaultExpressionSQLIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // VARIABLE_DATA_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.variableDataType = iprot.readString(); struct.setVariableDataTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // CURRENT_VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.currentValue = iprot.readString(); struct.setCurrentValueIsSet(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(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TSQLVariable struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.catalogName != null) { if (struct.isSetCatalogName()) { oprot.writeFieldBegin(CATALOG_NAME_FIELD_DESC); oprot.writeString(struct.catalogName); oprot.writeFieldEnd(); } } if (struct.schemaName != null) { if (struct.isSetSchemaName()) { oprot.writeFieldBegin(SCHEMA_NAME_FIELD_DESC); oprot.writeString(struct.schemaName); oprot.writeFieldEnd(); } } if (struct.variableName != null) { if (struct.isSetVariableName()) { oprot.writeFieldBegin(VARIABLE_NAME_FIELD_DESC); oprot.writeString(struct.variableName); oprot.writeFieldEnd(); } } if (struct.defaultExpressionSQL != null) { if (struct.isSetDefaultExpressionSQL()) { oprot.writeFieldBegin(DEFAULT_EXPRESSION_SQL_FIELD_DESC); oprot.writeString(struct.defaultExpressionSQL); oprot.writeFieldEnd(); } } if (struct.variableDataType != null) { if (struct.isSetVariableDataType()) { oprot.writeFieldBegin(VARIABLE_DATA_TYPE_FIELD_DESC); oprot.writeString(struct.variableDataType); oprot.writeFieldEnd(); } } if (struct.currentValue != null) { if (struct.isSetCurrentValue()) { oprot.writeFieldBegin(CURRENT_VALUE_FIELD_DESC); oprot.writeString(struct.currentValue); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TSQLVariableTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public TSQLVariableTupleScheme getScheme() { return new TSQLVariableTupleScheme(); } } private static class TSQLVariableTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TSQLVariable 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.isSetCatalogName()) { optionals.set(0); } if (struct.isSetSchemaName()) { optionals.set(1); } if (struct.isSetVariableName()) { optionals.set(2); } if (struct.isSetDefaultExpressionSQL()) { optionals.set(3); } if (struct.isSetVariableDataType()) { optionals.set(4); } if (struct.isSetCurrentValue()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetCatalogName()) { oprot.writeString(struct.catalogName); } if (struct.isSetSchemaName()) { oprot.writeString(struct.schemaName); } if (struct.isSetVariableName()) { oprot.writeString(struct.variableName); } if (struct.isSetDefaultExpressionSQL()) { oprot.writeString(struct.defaultExpressionSQL); } if (struct.isSetVariableDataType()) { oprot.writeString(struct.variableDataType); } if (struct.isSetCurrentValue()) { oprot.writeString(struct.currentValue); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TSQLVariable struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.catalogName = iprot.readString(); struct.setCatalogNameIsSet(true); } if (incoming.get(1)) { struct.schemaName = iprot.readString(); struct.setSchemaNameIsSet(true); } if (incoming.get(2)) { struct.variableName = iprot.readString(); struct.setVariableNameIsSet(true); } if (incoming.get(3)) { struct.defaultExpressionSQL = iprot.readString(); struct.setDefaultExpressionSQLIsSet(true); } if (incoming.get(4)) { struct.variableDataType = iprot.readString(); struct.setVariableDataTypeIsSet(true); } if (incoming.get(5)) { struct.currentValue = iprot.readString(); struct.setCurrentValueIsSet(true); } } } private static 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(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy