io.snappydata.thrift.CatalogStorage Maven / Gradle / Ivy
/**
* 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 CatalogStorage 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("CatalogStorage");
private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)1);
private static final org.apache.thrift.protocol.TField COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("compressed", org.apache.thrift.protocol.TType.BOOL, (short)2);
private static final org.apache.thrift.protocol.TField LOCATION_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("locationUri", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField INPUT_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("inputFormat", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField OUTPUT_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFormat", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField SERDE_FIELD_DESC = new org.apache.thrift.protocol.TField("serde", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new CatalogStorageStandardSchemeFactory());
schemes.put(TupleScheme.class, new CatalogStorageTupleSchemeFactory());
}
public Map properties; // required
public boolean compressed; // required
public String locationUri; // optional
public String inputFormat; // optional
public String outputFormat; // optional
public String serde; // 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 {
PROPERTIES((short)1, "properties"),
COMPRESSED((short)2, "compressed"),
LOCATION_URI((short)3, "locationUri"),
INPUT_FORMAT((short)4, "inputFormat"),
OUTPUT_FORMAT((short)5, "outputFormat"),
SERDE((short)6, "serde");
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: // PROPERTIES
return PROPERTIES;
case 2: // COMPRESSED
return COMPRESSED;
case 3: // LOCATION_URI
return LOCATION_URI;
case 4: // INPUT_FORMAT
return INPUT_FORMAT;
case 5: // OUTPUT_FORMAT
return OUTPUT_FORMAT;
case 6: // SERDE
return SERDE;
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 __COMPRESSED_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.LOCATION_URI,_Fields.INPUT_FORMAT,_Fields.OUTPUT_FORMAT,_Fields.SERDE};
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.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("compressed", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.LOCATION_URI, new org.apache.thrift.meta_data.FieldMetaData("locationUri", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.INPUT_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("inputFormat", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OUTPUT_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("outputFormat", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SERDE, new org.apache.thrift.meta_data.FieldMetaData("serde", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CatalogStorage.class, metaDataMap);
}
public CatalogStorage() {
}
public CatalogStorage(
Map properties,
boolean compressed)
{
this();
this.properties = properties;
this.compressed = compressed;
setCompressedIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public CatalogStorage(CatalogStorage other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetProperties()) {
Map __this__properties = new HashMap(other.properties);
this.properties = __this__properties;
}
this.compressed = other.compressed;
if (other.isSetLocationUri()) {
this.locationUri = other.locationUri;
}
if (other.isSetInputFormat()) {
this.inputFormat = other.inputFormat;
}
if (other.isSetOutputFormat()) {
this.outputFormat = other.outputFormat;
}
if (other.isSetSerde()) {
this.serde = other.serde;
}
}
public CatalogStorage deepCopy() {
return new CatalogStorage(this);
}
@Override
public void clear() {
this.properties = null;
setCompressedIsSet(false);
this.compressed = false;
this.locationUri = null;
this.inputFormat = null;
this.outputFormat = null;
this.serde = null;
}
public int getPropertiesSize() {
return (this.properties == null) ? 0 : this.properties.size();
}
public void putToProperties(String key, String val) {
if (this.properties == null) {
this.properties = new HashMap();
}
this.properties.put(key, val);
}
public Map getProperties() {
return this.properties;
}
public CatalogStorage setProperties(Map properties) {
this.properties = properties;
return this;
}
public void unsetProperties() {
this.properties = null;
}
/** Returns true if field properties is set (has been assigned a value) and false otherwise */
public boolean isSetProperties() {
return this.properties != null;
}
public void setPropertiesIsSet(boolean value) {
if (!value) {
this.properties = null;
}
}
public boolean isCompressed() {
return this.compressed;
}
public CatalogStorage setCompressed(boolean compressed) {
this.compressed = compressed;
setCompressedIsSet(true);
return this;
}
public void unsetCompressed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPRESSED_ISSET_ID);
}
/** Returns true if field compressed is set (has been assigned a value) and false otherwise */
public boolean isSetCompressed() {
return EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID);
}
public void setCompressedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value);
}
public String getLocationUri() {
return this.locationUri;
}
public CatalogStorage setLocationUri(String locationUri) {
this.locationUri = locationUri;
return this;
}
public void unsetLocationUri() {
this.locationUri = null;
}
/** Returns true if field locationUri is set (has been assigned a value) and false otherwise */
public boolean isSetLocationUri() {
return this.locationUri != null;
}
public void setLocationUriIsSet(boolean value) {
if (!value) {
this.locationUri = null;
}
}
public String getInputFormat() {
return this.inputFormat;
}
public CatalogStorage setInputFormat(String inputFormat) {
this.inputFormat = inputFormat;
return this;
}
public void unsetInputFormat() {
this.inputFormat = null;
}
/** Returns true if field inputFormat is set (has been assigned a value) and false otherwise */
public boolean isSetInputFormat() {
return this.inputFormat != null;
}
public void setInputFormatIsSet(boolean value) {
if (!value) {
this.inputFormat = null;
}
}
public String getOutputFormat() {
return this.outputFormat;
}
public CatalogStorage setOutputFormat(String outputFormat) {
this.outputFormat = outputFormat;
return this;
}
public void unsetOutputFormat() {
this.outputFormat = null;
}
/** Returns true if field outputFormat is set (has been assigned a value) and false otherwise */
public boolean isSetOutputFormat() {
return this.outputFormat != null;
}
public void setOutputFormatIsSet(boolean value) {
if (!value) {
this.outputFormat = null;
}
}
public String getSerde() {
return this.serde;
}
public CatalogStorage setSerde(String serde) {
this.serde = serde;
return this;
}
public void unsetSerde() {
this.serde = null;
}
/** Returns true if field serde is set (has been assigned a value) and false otherwise */
public boolean isSetSerde() {
return this.serde != null;
}
public void setSerdeIsSet(boolean value) {
if (!value) {
this.serde = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case PROPERTIES:
if (value == null) {
unsetProperties();
} else {
setProperties((Map)value);
}
break;
case COMPRESSED:
if (value == null) {
unsetCompressed();
} else {
setCompressed((Boolean)value);
}
break;
case LOCATION_URI:
if (value == null) {
unsetLocationUri();
} else {
setLocationUri((String)value);
}
break;
case INPUT_FORMAT:
if (value == null) {
unsetInputFormat();
} else {
setInputFormat((String)value);
}
break;
case OUTPUT_FORMAT:
if (value == null) {
unsetOutputFormat();
} else {
setOutputFormat((String)value);
}
break;
case SERDE:
if (value == null) {
unsetSerde();
} else {
setSerde((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case PROPERTIES:
return getProperties();
case COMPRESSED:
return isCompressed();
case LOCATION_URI:
return getLocationUri();
case INPUT_FORMAT:
return getInputFormat();
case OUTPUT_FORMAT:
return getOutputFormat();
case SERDE:
return getSerde();
}
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 PROPERTIES:
return isSetProperties();
case COMPRESSED:
return isSetCompressed();
case LOCATION_URI:
return isSetLocationUri();
case INPUT_FORMAT:
return isSetInputFormat();
case OUTPUT_FORMAT:
return isSetOutputFormat();
case SERDE:
return isSetSerde();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof CatalogStorage)
return this.equals((CatalogStorage)that);
return false;
}
public boolean equals(CatalogStorage that) {
if (that == null)
return false;
boolean this_present_properties = true && this.isSetProperties();
boolean that_present_properties = true && that.isSetProperties();
if (this_present_properties || that_present_properties) {
if (!(this_present_properties && that_present_properties))
return false;
if (!this.properties.equals(that.properties))
return false;
}
boolean this_present_compressed = true;
boolean that_present_compressed = true;
if (this_present_compressed || that_present_compressed) {
if (!(this_present_compressed && that_present_compressed))
return false;
if (this.compressed != that.compressed)
return false;
}
boolean this_present_locationUri = true && this.isSetLocationUri();
boolean that_present_locationUri = true && that.isSetLocationUri();
if (this_present_locationUri || that_present_locationUri) {
if (!(this_present_locationUri && that_present_locationUri))
return false;
if (!this.locationUri.equals(that.locationUri))
return false;
}
boolean this_present_inputFormat = true && this.isSetInputFormat();
boolean that_present_inputFormat = true && that.isSetInputFormat();
if (this_present_inputFormat || that_present_inputFormat) {
if (!(this_present_inputFormat && that_present_inputFormat))
return false;
if (!this.inputFormat.equals(that.inputFormat))
return false;
}
boolean this_present_outputFormat = true && this.isSetOutputFormat();
boolean that_present_outputFormat = true && that.isSetOutputFormat();
if (this_present_outputFormat || that_present_outputFormat) {
if (!(this_present_outputFormat && that_present_outputFormat))
return false;
if (!this.outputFormat.equals(that.outputFormat))
return false;
}
boolean this_present_serde = true && this.isSetSerde();
boolean that_present_serde = true && that.isSetSerde();
if (this_present_serde || that_present_serde) {
if (!(this_present_serde && that_present_serde))
return false;
if (!this.serde.equals(that.serde))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy