com.xiaomi.infra.galaxy.emr.thrift.CreateClusterResponse Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.xiaomi.infra.galaxy.emr.thrift;
import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;
import libthrift091.scheme.TupleScheme;
import libthrift091.protocol.TTupleProtocol;
import libthrift091.protocol.TProtocolException;
import libthrift091.EncodingUtils;
import libthrift091.TException;
import libthrift091.async.AsyncMethodCallback;
import libthrift091.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.2)", date = "2016-8-2")
public class CreateClusterResponse implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("CreateClusterResponse");
private static final libthrift091.protocol.TField CLUSTER_ID_FIELD_DESC = new libthrift091.protocol.TField("clusterId", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField NAME_FIELD_DESC = new libthrift091.protocol.TField("name", libthrift091.protocol.TType.STRING, (short)2);
private static final libthrift091.protocol.TField ADD_INSTANCE_GROUP_RESPONSES_FIELD_DESC = new libthrift091.protocol.TField("addInstanceGroupResponses", libthrift091.protocol.TType.LIST, (short)3);
private static final libthrift091.protocol.TField SUBMIT_JOB_RESPONSES_FIELD_DESC = new libthrift091.protocol.TField("submitJobResponses", libthrift091.protocol.TType.LIST, (short)4);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new CreateClusterResponseStandardSchemeFactory());
schemes.put(TupleScheme.class, new CreateClusterResponseTupleSchemeFactory());
}
public String clusterId; // required
public String name; // required
public List addInstanceGroupResponses; // optional
public List submitJobResponses; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
CLUSTER_ID((short)1, "clusterId"),
NAME((short)2, "name"),
ADD_INSTANCE_GROUP_RESPONSES((short)3, "addInstanceGroupResponses"),
SUBMIT_JOB_RESPONSES((short)4, "submitJobResponses");
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: // CLUSTER_ID
return CLUSTER_ID;
case 2: // NAME
return NAME;
case 3: // ADD_INSTANCE_GROUP_RESPONSES
return ADD_INSTANCE_GROUP_RESPONSES;
case 4: // SUBMIT_JOB_RESPONSES
return SUBMIT_JOB_RESPONSES;
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.ADD_INSTANCE_GROUP_RESPONSES,_Fields.SUBMIT_JOB_RESPONSES};
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CLUSTER_ID, new libthrift091.meta_data.FieldMetaData("clusterId", libthrift091.TFieldRequirementType.REQUIRED,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new libthrift091.meta_data.FieldMetaData("name", libthrift091.TFieldRequirementType.REQUIRED,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.ADD_INSTANCE_GROUP_RESPONSES, new libthrift091.meta_data.FieldMetaData("addInstanceGroupResponses", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, AddInstanceGroupResponse.class))));
tmpMap.put(_Fields.SUBMIT_JOB_RESPONSES, new libthrift091.meta_data.FieldMetaData("submitJobResponses", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SubmitJobResponse.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(CreateClusterResponse.class, metaDataMap);
}
public CreateClusterResponse() {
}
public CreateClusterResponse(
String clusterId,
String name)
{
this();
this.clusterId = clusterId;
this.name = name;
}
/**
* Performs a deep copy on other.
*/
public CreateClusterResponse(CreateClusterResponse other) {
if (other.isSetClusterId()) {
this.clusterId = other.clusterId;
}
if (other.isSetName()) {
this.name = other.name;
}
if (other.isSetAddInstanceGroupResponses()) {
List __this__addInstanceGroupResponses = new ArrayList(other.addInstanceGroupResponses.size());
for (AddInstanceGroupResponse other_element : other.addInstanceGroupResponses) {
__this__addInstanceGroupResponses.add(new AddInstanceGroupResponse(other_element));
}
this.addInstanceGroupResponses = __this__addInstanceGroupResponses;
}
if (other.isSetSubmitJobResponses()) {
List __this__submitJobResponses = new ArrayList(other.submitJobResponses.size());
for (SubmitJobResponse other_element : other.submitJobResponses) {
__this__submitJobResponses.add(new SubmitJobResponse(other_element));
}
this.submitJobResponses = __this__submitJobResponses;
}
}
public CreateClusterResponse deepCopy() {
return new CreateClusterResponse(this);
}
@Override
public void clear() {
this.clusterId = null;
this.name = null;
this.addInstanceGroupResponses = null;
this.submitJobResponses = null;
}
public String getClusterId() {
return this.clusterId;
}
public CreateClusterResponse setClusterId(String clusterId) {
this.clusterId = clusterId;
return this;
}
public void unsetClusterId() {
this.clusterId = null;
}
/** Returns true if field clusterId is set (has been assigned a value) and false otherwise */
public boolean isSetClusterId() {
return this.clusterId != null;
}
public void setClusterIdIsSet(boolean value) {
if (!value) {
this.clusterId = null;
}
}
public String getName() {
return this.name;
}
public CreateClusterResponse setName(String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
public int getAddInstanceGroupResponsesSize() {
return (this.addInstanceGroupResponses == null) ? 0 : this.addInstanceGroupResponses.size();
}
public java.util.Iterator getAddInstanceGroupResponsesIterator() {
return (this.addInstanceGroupResponses == null) ? null : this.addInstanceGroupResponses.iterator();
}
public void addToAddInstanceGroupResponses(AddInstanceGroupResponse elem) {
if (this.addInstanceGroupResponses == null) {
this.addInstanceGroupResponses = new ArrayList();
}
this.addInstanceGroupResponses.add(elem);
}
public List getAddInstanceGroupResponses() {
return this.addInstanceGroupResponses;
}
public CreateClusterResponse setAddInstanceGroupResponses(List addInstanceGroupResponses) {
this.addInstanceGroupResponses = addInstanceGroupResponses;
return this;
}
public void unsetAddInstanceGroupResponses() {
this.addInstanceGroupResponses = null;
}
/** Returns true if field addInstanceGroupResponses is set (has been assigned a value) and false otherwise */
public boolean isSetAddInstanceGroupResponses() {
return this.addInstanceGroupResponses != null;
}
public void setAddInstanceGroupResponsesIsSet(boolean value) {
if (!value) {
this.addInstanceGroupResponses = null;
}
}
public int getSubmitJobResponsesSize() {
return (this.submitJobResponses == null) ? 0 : this.submitJobResponses.size();
}
public java.util.Iterator getSubmitJobResponsesIterator() {
return (this.submitJobResponses == null) ? null : this.submitJobResponses.iterator();
}
public void addToSubmitJobResponses(SubmitJobResponse elem) {
if (this.submitJobResponses == null) {
this.submitJobResponses = new ArrayList();
}
this.submitJobResponses.add(elem);
}
public List getSubmitJobResponses() {
return this.submitJobResponses;
}
public CreateClusterResponse setSubmitJobResponses(List submitJobResponses) {
this.submitJobResponses = submitJobResponses;
return this;
}
public void unsetSubmitJobResponses() {
this.submitJobResponses = null;
}
/** Returns true if field submitJobResponses is set (has been assigned a value) and false otherwise */
public boolean isSetSubmitJobResponses() {
return this.submitJobResponses != null;
}
public void setSubmitJobResponsesIsSet(boolean value) {
if (!value) {
this.submitJobResponses = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CLUSTER_ID:
if (value == null) {
unsetClusterId();
} else {
setClusterId((String)value);
}
break;
case NAME:
if (value == null) {
unsetName();
} else {
setName((String)value);
}
break;
case ADD_INSTANCE_GROUP_RESPONSES:
if (value == null) {
unsetAddInstanceGroupResponses();
} else {
setAddInstanceGroupResponses((List)value);
}
break;
case SUBMIT_JOB_RESPONSES:
if (value == null) {
unsetSubmitJobResponses();
} else {
setSubmitJobResponses((List)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CLUSTER_ID:
return getClusterId();
case NAME:
return getName();
case ADD_INSTANCE_GROUP_RESPONSES:
return getAddInstanceGroupResponses();
case SUBMIT_JOB_RESPONSES:
return getSubmitJobResponses();
}
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 CLUSTER_ID:
return isSetClusterId();
case NAME:
return isSetName();
case ADD_INSTANCE_GROUP_RESPONSES:
return isSetAddInstanceGroupResponses();
case SUBMIT_JOB_RESPONSES:
return isSetSubmitJobResponses();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof CreateClusterResponse)
return this.equals((CreateClusterResponse)that);
return false;
}
public boolean equals(CreateClusterResponse that) {
if (that == null)
return false;
boolean this_present_clusterId = true && this.isSetClusterId();
boolean that_present_clusterId = true && that.isSetClusterId();
if (this_present_clusterId || that_present_clusterId) {
if (!(this_present_clusterId && that_present_clusterId))
return false;
if (!this.clusterId.equals(that.clusterId))
return false;
}
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
boolean this_present_addInstanceGroupResponses = true && this.isSetAddInstanceGroupResponses();
boolean that_present_addInstanceGroupResponses = true && that.isSetAddInstanceGroupResponses();
if (this_present_addInstanceGroupResponses || that_present_addInstanceGroupResponses) {
if (!(this_present_addInstanceGroupResponses && that_present_addInstanceGroupResponses))
return false;
if (!this.addInstanceGroupResponses.equals(that.addInstanceGroupResponses))
return false;
}
boolean this_present_submitJobResponses = true && this.isSetSubmitJobResponses();
boolean that_present_submitJobResponses = true && that.isSetSubmitJobResponses();
if (this_present_submitJobResponses || that_present_submitJobResponses) {
if (!(this_present_submitJobResponses && that_present_submitJobResponses))
return false;
if (!this.submitJobResponses.equals(that.submitJobResponses))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy