http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/EndMaintenanceResult.java ---------------------------------------------------------------------- diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/EndMaintenanceResult.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/EndMaintenanceResult.java new file mode 100644 index 0000000..ee855cb --- /dev/null +++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/EndMaintenanceResult.java @@ -0,0 +1,452 @@ +/** + * 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.airavata.cloud.aurora.client.sdk; + +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 = "2016-10-21") +public class EndMaintenanceResult implements org.apache.thrift.TBase<EndMaintenanceResult, EndMaintenanceResult._Fields>, java.io.Serializable, Cloneable, Comparable<EndMaintenanceResult> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("EndMaintenanceResult"); + + private static final org.apache.thrift.protocol.TField STATUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("statuses", org.apache.thrift.protocol.TType.SET, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new EndMaintenanceResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new EndMaintenanceResultTupleSchemeFactory()); + } + + public Set<HostStatus> statuses; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATUSES((short)1, "statuses"); + + 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: // STATUSES + return STATUSES; + 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 + 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.STATUSES, new org.apache.thrift.meta_data.FieldMetaData("statuses", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HostStatus.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EndMaintenanceResult.class, metaDataMap); + } + + public EndMaintenanceResult() { + } + + public EndMaintenanceResult( + Set<HostStatus> statuses) + { + this(); + this.statuses = statuses; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public EndMaintenanceResult(EndMaintenanceResult other) { + if (other.isSetStatuses()) { + Set<HostStatus> __this__statuses = new HashSet<HostStatus>(other.statuses.size()); + for (HostStatus other_element : other.statuses) { + __this__statuses.add(new HostStatus(other_element)); + } + this.statuses = __this__statuses; + } + } + + public EndMaintenanceResult deepCopy() { + return new EndMaintenanceResult(this); + } + + @Override + public void clear() { + this.statuses = null; + } + + public int getStatusesSize() { + return (this.statuses == null) ? 0 : this.statuses.size(); + } + + public java.util.Iterator<HostStatus> getStatusesIterator() { + return (this.statuses == null) ? null : this.statuses.iterator(); + } + + public void addToStatuses(HostStatus elem) { + if (this.statuses == null) { + this.statuses = new HashSet<HostStatus>(); + } + this.statuses.add(elem); + } + + public Set<HostStatus> getStatuses() { + return this.statuses; + } + + public EndMaintenanceResult setStatuses(Set<HostStatus> statuses) { + this.statuses = statuses; + return this; + } + + public void unsetStatuses() { + this.statuses = null; + } + + /** Returns true if field statuses is set (has been assigned a value) and false otherwise */ + public boolean isSetStatuses() { + return this.statuses != null; + } + + public void setStatusesIsSet(boolean value) { + if (!value) { + this.statuses = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATUSES: + if (value == null) { + unsetStatuses(); + } else { + setStatuses((Set<HostStatus>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATUSES: + return getStatuses(); + + } + 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 STATUSES: + return isSetStatuses(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof EndMaintenanceResult) + return this.equals((EndMaintenanceResult)that); + return false; + } + + public boolean equals(EndMaintenanceResult that) { + if (that == null) + return false; + + boolean this_present_statuses = true && this.isSetStatuses(); + boolean that_present_statuses = true && that.isSetStatuses(); + if (this_present_statuses || that_present_statuses) { + if (!(this_present_statuses && that_present_statuses)) + return false; + if (!this.statuses.equals(that.statuses)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_statuses = true && (isSetStatuses()); + list.add(present_statuses); + if (present_statuses) + list.add(statuses); + + return list.hashCode(); + } + + @Override + public int compareTo(EndMaintenanceResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStatuses()).compareTo(other.isSetStatuses()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatuses()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statuses, other.statuses); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("EndMaintenanceResult("); + boolean first = true; + + sb.append("statuses:"); + if (this.statuses == null) { + sb.append("null"); + } else { + sb.append(this.statuses); + } + 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, 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 EndMaintenanceResultStandardSchemeFactory implements SchemeFactory { + public EndMaintenanceResultStandardScheme getScheme() { + return new EndMaintenanceResultStandardScheme(); + } + } + + private static class EndMaintenanceResultStandardScheme extends StandardScheme<EndMaintenanceResult> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, EndMaintenanceResult 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: // STATUSES + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set294 = iprot.readSetBegin(); + struct.statuses = new HashSet<HostStatus>(2*_set294.size); + HostStatus _elem295; + for (int _i296 = 0; _i296 < _set294.size; ++_i296) + { + _elem295 = new HostStatus(); + _elem295.read(iprot); + struct.statuses.add(_elem295); + } + iprot.readSetEnd(); + } + struct.setStatusesIsSet(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(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, EndMaintenanceResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.statuses != null) { + oprot.writeFieldBegin(STATUSES_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.statuses.size())); + for (HostStatus _iter297 : struct.statuses) + { + _iter297.write(oprot); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class EndMaintenanceResultTupleSchemeFactory implements SchemeFactory { + public EndMaintenanceResultTupleScheme getScheme() { + return new EndMaintenanceResultTupleScheme(); + } + } + + private static class EndMaintenanceResultTupleScheme extends TupleScheme<EndMaintenanceResult> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, EndMaintenanceResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStatuses()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetStatuses()) { + { + oprot.writeI32(struct.statuses.size()); + for (HostStatus _iter298 : struct.statuses) + { + _iter298.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, EndMaintenanceResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TSet _set299 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.statuses = new HashSet<HostStatus>(2*_set299.size); + HostStatus _elem300; + for (int _i301 = 0; _i301 < _set299.size; ++_i301) + { + _elem300 = new HostStatus(); + _elem300.read(iprot); + struct.statuses.add(_elem300); + } + } + struct.setStatusesIsSet(true); + } + } + } + +} +
http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExecutorConfig.java ---------------------------------------------------------------------- diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExecutorConfig.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExecutorConfig.java new file mode 100644 index 0000000..1ceaa36 --- /dev/null +++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExecutorConfig.java @@ -0,0 +1,527 @@ +/** + * 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.airavata.cloud.aurora.client.sdk; + +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 = "2016-10-21") +public class ExecutorConfig implements org.apache.thrift.TBase<ExecutorConfig, ExecutorConfig._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorConfig> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorConfig"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ExecutorConfigStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ExecutorConfigTupleSchemeFactory()); + } + + /** + * Name identifying the Executor. + */ + public String name; // required + /** + * Executor configuration data. + */ + public String data; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * Name identifying the Executor. + */ + NAME((short)1, "name"), + /** + * Executor configuration data. + */ + DATA((short)2, "data"); + + 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: // NAME + return NAME; + case 2: // DATA + return DATA; + 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 + 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorConfig.class, metaDataMap); + } + + public ExecutorConfig() { + } + + public ExecutorConfig( + String name, + String data) + { + this(); + this.name = name; + this.data = data; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ExecutorConfig(ExecutorConfig other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetData()) { + this.data = other.data; + } + } + + public ExecutorConfig deepCopy() { + return new ExecutorConfig(this); + } + + @Override + public void clear() { + this.name = null; + this.data = null; + } + + /** + * Name identifying the Executor. + */ + public String getName() { + return this.name; + } + + /** + * Name identifying the Executor. + */ + public ExecutorConfig 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; + } + } + + /** + * Executor configuration data. + */ + public String getData() { + return this.data; + } + + /** + * Executor configuration data. + */ + public ExecutorConfig setData(String data) { + this.data = data; + return this; + } + + public void unsetData() { + this.data = null; + } + + /** Returns true if field data is set (has been assigned a value) and false otherwise */ + public boolean isSetData() { + return this.data != null; + } + + public void setDataIsSet(boolean value) { + if (!value) { + this.data = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DATA: + if (value == null) { + unsetData(); + } else { + setData((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DATA: + return getData(); + + } + 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 NAME: + return isSetName(); + case DATA: + return isSetData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ExecutorConfig) + return this.equals((ExecutorConfig)that); + return false; + } + + public boolean equals(ExecutorConfig that) { + if (that == null) + 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_data = true && this.isSetData(); + boolean that_present_data = true && that.isSetData(); + if (this_present_data || that_present_data) { + if (!(this_present_data && that_present_data)) + return false; + if (!this.data.equals(that.data)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_name = true && (isSetName()); + list.add(present_name); + if (present_name) + list.add(name); + + boolean present_data = true && (isSetData()); + list.add(present_data); + if (present_data) + list.add(data); + + return list.hashCode(); + } + + @Override + public int compareTo(ExecutorConfig other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ExecutorConfig("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("data:"); + if (this.data == null) { + sb.append("null"); + } else { + sb.append(this.data); + } + 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, 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 ExecutorConfigStandardSchemeFactory implements SchemeFactory { + public ExecutorConfigStandardScheme getScheme() { + return new ExecutorConfigStandardScheme(); + } + } + + private static class ExecutorConfigStandardScheme extends StandardScheme<ExecutorConfig> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorConfig 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: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DATA + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.data = iprot.readString(); + struct.setDataIsSet(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(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ExecutorConfig struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(struct.name); + oprot.writeFieldEnd(); + } + if (struct.data != null) { + oprot.writeFieldBegin(DATA_FIELD_DESC); + oprot.writeString(struct.data); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ExecutorConfigTupleSchemeFactory implements SchemeFactory { + public ExecutorConfigTupleScheme getScheme() { + return new ExecutorConfigTupleScheme(); + } + } + + private static class ExecutorConfigTupleScheme extends TupleScheme<ExecutorConfig> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorConfig struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetData()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetName()) { + oprot.writeString(struct.name); + } + if (struct.isSetData()) { + oprot.writeString(struct.data); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorConfig struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.name = iprot.readString(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.data = iprot.readString(); + struct.setDataIsSet(true); + } + } + } + +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExplicitReconciliationSettings.java ---------------------------------------------------------------------- diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExplicitReconciliationSettings.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExplicitReconciliationSettings.java new file mode 100644 index 0000000..4cf6df9 --- /dev/null +++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/ExplicitReconciliationSettings.java @@ -0,0 +1,393 @@ +/** + * 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.airavata.cloud.aurora.client.sdk; + +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 = "2016-10-21") +public class ExplicitReconciliationSettings implements org.apache.thrift.TBase<ExplicitReconciliationSettings, ExplicitReconciliationSettings._Fields>, java.io.Serializable, Cloneable, Comparable<ExplicitReconciliationSettings> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExplicitReconciliationSettings"); + + private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batchSize", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ExplicitReconciliationSettingsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ExplicitReconciliationSettingsTupleSchemeFactory()); + } + + public int batchSize; // 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 { + BATCH_SIZE((short)1, "batchSize"); + + 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: // BATCH_SIZE + return BATCH_SIZE; + 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 __BATCHSIZE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.BATCH_SIZE}; + 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.BATCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("batchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExplicitReconciliationSettings.class, metaDataMap); + } + + public ExplicitReconciliationSettings() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ExplicitReconciliationSettings(ExplicitReconciliationSettings other) { + __isset_bitfield = other.__isset_bitfield; + this.batchSize = other.batchSize; + } + + public ExplicitReconciliationSettings deepCopy() { + return new ExplicitReconciliationSettings(this); + } + + @Override + public void clear() { + setBatchSizeIsSet(false); + this.batchSize = 0; + } + + public int getBatchSize() { + return this.batchSize; + } + + public ExplicitReconciliationSettings setBatchSize(int batchSize) { + this.batchSize = batchSize; + setBatchSizeIsSet(true); + return this; + } + + public void unsetBatchSize() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BATCHSIZE_ISSET_ID); + } + + /** Returns true if field batchSize is set (has been assigned a value) and false otherwise */ + public boolean isSetBatchSize() { + return EncodingUtils.testBit(__isset_bitfield, __BATCHSIZE_ISSET_ID); + } + + public void setBatchSizeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BATCHSIZE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case BATCH_SIZE: + if (value == null) { + unsetBatchSize(); + } else { + setBatchSize((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case BATCH_SIZE: + return getBatchSize(); + + } + 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 BATCH_SIZE: + return isSetBatchSize(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ExplicitReconciliationSettings) + return this.equals((ExplicitReconciliationSettings)that); + return false; + } + + public boolean equals(ExplicitReconciliationSettings that) { + if (that == null) + return false; + + boolean this_present_batchSize = true && this.isSetBatchSize(); + boolean that_present_batchSize = true && that.isSetBatchSize(); + if (this_present_batchSize || that_present_batchSize) { + if (!(this_present_batchSize && that_present_batchSize)) + return false; + if (this.batchSize != that.batchSize) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_batchSize = true && (isSetBatchSize()); + list.add(present_batchSize); + if (present_batchSize) + list.add(batchSize); + + return list.hashCode(); + } + + @Override + public int compareTo(ExplicitReconciliationSettings other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetBatchSize()).compareTo(other.isSetBatchSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBatchSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, other.batchSize); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ExplicitReconciliationSettings("); + boolean first = true; + + if (isSetBatchSize()) { + sb.append("batchSize:"); + sb.append(this.batchSize); + 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, 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 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 ExplicitReconciliationSettingsStandardSchemeFactory implements SchemeFactory { + public ExplicitReconciliationSettingsStandardScheme getScheme() { + return new ExplicitReconciliationSettingsStandardScheme(); + } + } + + private static class ExplicitReconciliationSettingsStandardScheme extends StandardScheme<ExplicitReconciliationSettings> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ExplicitReconciliationSettings 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: // BATCH_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.batchSize = iprot.readI32(); + struct.setBatchSizeIsSet(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(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ExplicitReconciliationSettings struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetBatchSize()) { + oprot.writeFieldBegin(BATCH_SIZE_FIELD_DESC); + oprot.writeI32(struct.batchSize); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ExplicitReconciliationSettingsTupleSchemeFactory implements SchemeFactory { + public ExplicitReconciliationSettingsTupleScheme getScheme() { + return new ExplicitReconciliationSettingsTupleScheme(); + } + } + + private static class ExplicitReconciliationSettingsTupleScheme extends TupleScheme<ExplicitReconciliationSettings> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ExplicitReconciliationSettings struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetBatchSize()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetBatchSize()) { + oprot.writeI32(struct.batchSize); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ExplicitReconciliationSettings struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.batchSize = iprot.readI32(); + struct.setBatchSizeIsSet(true); + } + } + } + +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/GetJobUpdateDetailsResult.java ---------------------------------------------------------------------- diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/GetJobUpdateDetailsResult.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/GetJobUpdateDetailsResult.java new file mode 100644 index 0000000..035fa10 --- /dev/null +++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/GetJobUpdateDetailsResult.java @@ -0,0 +1,565 @@ +/** + * 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.airavata.cloud.aurora.client.sdk; + +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"}) +/** + * Result of the getJobUpdateDetails call. + */ +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-21") +public class GetJobUpdateDetailsResult implements org.apache.thrift.TBase<GetJobUpdateDetailsResult, GetJobUpdateDetailsResult._Fields>, java.io.Serializable, Cloneable, Comparable<GetJobUpdateDetailsResult> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetJobUpdateDetailsResult"); + + private static final org.apache.thrift.protocol.TField DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("details", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField DETAILS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("detailsList", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new GetJobUpdateDetailsResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetJobUpdateDetailsResultTupleSchemeFactory()); + } + + public JobUpdateDetails details; // required + public List<JobUpdateDetails> detailsList; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DETAILS((short)1, "details"), + DETAILS_LIST((short)2, "detailsList"); + + 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: // DETAILS + return DETAILS; + case 2: // DETAILS_LIST + return DETAILS_LIST; + 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 + 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.DETAILS, new org.apache.thrift.meta_data.FieldMetaData("details", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobUpdateDetails.class))); + tmpMap.put(_Fields.DETAILS_LIST, new org.apache.thrift.meta_data.FieldMetaData("detailsList", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobUpdateDetails.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetJobUpdateDetailsResult.class, metaDataMap); + } + + public GetJobUpdateDetailsResult() { + } + + public GetJobUpdateDetailsResult( + JobUpdateDetails details, + List<JobUpdateDetails> detailsList) + { + this(); + this.details = details; + this.detailsList = detailsList; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public GetJobUpdateDetailsResult(GetJobUpdateDetailsResult other) { + if (other.isSetDetails()) { + this.details = new JobUpdateDetails(other.details); + } + if (other.isSetDetailsList()) { + List<JobUpdateDetails> __this__detailsList = new ArrayList<JobUpdateDetails>(other.detailsList.size()); + for (JobUpdateDetails other_element : other.detailsList) { + __this__detailsList.add(new JobUpdateDetails(other_element)); + } + this.detailsList = __this__detailsList; + } + } + + public GetJobUpdateDetailsResult deepCopy() { + return new GetJobUpdateDetailsResult(this); + } + + @Override + public void clear() { + this.details = null; + this.detailsList = null; + } + + public JobUpdateDetails getDetails() { + return this.details; + } + + public GetJobUpdateDetailsResult setDetails(JobUpdateDetails details) { + this.details = details; + return this; + } + + public void unsetDetails() { + this.details = null; + } + + /** Returns true if field details is set (has been assigned a value) and false otherwise */ + public boolean isSetDetails() { + return this.details != null; + } + + public void setDetailsIsSet(boolean value) { + if (!value) { + this.details = null; + } + } + + public int getDetailsListSize() { + return (this.detailsList == null) ? 0 : this.detailsList.size(); + } + + public java.util.Iterator<JobUpdateDetails> getDetailsListIterator() { + return (this.detailsList == null) ? null : this.detailsList.iterator(); + } + + public void addToDetailsList(JobUpdateDetails elem) { + if (this.detailsList == null) { + this.detailsList = new ArrayList<JobUpdateDetails>(); + } + this.detailsList.add(elem); + } + + public List<JobUpdateDetails> getDetailsList() { + return this.detailsList; + } + + public GetJobUpdateDetailsResult setDetailsList(List<JobUpdateDetails> detailsList) { + this.detailsList = detailsList; + return this; + } + + public void unsetDetailsList() { + this.detailsList = null; + } + + /** Returns true if field detailsList is set (has been assigned a value) and false otherwise */ + public boolean isSetDetailsList() { + return this.detailsList != null; + } + + public void setDetailsListIsSet(boolean value) { + if (!value) { + this.detailsList = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DETAILS: + if (value == null) { + unsetDetails(); + } else { + setDetails((JobUpdateDetails)value); + } + break; + + case DETAILS_LIST: + if (value == null) { + unsetDetailsList(); + } else { + setDetailsList((List<JobUpdateDetails>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DETAILS: + return getDetails(); + + case DETAILS_LIST: + return getDetailsList(); + + } + 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 DETAILS: + return isSetDetails(); + case DETAILS_LIST: + return isSetDetailsList(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof GetJobUpdateDetailsResult) + return this.equals((GetJobUpdateDetailsResult)that); + return false; + } + + public boolean equals(GetJobUpdateDetailsResult that) { + if (that == null) + return false; + + boolean this_present_details = true && this.isSetDetails(); + boolean that_present_details = true && that.isSetDetails(); + if (this_present_details || that_present_details) { + if (!(this_present_details && that_present_details)) + return false; + if (!this.details.equals(that.details)) + return false; + } + + boolean this_present_detailsList = true && this.isSetDetailsList(); + boolean that_present_detailsList = true && that.isSetDetailsList(); + if (this_present_detailsList || that_present_detailsList) { + if (!(this_present_detailsList && that_present_detailsList)) + return false; + if (!this.detailsList.equals(that.detailsList)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_details = true && (isSetDetails()); + list.add(present_details); + if (present_details) + list.add(details); + + boolean present_detailsList = true && (isSetDetailsList()); + list.add(present_detailsList); + if (present_detailsList) + list.add(detailsList); + + return list.hashCode(); + } + + @Override + public int compareTo(GetJobUpdateDetailsResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDetails()).compareTo(other.isSetDetails()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDetails()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.details, other.details); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDetailsList()).compareTo(other.isSetDetailsList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDetailsList()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.detailsList, other.detailsList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("GetJobUpdateDetailsResult("); + boolean first = true; + + sb.append("details:"); + if (this.details == null) { + sb.append("null"); + } else { + sb.append(this.details); + } + first = false; + if (!first) sb.append(", "); + sb.append("detailsList:"); + if (this.detailsList == null) { + sb.append("null"); + } else { + sb.append(this.detailsList); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (details != null) { + details.validate(); + } + } + + 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, 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 GetJobUpdateDetailsResultStandardSchemeFactory implements SchemeFactory { + public GetJobUpdateDetailsResultStandardScheme getScheme() { + return new GetJobUpdateDetailsResultStandardScheme(); + } + } + + private static class GetJobUpdateDetailsResultStandardScheme extends StandardScheme<GetJobUpdateDetailsResult> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, GetJobUpdateDetailsResult 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: // DETAILS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.details = new JobUpdateDetails(); + struct.details.read(iprot); + struct.setDetailsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DETAILS_LIST + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list334 = iprot.readListBegin(); + struct.detailsList = new ArrayList<JobUpdateDetails>(_list334.size); + JobUpdateDetails _elem335; + for (int _i336 = 0; _i336 < _list334.size; ++_i336) + { + _elem335 = new JobUpdateDetails(); + _elem335.read(iprot); + struct.detailsList.add(_elem335); + } + iprot.readListEnd(); + } + struct.setDetailsListIsSet(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(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, GetJobUpdateDetailsResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.details != null) { + oprot.writeFieldBegin(DETAILS_FIELD_DESC); + struct.details.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.detailsList != null) { + oprot.writeFieldBegin(DETAILS_LIST_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.detailsList.size())); + for (JobUpdateDetails _iter337 : struct.detailsList) + { + _iter337.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class GetJobUpdateDetailsResultTupleSchemeFactory implements SchemeFactory { + public GetJobUpdateDetailsResultTupleScheme getScheme() { + return new GetJobUpdateDetailsResultTupleScheme(); + } + } + + private static class GetJobUpdateDetailsResultTupleScheme extends TupleScheme<GetJobUpdateDetailsResult> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, GetJobUpdateDetailsResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDetails()) { + optionals.set(0); + } + if (struct.isSetDetailsList()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetDetails()) { + struct.details.write(oprot); + } + if (struct.isSetDetailsList()) { + { + oprot.writeI32(struct.detailsList.size()); + for (JobUpdateDetails _iter338 : struct.detailsList) + { + _iter338.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, GetJobUpdateDetailsResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.details = new JobUpdateDetails(); + struct.details.read(iprot); + struct.setDetailsIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list339 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.detailsList = new ArrayList<JobUpdateDetails>(_list339.size); + JobUpdateDetails _elem340; + for (int _i341 = 0; _i341 < _list339.size; ++_i341) + { + _elem340 = new JobUpdateDetails(); + _elem340.read(iprot); + struct.detailsList.add(_elem340); + } + } + struct.setDetailsListIsSet(true); + } + } + } + +} +
