org.apache.hadoop.hive.metastore.api.WMValidateResourcePlanResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hive-apache Show documentation
Show all versions of hive-apache Show documentation
Shaded version of Apache Hive for Presto
The newest version!
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hive.metastore.api;
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 io.prestosql.hive.$internal.org.slf4j.Logger;
import io.prestosql.hive.$internal.org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class WMValidateResourcePlanResponse 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("WMValidateResourcePlanResponse");
private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField WARNINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("warnings", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new WMValidateResourcePlanResponseStandardSchemeFactory());
schemes.put(TupleScheme.class, new WMValidateResourcePlanResponseTupleSchemeFactory());
}
private List errors; // optional
private List warnings; // 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 {
ERRORS((short)1, "errors"),
WARNINGS((short)2, "warnings");
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: // ERRORS
return ERRORS;
case 2: // WARNINGS
return WARNINGS;
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 _Fields optionals[] = {_Fields.ERRORS,_Fields.WARNINGS};
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.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", 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.WARNINGS, new org.apache.thrift.meta_data.FieldMetaData("warnings", 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))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WMValidateResourcePlanResponse.class, metaDataMap);
}
public WMValidateResourcePlanResponse() {
}
/**
* Performs a deep copy on other.
*/
public WMValidateResourcePlanResponse(WMValidateResourcePlanResponse other) {
if (other.isSetErrors()) {
List __this__errors = new ArrayList(other.errors);
this.errors = __this__errors;
}
if (other.isSetWarnings()) {
List __this__warnings = new ArrayList(other.warnings);
this.warnings = __this__warnings;
}
}
public WMValidateResourcePlanResponse deepCopy() {
return new WMValidateResourcePlanResponse(this);
}
@Override
public void clear() {
this.errors = null;
this.warnings = null;
}
public int getErrorsSize() {
return (this.errors == null) ? 0 : this.errors.size();
}
public java.util.Iterator getErrorsIterator() {
return (this.errors == null) ? null : this.errors.iterator();
}
public void addToErrors(String elem) {
if (this.errors == null) {
this.errors = new ArrayList();
}
this.errors.add(elem);
}
public List getErrors() {
return this.errors;
}
public void setErrors(List errors) {
this.errors = errors;
}
public void unsetErrors() {
this.errors = null;
}
/** Returns true if field errors is set (has been assigned a value) and false otherwise */
public boolean isSetErrors() {
return this.errors != null;
}
public void setErrorsIsSet(boolean value) {
if (!value) {
this.errors = null;
}
}
public int getWarningsSize() {
return (this.warnings == null) ? 0 : this.warnings.size();
}
public java.util.Iterator getWarningsIterator() {
return (this.warnings == null) ? null : this.warnings.iterator();
}
public void addToWarnings(String elem) {
if (this.warnings == null) {
this.warnings = new ArrayList();
}
this.warnings.add(elem);
}
public List getWarnings() {
return this.warnings;
}
public void setWarnings(List warnings) {
this.warnings = warnings;
}
public void unsetWarnings() {
this.warnings = null;
}
/** Returns true if field warnings is set (has been assigned a value) and false otherwise */
public boolean isSetWarnings() {
return this.warnings != null;
}
public void setWarningsIsSet(boolean value) {
if (!value) {
this.warnings = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ERRORS:
if (value == null) {
unsetErrors();
} else {
setErrors((List)value);
}
break;
case WARNINGS:
if (value == null) {
unsetWarnings();
} else {
setWarnings((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ERRORS:
return getErrors();
case WARNINGS:
return getWarnings();
}
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 ERRORS:
return isSetErrors();
case WARNINGS:
return isSetWarnings();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof WMValidateResourcePlanResponse)
return this.equals((WMValidateResourcePlanResponse)that);
return false;
}
public boolean equals(WMValidateResourcePlanResponse that) {
if (that == null)
return false;
boolean this_present_errors = true && this.isSetErrors();
boolean that_present_errors = true && that.isSetErrors();
if (this_present_errors || that_present_errors) {
if (!(this_present_errors && that_present_errors))
return false;
if (!this.errors.equals(that.errors))
return false;
}
boolean this_present_warnings = true && this.isSetWarnings();
boolean that_present_warnings = true && that.isSetWarnings();
if (this_present_warnings || that_present_warnings) {
if (!(this_present_warnings && that_present_warnings))
return false;
if (!this.warnings.equals(that.warnings))
return false;
}
return true;
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy