/** * 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-18") public class ClusterDetail implements libthrift091.TBase<ClusterDetail, ClusterDetail._Fields>, java.io.Serializable, Cloneable, Comparable<ClusterDetail> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("ClusterDetail"); 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 OWNER_ID_FIELD_DESC = new libthrift091.protocol.TField("ownerId", libthrift091.protocol.TType.STRING, (short)2); private static final libthrift091.protocol.TField NAME_FIELD_DESC = new libthrift091.protocol.TField("name", libthrift091.protocol.TType.STRING, (short)3); private static final libthrift091.protocol.TField REGION_FIELD_DESC = new libthrift091.protocol.TField("region", libthrift091.protocol.TType.STRING, (short)4); private static final libthrift091.protocol.TField PURPOSE_FIELD_DESC = new libthrift091.protocol.TField("purpose", libthrift091.protocol.TType.STRING, (short)5); private static final libthrift091.protocol.TField KEY_PAIR_FIELD_DESC = new libthrift091.protocol.TField("keyPair", libthrift091.protocol.TType.STRING, (short)6); private static final libthrift091.protocol.TField AUTO_TERMINATE_FIELD_DESC = new libthrift091.protocol.TField("autoTerminate", libthrift091.protocol.TType.BOOL, (short)7); private static final libthrift091.protocol.TField TERMINATION_PROTECTED_FIELD_DESC = new libthrift091.protocol.TField("terminationProtected", libthrift091.protocol.TType.BOOL, (short)8); private static final libthrift091.protocol.TField INSTANCE_GROUPS_FIELD_DESC = new libthrift091.protocol.TField("instanceGroups", libthrift091.protocol.TType.LIST, (short)9); private static final libthrift091.protocol.TField MASTER_PUBLIC_DNS_NAME_FIELD_DESC = new libthrift091.protocol.TField("masterPublicDnsName", libthrift091.protocol.TType.STRING, (short)10); private static final libthrift091.protocol.TField MASTER_PUBLIC_IP_ADDRESS_FIELD_DESC = new libthrift091.protocol.TField("masterPublicIpAddress", libthrift091.protocol.TType.STRING, (short)11); private static final libthrift091.protocol.TField CLUSTER_STATUS_FIELD_DESC = new libthrift091.protocol.TField("clusterStatus", libthrift091.protocol.TType.STRUCT, (short)12); private static final libthrift091.protocol.TField SOFT_CONFIG_FIELD_DESC = new libthrift091.protocol.TField("softConfig", libthrift091.protocol.TType.STRUCT, (short)13); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new ClusterDetailStandardSchemeFactory()); schemes.put(TupleScheme.class, new ClusterDetailTupleSchemeFactory()); } public String clusterId; // required public String ownerId; // required public String name; // optional public String region; // optional public String purpose; // optional public String keyPair; // optional public boolean autoTerminate; // optional public boolean terminationProtected; // optional public List<InstanceGroupDetail> instanceGroups; // optional public String masterPublicDnsName; // optional public String masterPublicIpAddress; // optional public Status clusterStatus; // optional public ApplicationSuite softConfig; // 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"), OWNER_ID((short)2, "ownerId"), NAME((short)3, "name"), REGION((short)4, "region"), PURPOSE((short)5, "purpose"), KEY_PAIR((short)6, "keyPair"), AUTO_TERMINATE((short)7, "autoTerminate"), TERMINATION_PROTECTED((short)8, "terminationProtected"), INSTANCE_GROUPS((short)9, "instanceGroups"), MASTER_PUBLIC_DNS_NAME((short)10, "masterPublicDnsName"), MASTER_PUBLIC_IP_ADDRESS((short)11, "masterPublicIpAddress"), CLUSTER_STATUS((short)12, "clusterStatus"), SOFT_CONFIG((short)13, "softConfig"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); 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: // OWNER_ID return OWNER_ID; case 3: // NAME return NAME; case 4: // REGION return REGION; case 5: // PURPOSE return PURPOSE; case 6: // KEY_PAIR return KEY_PAIR; case 7: // AUTO_TERMINATE return AUTO_TERMINATE; case 8: // TERMINATION_PROTECTED return TERMINATION_PROTECTED; case 9: // INSTANCE_GROUPS return INSTANCE_GROUPS; case 10: // MASTER_PUBLIC_DNS_NAME return MASTER_PUBLIC_DNS_NAME; case 11: // MASTER_PUBLIC_IP_ADDRESS return MASTER_PUBLIC_IP_ADDRESS; case 12: // CLUSTER_STATUS return CLUSTER_STATUS; case 13: // SOFT_CONFIG return SOFT_CONFIG; 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 __AUTOTERMINATE_ISSET_ID = 0; private static final int __TERMINATIONPROTECTED_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.NAME,_Fields.REGION,_Fields.PURPOSE,_Fields.KEY_PAIR,_Fields.AUTO_TERMINATE,_Fields.TERMINATION_PROTECTED,_Fields.INSTANCE_GROUPS,_Fields.MASTER_PUBLIC_DNS_NAME,_Fields.MASTER_PUBLIC_IP_ADDRESS,_Fields.CLUSTER_STATUS,_Fields.SOFT_CONFIG}; 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.OWNER_ID, new libthrift091.meta_data.FieldMetaData("ownerId", libthrift091.TFieldRequirementType.REQUIRED, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.NAME, new libthrift091.meta_data.FieldMetaData("name", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.REGION, new libthrift091.meta_data.FieldMetaData("region", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.PURPOSE, new libthrift091.meta_data.FieldMetaData("purpose", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.KEY_PAIR, new libthrift091.meta_data.FieldMetaData("keyPair", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.AUTO_TERMINATE, new libthrift091.meta_data.FieldMetaData("autoTerminate", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL))); tmpMap.put(_Fields.TERMINATION_PROTECTED, new libthrift091.meta_data.FieldMetaData("terminationProtected", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL))); tmpMap.put(_Fields.INSTANCE_GROUPS, new libthrift091.meta_data.FieldMetaData("instanceGroups", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, InstanceGroupDetail.class)))); tmpMap.put(_Fields.MASTER_PUBLIC_DNS_NAME, new libthrift091.meta_data.FieldMetaData("masterPublicDnsName", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.MASTER_PUBLIC_IP_ADDRESS, new libthrift091.meta_data.FieldMetaData("masterPublicIpAddress", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.CLUSTER_STATUS, new libthrift091.meta_data.FieldMetaData("clusterStatus", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, Status.class))); tmpMap.put(_Fields.SOFT_CONFIG, new libthrift091.meta_data.FieldMetaData("softConfig", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ApplicationSuite.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(ClusterDetail.class, metaDataMap); } public ClusterDetail() { } public ClusterDetail( String clusterId, String ownerId) { this(); this.clusterId = clusterId; this.ownerId = ownerId; } /** * Performs a deep copy on <i>other</i>. */ public ClusterDetail(ClusterDetail other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetClusterId()) { this.clusterId = other.clusterId; } if (other.isSetOwnerId()) { this.ownerId = other.ownerId; } if (other.isSetName()) { this.name = other.name; } if (other.isSetRegion()) { this.region = other.region; } if (other.isSetPurpose()) { this.purpose = other.purpose; } if (other.isSetKeyPair()) { this.keyPair = other.keyPair; } this.autoTerminate = other.autoTerminate; this.terminationProtected = other.terminationProtected; if (other.isSetInstanceGroups()) { List<InstanceGroupDetail> __this__instanceGroups = new ArrayList<InstanceGroupDetail>(other.instanceGroups.size()); for (InstanceGroupDetail other_element : other.instanceGroups) { __this__instanceGroups.add(new InstanceGroupDetail(other_element)); } this.instanceGroups = __this__instanceGroups; } if (other.isSetMasterPublicDnsName()) { this.masterPublicDnsName = other.masterPublicDnsName; } if (other.isSetMasterPublicIpAddress()) { this.masterPublicIpAddress = other.masterPublicIpAddress; } if (other.isSetClusterStatus()) { this.clusterStatus = new Status(other.clusterStatus); } if (other.isSetSoftConfig()) { this.softConfig = new ApplicationSuite(other.softConfig); } } public ClusterDetail deepCopy() { return new ClusterDetail(this); } @Override public void clear() { this.clusterId = null; this.ownerId = null; this.name = null; this.region = null; this.purpose = null; this.keyPair = null; setAutoTerminateIsSet(false); this.autoTerminate = false; setTerminationProtectedIsSet(false); this.terminationProtected = false; this.instanceGroups = null; this.masterPublicDnsName = null; this.masterPublicIpAddress = null; this.clusterStatus = null; this.softConfig = null; } public String getClusterId() { return this.clusterId; } public ClusterDetail 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 getOwnerId() { return this.ownerId; } public ClusterDetail setOwnerId(String ownerId) { this.ownerId = ownerId; return this; } public void unsetOwnerId() { this.ownerId = null; } /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */ public boolean isSetOwnerId() { return this.ownerId != null; } public void setOwnerIdIsSet(boolean value) { if (!value) { this.ownerId = null; } } public String getName() { return this.name; } public ClusterDetail 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 String getRegion() { return this.region; } public ClusterDetail setRegion(String region) { this.region = region; return this; } public void unsetRegion() { this.region = null; } /** Returns true if field region is set (has been assigned a value) and false otherwise */ public boolean isSetRegion() { return this.region != null; } public void setRegionIsSet(boolean value) { if (!value) { this.region = null; } } public String getPurpose() { return this.purpose; } public ClusterDetail setPurpose(String purpose) { this.purpose = purpose; return this; } public void unsetPurpose() { this.purpose = null; } /** Returns true if field purpose is set (has been assigned a value) and false otherwise */ public boolean isSetPurpose() { return this.purpose != null; } public void setPurposeIsSet(boolean value) { if (!value) { this.purpose = null; } } public String getKeyPair() { return this.keyPair; } public ClusterDetail setKeyPair(String keyPair) { this.keyPair = keyPair; return this; } public void unsetKeyPair() { this.keyPair = null; } /** Returns true if field keyPair is set (has been assigned a value) and false otherwise */ public boolean isSetKeyPair() { return this.keyPair != null; } public void setKeyPairIsSet(boolean value) { if (!value) { this.keyPair = null; } } public boolean isAutoTerminate() { return this.autoTerminate; } public ClusterDetail setAutoTerminate(boolean autoTerminate) { this.autoTerminate = autoTerminate; setAutoTerminateIsSet(true); return this; } public void unsetAutoTerminate() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AUTOTERMINATE_ISSET_ID); } /** Returns true if field autoTerminate is set (has been assigned a value) and false otherwise */ public boolean isSetAutoTerminate() { return EncodingUtils.testBit(__isset_bitfield, __AUTOTERMINATE_ISSET_ID); } public void setAutoTerminateIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AUTOTERMINATE_ISSET_ID, value); } public boolean isTerminationProtected() { return this.terminationProtected; } public ClusterDetail setTerminationProtected(boolean terminationProtected) { this.terminationProtected = terminationProtected; setTerminationProtectedIsSet(true); return this; } public void unsetTerminationProtected() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TERMINATIONPROTECTED_ISSET_ID); } /** Returns true if field terminationProtected is set (has been assigned a value) and false otherwise */ public boolean isSetTerminationProtected() { return EncodingUtils.testBit(__isset_bitfield, __TERMINATIONPROTECTED_ISSET_ID); } public void setTerminationProtectedIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TERMINATIONPROTECTED_ISSET_ID, value); } public int getInstanceGroupsSize() { return (this.instanceGroups == null) ? 0 : this.instanceGroups.size(); } public java.util.Iterator<InstanceGroupDetail> getInstanceGroupsIterator() { return (this.instanceGroups == null) ? null : this.instanceGroups.iterator(); } public void addToInstanceGroups(InstanceGroupDetail elem) { if (this.instanceGroups == null) { this.instanceGroups = new ArrayList<InstanceGroupDetail>(); } this.instanceGroups.add(elem); } public List<InstanceGroupDetail> getInstanceGroups() { return this.instanceGroups; } public ClusterDetail setInstanceGroups(List<InstanceGroupDetail> instanceGroups) { this.instanceGroups = instanceGroups; return this; } public void unsetInstanceGroups() { this.instanceGroups = null; } /** Returns true if field instanceGroups is set (has been assigned a value) and false otherwise */ public boolean isSetInstanceGroups() { return this.instanceGroups != null; } public void setInstanceGroupsIsSet(boolean value) { if (!value) { this.instanceGroups = null; } } public String getMasterPublicDnsName() { return this.masterPublicDnsName; } public ClusterDetail setMasterPublicDnsName(String masterPublicDnsName) { this.masterPublicDnsName = masterPublicDnsName; return this; } public void unsetMasterPublicDnsName() { this.masterPublicDnsName = null; } /** Returns true if field masterPublicDnsName is set (has been assigned a value) and false otherwise */ public boolean isSetMasterPublicDnsName() { return this.masterPublicDnsName != null; } public void setMasterPublicDnsNameIsSet(boolean value) { if (!value) { this.masterPublicDnsName = null; } } public String getMasterPublicIpAddress() { return this.masterPublicIpAddress; } public ClusterDetail setMasterPublicIpAddress(String masterPublicIpAddress) { this.masterPublicIpAddress = masterPublicIpAddress; return this; } public void unsetMasterPublicIpAddress() { this.masterPublicIpAddress = null; } /** Returns true if field masterPublicIpAddress is set (has been assigned a value) and false otherwise */ public boolean isSetMasterPublicIpAddress() { return this.masterPublicIpAddress != null; } public void setMasterPublicIpAddressIsSet(boolean value) { if (!value) { this.masterPublicIpAddress = null; } } public Status getClusterStatus() { return this.clusterStatus; } public ClusterDetail setClusterStatus(Status clusterStatus) { this.clusterStatus = clusterStatus; return this; } public void unsetClusterStatus() { this.clusterStatus = null; } /** Returns true if field clusterStatus is set (has been assigned a value) and false otherwise */ public boolean isSetClusterStatus() { return this.clusterStatus != null; } public void setClusterStatusIsSet(boolean value) { if (!value) { this.clusterStatus = null; } } public ApplicationSuite getSoftConfig() { return this.softConfig; } public ClusterDetail setSoftConfig(ApplicationSuite softConfig) { this.softConfig = softConfig; return this; } public void unsetSoftConfig() { this.softConfig = null; } /** Returns true if field softConfig is set (has been assigned a value) and false otherwise */ public boolean isSetSoftConfig() { return this.softConfig != null; } public void setSoftConfigIsSet(boolean value) { if (!value) { this.softConfig = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case CLUSTER_ID: if (value == null) { unsetClusterId(); } else { setClusterId((String)value); } break; case OWNER_ID: if (value == null) { unsetOwnerId(); } else { setOwnerId((String)value); } break; case NAME: if (value == null) { unsetName(); } else { setName((String)value); } break; case REGION: if (value == null) { unsetRegion(); } else { setRegion((String)value); } break; case PURPOSE: if (value == null) { unsetPurpose(); } else { setPurpose((String)value); } break; case KEY_PAIR: if (value == null) { unsetKeyPair(); } else { setKeyPair((String)value); } break; case AUTO_TERMINATE: if (value == null) { unsetAutoTerminate(); } else { setAutoTerminate((Boolean)value); } break; case TERMINATION_PROTECTED: if (value == null) { unsetTerminationProtected(); } else { setTerminationProtected((Boolean)value); } break; case INSTANCE_GROUPS: if (value == null) { unsetInstanceGroups(); } else { setInstanceGroups((List<InstanceGroupDetail>)value); } break; case MASTER_PUBLIC_DNS_NAME: if (value == null) { unsetMasterPublicDnsName(); } else { setMasterPublicDnsName((String)value); } break; case MASTER_PUBLIC_IP_ADDRESS: if (value == null) { unsetMasterPublicIpAddress(); } else { setMasterPublicIpAddress((String)value); } break; case CLUSTER_STATUS: if (value == null) { unsetClusterStatus(); } else { setClusterStatus((Status)value); } break; case SOFT_CONFIG: if (value == null) { unsetSoftConfig(); } else { setSoftConfig((ApplicationSuite)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case CLUSTER_ID: return getClusterId(); case OWNER_ID: return getOwnerId(); case NAME: return getName(); case REGION: return getRegion(); case PURPOSE: return getPurpose(); case KEY_PAIR: return getKeyPair(); case AUTO_TERMINATE: return Boolean.valueOf(isAutoTerminate()); case TERMINATION_PROTECTED: return Boolean.valueOf(isTerminationProtected()); case INSTANCE_GROUPS: return getInstanceGroups(); case MASTER_PUBLIC_DNS_NAME: return getMasterPublicDnsName(); case MASTER_PUBLIC_IP_ADDRESS: return getMasterPublicIpAddress(); case CLUSTER_STATUS: return getClusterStatus(); case SOFT_CONFIG: return getSoftConfig(); } 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 OWNER_ID: return isSetOwnerId(); case NAME: return isSetName(); case REGION: return isSetRegion(); case PURPOSE: return isSetPurpose(); case KEY_PAIR: return isSetKeyPair(); case AUTO_TERMINATE: return isSetAutoTerminate(); case TERMINATION_PROTECTED: return isSetTerminationProtected(); case INSTANCE_GROUPS: return isSetInstanceGroups(); case MASTER_PUBLIC_DNS_NAME: return isSetMasterPublicDnsName(); case MASTER_PUBLIC_IP_ADDRESS: return isSetMasterPublicIpAddress(); case CLUSTER_STATUS: return isSetClusterStatus(); case SOFT_CONFIG: return isSetSoftConfig(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ClusterDetail) return this.equals((ClusterDetail)that); return false; } public boolean equals(ClusterDetail 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_ownerId = true && this.isSetOwnerId(); boolean that_present_ownerId = true && that.isSetOwnerId(); if (this_present_ownerId || that_present_ownerId) { if (!(this_present_ownerId && that_present_ownerId)) return false; if (!this.ownerId.equals(that.ownerId)) 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_region = true && this.isSetRegion(); boolean that_present_region = true && that.isSetRegion(); if (this_present_region || that_present_region) { if (!(this_present_region && that_present_region)) return false; if (!this.region.equals(that.region)) return false; } boolean this_present_purpose = true && this.isSetPurpose(); boolean that_present_purpose = true && that.isSetPurpose(); if (this_present_purpose || that_present_purpose) { if (!(this_present_purpose && that_present_purpose)) return false; if (!this.purpose.equals(that.purpose)) return false; } boolean this_present_keyPair = true && this.isSetKeyPair(); boolean that_present_keyPair = true && that.isSetKeyPair(); if (this_present_keyPair || that_present_keyPair) { if (!(this_present_keyPair && that_present_keyPair)) return false; if (!this.keyPair.equals(that.keyPair)) return false; } boolean this_present_autoTerminate = true && this.isSetAutoTerminate(); boolean that_present_autoTerminate = true && that.isSetAutoTerminate(); if (this_present_autoTerminate || that_present_autoTerminate) { if (!(this_present_autoTerminate && that_present_autoTerminate)) return false; if (this.autoTerminate != that.autoTerminate) return false; } boolean this_present_terminationProtected = true && this.isSetTerminationProtected(); boolean that_present_terminationProtected = true && that.isSetTerminationProtected(); if (this_present_terminationProtected || that_present_terminationProtected) { if (!(this_present_terminationProtected && that_present_terminationProtected)) return false; if (this.terminationProtected != that.terminationProtected) return false; } boolean this_present_instanceGroups = true && this.isSetInstanceGroups(); boolean that_present_instanceGroups = true && that.isSetInstanceGroups(); if (this_present_instanceGroups || that_present_instanceGroups) { if (!(this_present_instanceGroups && that_present_instanceGroups)) return false; if (!this.instanceGroups.equals(that.instanceGroups)) return false; } boolean this_present_masterPublicDnsName = true && this.isSetMasterPublicDnsName(); boolean that_present_masterPublicDnsName = true && that.isSetMasterPublicDnsName(); if (this_present_masterPublicDnsName || that_present_masterPublicDnsName) { if (!(this_present_masterPublicDnsName && that_present_masterPublicDnsName)) return false; if (!this.masterPublicDnsName.equals(that.masterPublicDnsName)) return false; } boolean this_present_masterPublicIpAddress = true && this.isSetMasterPublicIpAddress(); boolean that_present_masterPublicIpAddress = true && that.isSetMasterPublicIpAddress(); if (this_present_masterPublicIpAddress || that_present_masterPublicIpAddress) { if (!(this_present_masterPublicIpAddress && that_present_masterPublicIpAddress)) return false; if (!this.masterPublicIpAddress.equals(that.masterPublicIpAddress)) return false; } boolean this_present_clusterStatus = true && this.isSetClusterStatus(); boolean that_present_clusterStatus = true && that.isSetClusterStatus(); if (this_present_clusterStatus || that_present_clusterStatus) { if (!(this_present_clusterStatus && that_present_clusterStatus)) return false; if (!this.clusterStatus.equals(that.clusterStatus)) return false; } boolean this_present_softConfig = true && this.isSetSoftConfig(); boolean that_present_softConfig = true && that.isSetSoftConfig(); if (this_present_softConfig || that_present_softConfig) { if (!(this_present_softConfig && that_present_softConfig)) return false; if (!this.softConfig.equals(that.softConfig)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_clusterId = true && (isSetClusterId()); list.add(present_clusterId); if (present_clusterId) list.add(clusterId); boolean present_ownerId = true && (isSetOwnerId()); list.add(present_ownerId); if (present_ownerId) list.add(ownerId); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_region = true && (isSetRegion()); list.add(present_region); if (present_region) list.add(region); boolean present_purpose = true && (isSetPurpose()); list.add(present_purpose); if (present_purpose) list.add(purpose); boolean present_keyPair = true && (isSetKeyPair()); list.add(present_keyPair); if (present_keyPair) list.add(keyPair); boolean present_autoTerminate = true && (isSetAutoTerminate()); list.add(present_autoTerminate); if (present_autoTerminate) list.add(autoTerminate); boolean present_terminationProtected = true && (isSetTerminationProtected()); list.add(present_terminationProtected); if (present_terminationProtected) list.add(terminationProtected); boolean present_instanceGroups = true && (isSetInstanceGroups()); list.add(present_instanceGroups); if (present_instanceGroups) list.add(instanceGroups); boolean present_masterPublicDnsName = true && (isSetMasterPublicDnsName()); list.add(present_masterPublicDnsName); if (present_masterPublicDnsName) list.add(masterPublicDnsName); boolean present_masterPublicIpAddress = true && (isSetMasterPublicIpAddress()); list.add(present_masterPublicIpAddress); if (present_masterPublicIpAddress) list.add(masterPublicIpAddress); boolean present_clusterStatus = true && (isSetClusterStatus()); list.add(present_clusterStatus); if (present_clusterStatus) list.add(clusterStatus); boolean present_softConfig = true && (isSetSoftConfig()); list.add(present_softConfig); if (present_softConfig) list.add(softConfig); return list.hashCode(); } @Override public int compareTo(ClusterDetail other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetClusterId()).compareTo(other.isSetClusterId()); if (lastComparison != 0) { return lastComparison; } if (isSetClusterId()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterId, other.clusterId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId()); if (lastComparison != 0) { return lastComparison; } if (isSetOwnerId()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.ownerId, other.ownerId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRegion()).compareTo(other.isSetRegion()); if (lastComparison != 0) { return lastComparison; } if (isSetRegion()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.region, other.region); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPurpose()).compareTo(other.isSetPurpose()); if (lastComparison != 0) { return lastComparison; } if (isSetPurpose()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.purpose, other.purpose); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetKeyPair()).compareTo(other.isSetKeyPair()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyPair()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.keyPair, other.keyPair); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAutoTerminate()).compareTo(other.isSetAutoTerminate()); if (lastComparison != 0) { return lastComparison; } if (isSetAutoTerminate()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.autoTerminate, other.autoTerminate); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTerminationProtected()).compareTo(other.isSetTerminationProtected()); if (lastComparison != 0) { return lastComparison; } if (isSetTerminationProtected()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.terminationProtected, other.terminationProtected); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetInstanceGroups()).compareTo(other.isSetInstanceGroups()); if (lastComparison != 0) { return lastComparison; } if (isSetInstanceGroups()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.instanceGroups, other.instanceGroups); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMasterPublicDnsName()).compareTo(other.isSetMasterPublicDnsName()); if (lastComparison != 0) { return lastComparison; } if (isSetMasterPublicDnsName()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.masterPublicDnsName, other.masterPublicDnsName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMasterPublicIpAddress()).compareTo(other.isSetMasterPublicIpAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetMasterPublicIpAddress()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.masterPublicIpAddress, other.masterPublicIpAddress); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetClusterStatus()).compareTo(other.isSetClusterStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetClusterStatus()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.clusterStatus, other.clusterStatus); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSoftConfig()).compareTo(other.isSetSoftConfig()); if (lastComparison != 0) { return lastComparison; } if (isSetSoftConfig()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.softConfig, other.softConfig); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("ClusterDetail("); boolean first = true; sb.append("clusterId:"); if (this.clusterId == null) { sb.append("null"); } else { sb.append(this.clusterId); } first = false; if (!first) sb.append(", "); sb.append("ownerId:"); if (this.ownerId == null) { sb.append("null"); } else { sb.append(this.ownerId); } first = false; if (isSetName()) { if (!first) sb.append(", "); sb.append("name:"); if (this.name == null) { sb.append("null"); } else { sb.append(this.name); } first = false; } if (isSetRegion()) { if (!first) sb.append(", "); sb.append("region:"); if (this.region == null) { sb.append("null"); } else { sb.append(this.region); } first = false; } if (isSetPurpose()) { if (!first) sb.append(", "); sb.append("purpose:"); if (this.purpose == null) { sb.append("null"); } else { sb.append(this.purpose); } first = false; } if (isSetKeyPair()) { if (!first) sb.append(", "); sb.append("keyPair:"); if (this.keyPair == null) { sb.append("null"); } else { sb.append(this.keyPair); } first = false; } if (isSetAutoTerminate()) { if (!first) sb.append(", "); sb.append("autoTerminate:"); sb.append(this.autoTerminate); first = false; } if (isSetTerminationProtected()) { if (!first) sb.append(", "); sb.append("terminationProtected:"); sb.append(this.terminationProtected); first = false; } if (isSetInstanceGroups()) { if (!first) sb.append(", "); sb.append("instanceGroups:"); if (this.instanceGroups == null) { sb.append("null"); } else { sb.append(this.instanceGroups); } first = false; } if (isSetMasterPublicDnsName()) { if (!first) sb.append(", "); sb.append("masterPublicDnsName:"); if (this.masterPublicDnsName == null) { sb.append("null"); } else { sb.append(this.masterPublicDnsName); } first = false; } if (isSetMasterPublicIpAddress()) { if (!first) sb.append(", "); sb.append("masterPublicIpAddress:"); if (this.masterPublicIpAddress == null) { sb.append("null"); } else { sb.append(this.masterPublicIpAddress); } first = false; } if (isSetClusterStatus()) { if (!first) sb.append(", "); sb.append("clusterStatus:"); if (this.clusterStatus == null) { sb.append("null"); } else { sb.append(this.clusterStatus); } first = false; } if (isSetSoftConfig()) { if (!first) sb.append(", "); sb.append("softConfig:"); if (this.softConfig == null) { sb.append("null"); } else { sb.append(this.softConfig); } first = false; } sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields if (clusterId == null) { throw new libthrift091.protocol.TProtocolException("Required field 'clusterId' was not present! Struct: " + toString()); } if (ownerId == null) { throw new libthrift091.protocol.TProtocolException("Required field 'ownerId' was not present! Struct: " + toString()); } // check for sub-struct validity if (clusterStatus != null) { clusterStatus.validate(); } if (softConfig != null) { softConfig.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class ClusterDetailStandardSchemeFactory implements SchemeFactory { public ClusterDetailStandardScheme getScheme() { return new ClusterDetailStandardScheme(); } } private static class ClusterDetailStandardScheme extends StandardScheme<ClusterDetail> { public void read(libthrift091.protocol.TProtocol iprot, ClusterDetail struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // CLUSTER_ID if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.clusterId = iprot.readString(); struct.setClusterIdIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OWNER_ID if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NAME if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // REGION if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.region = iprot.readString(); struct.setRegionIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // PURPOSE if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.purpose = iprot.readString(); struct.setPurposeIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // KEY_PAIR if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.keyPair = iprot.readString(); struct.setKeyPairIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // AUTO_TERMINATE if (schemeField.type == libthrift091.protocol.TType.BOOL) { struct.autoTerminate = iprot.readBool(); struct.setAutoTerminateIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // TERMINATION_PROTECTED if (schemeField.type == libthrift091.protocol.TType.BOOL) { struct.terminationProtected = iprot.readBool(); struct.setTerminationProtectedIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // INSTANCE_GROUPS if (schemeField.type == libthrift091.protocol.TType.LIST) { { libthrift091.protocol.TList _list188 = iprot.readListBegin(); struct.instanceGroups = new ArrayList<InstanceGroupDetail>(_list188.size); InstanceGroupDetail _elem189; for (int _i190 = 0; _i190 < _list188.size; ++_i190) { _elem189 = new InstanceGroupDetail(); _elem189.read(iprot); struct.instanceGroups.add(_elem189); } iprot.readListEnd(); } struct.setInstanceGroupsIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // MASTER_PUBLIC_DNS_NAME if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.masterPublicDnsName = iprot.readString(); struct.setMasterPublicDnsNameIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // MASTER_PUBLIC_IP_ADDRESS if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.masterPublicIpAddress = iprot.readString(); struct.setMasterPublicIpAddressIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 12: // CLUSTER_STATUS if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.clusterStatus = new Status(); struct.clusterStatus.read(iprot); struct.setClusterStatusIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 13: // SOFT_CONFIG if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.softConfig = new ApplicationSuite(); struct.softConfig.read(iprot); struct.setSoftConfigIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.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(libthrift091.protocol.TProtocol oprot, ClusterDetail struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.clusterId != null) { oprot.writeFieldBegin(CLUSTER_ID_FIELD_DESC); oprot.writeString(struct.clusterId); oprot.writeFieldEnd(); } if (struct.ownerId != null) { oprot.writeFieldBegin(OWNER_ID_FIELD_DESC); oprot.writeString(struct.ownerId); oprot.writeFieldEnd(); } if (struct.name != null) { if (struct.isSetName()) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } } if (struct.region != null) { if (struct.isSetRegion()) { oprot.writeFieldBegin(REGION_FIELD_DESC); oprot.writeString(struct.region); oprot.writeFieldEnd(); } } if (struct.purpose != null) { if (struct.isSetPurpose()) { oprot.writeFieldBegin(PURPOSE_FIELD_DESC); oprot.writeString(struct.purpose); oprot.writeFieldEnd(); } } if (struct.keyPair != null) { if (struct.isSetKeyPair()) { oprot.writeFieldBegin(KEY_PAIR_FIELD_DESC); oprot.writeString(struct.keyPair); oprot.writeFieldEnd(); } } if (struct.isSetAutoTerminate()) { oprot.writeFieldBegin(AUTO_TERMINATE_FIELD_DESC); oprot.writeBool(struct.autoTerminate); oprot.writeFieldEnd(); } if (struct.isSetTerminationProtected()) { oprot.writeFieldBegin(TERMINATION_PROTECTED_FIELD_DESC); oprot.writeBool(struct.terminationProtected); oprot.writeFieldEnd(); } if (struct.instanceGroups != null) { if (struct.isSetInstanceGroups()) { oprot.writeFieldBegin(INSTANCE_GROUPS_FIELD_DESC); { oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.instanceGroups.size())); for (InstanceGroupDetail _iter191 : struct.instanceGroups) { _iter191.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } if (struct.masterPublicDnsName != null) { if (struct.isSetMasterPublicDnsName()) { oprot.writeFieldBegin(MASTER_PUBLIC_DNS_NAME_FIELD_DESC); oprot.writeString(struct.masterPublicDnsName); oprot.writeFieldEnd(); } } if (struct.masterPublicIpAddress != null) { if (struct.isSetMasterPublicIpAddress()) { oprot.writeFieldBegin(MASTER_PUBLIC_IP_ADDRESS_FIELD_DESC); oprot.writeString(struct.masterPublicIpAddress); oprot.writeFieldEnd(); } } if (struct.clusterStatus != null) { if (struct.isSetClusterStatus()) { oprot.writeFieldBegin(CLUSTER_STATUS_FIELD_DESC); struct.clusterStatus.write(oprot); oprot.writeFieldEnd(); } } if (struct.softConfig != null) { if (struct.isSetSoftConfig()) { oprot.writeFieldBegin(SOFT_CONFIG_FIELD_DESC); struct.softConfig.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ClusterDetailTupleSchemeFactory implements SchemeFactory { public ClusterDetailTupleScheme getScheme() { return new ClusterDetailTupleScheme(); } } private static class ClusterDetailTupleScheme extends TupleScheme<ClusterDetail> { @Override public void write(libthrift091.protocol.TProtocol prot, ClusterDetail struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.clusterId); oprot.writeString(struct.ownerId); BitSet optionals = new BitSet(); if (struct.isSetName()) { optionals.set(0); } if (struct.isSetRegion()) { optionals.set(1); } if (struct.isSetPurpose()) { optionals.set(2); } if (struct.isSetKeyPair()) { optionals.set(3); } if (struct.isSetAutoTerminate()) { optionals.set(4); } if (struct.isSetTerminationProtected()) { optionals.set(5); } if (struct.isSetInstanceGroups()) { optionals.set(6); } if (struct.isSetMasterPublicDnsName()) { optionals.set(7); } if (struct.isSetMasterPublicIpAddress()) { optionals.set(8); } if (struct.isSetClusterStatus()) { optionals.set(9); } if (struct.isSetSoftConfig()) { optionals.set(10); } oprot.writeBitSet(optionals, 11); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetRegion()) { oprot.writeString(struct.region); } if (struct.isSetPurpose()) { oprot.writeString(struct.purpose); } if (struct.isSetKeyPair()) { oprot.writeString(struct.keyPair); } if (struct.isSetAutoTerminate()) { oprot.writeBool(struct.autoTerminate); } if (struct.isSetTerminationProtected()) { oprot.writeBool(struct.terminationProtected); } if (struct.isSetInstanceGroups()) { { oprot.writeI32(struct.instanceGroups.size()); for (InstanceGroupDetail _iter192 : struct.instanceGroups) { _iter192.write(oprot); } } } if (struct.isSetMasterPublicDnsName()) { oprot.writeString(struct.masterPublicDnsName); } if (struct.isSetMasterPublicIpAddress()) { oprot.writeString(struct.masterPublicIpAddress); } if (struct.isSetClusterStatus()) { struct.clusterStatus.write(oprot); } if (struct.isSetSoftConfig()) { struct.softConfig.write(oprot); } } @Override public void read(libthrift091.protocol.TProtocol prot, ClusterDetail struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.clusterId = iprot.readString(); struct.setClusterIdIsSet(true); struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); BitSet incoming = iprot.readBitSet(11); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(1)) { struct.region = iprot.readString(); struct.setRegionIsSet(true); } if (incoming.get(2)) { struct.purpose = iprot.readString(); struct.setPurposeIsSet(true); } if (incoming.get(3)) { struct.keyPair = iprot.readString(); struct.setKeyPairIsSet(true); } if (incoming.get(4)) { struct.autoTerminate = iprot.readBool(); struct.setAutoTerminateIsSet(true); } if (incoming.get(5)) { struct.terminationProtected = iprot.readBool(); struct.setTerminationProtectedIsSet(true); } if (incoming.get(6)) { { libthrift091.protocol.TList _list193 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32()); struct.instanceGroups = new ArrayList<InstanceGroupDetail>(_list193.size); InstanceGroupDetail _elem194; for (int _i195 = 0; _i195 < _list193.size; ++_i195) { _elem194 = new InstanceGroupDetail(); _elem194.read(iprot); struct.instanceGroups.add(_elem194); } } struct.setInstanceGroupsIsSet(true); } if (incoming.get(7)) { struct.masterPublicDnsName = iprot.readString(); struct.setMasterPublicDnsNameIsSet(true); } if (incoming.get(8)) { struct.masterPublicIpAddress = iprot.readString(); struct.setMasterPublicIpAddressIsSet(true); } if (incoming.get(9)) { struct.clusterStatus = new Status(); struct.clusterStatus.read(iprot); struct.setClusterStatusIsSet(true); } if (incoming.get(10)) { struct.softConfig = new ApplicationSuite(); struct.softConfig.read(iprot); struct.setSoftConfigIsSet(true); } } } }