You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2013/11/13 19:14:51 UTC
svn commit: r1541646 [4/6] - in /airavata/trunk: ./ modules/thrift/
modules/thrift/interpreter-service-client/
modules/thrift/interpreter-service-client/src/
modules/thrift/interpreter-service-client/src/main/
modules/thrift/interpreter-service-client/...
Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,686 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.experiment.execution;
+
+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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MyProxyRepositorySettings implements org.apache.thrift.TBase<MyProxyRepositorySettings, MyProxyRepositorySettings._Fields>, java.io.Serializable, Cloneable, Comparable<MyProxyRepositorySettings> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MyProxyRepositorySettings");
+
+ private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField MYPROXY_SERVER_FIELD_DESC = new org.apache.thrift.protocol.TField("myproxyServer", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField LIFETIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lifetime", org.apache.thrift.protocol.TType.I32, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new MyProxyRepositorySettingsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new MyProxyRepositorySettingsTupleSchemeFactory());
+ }
+
+ public String userName; // required
+ public String password; // required
+ public String myproxyServer; // required
+ public int lifetime; // 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 {
+ USER_NAME((short)1, "userName"),
+ PASSWORD((short)2, "password"),
+ MYPROXY_SERVER((short)3, "myproxyServer"),
+ LIFETIME((short)4, "lifetime");
+
+ 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: // USER_NAME
+ return USER_NAME;
+ case 2: // PASSWORD
+ return PASSWORD;
+ case 3: // MYPROXY_SERVER
+ return MYPROXY_SERVER;
+ case 4: // LIFETIME
+ return LIFETIME;
+ 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 __LIFETIME_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ 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.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MYPROXY_SERVER, new org.apache.thrift.meta_data.FieldMetaData("myproxyServer", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.LIFETIME, new org.apache.thrift.meta_data.FieldMetaData("lifetime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MyProxyRepositorySettings.class, metaDataMap);
+ }
+
+ public MyProxyRepositorySettings() {
+ }
+
+ public MyProxyRepositorySettings(
+ String userName,
+ String password,
+ String myproxyServer,
+ int lifetime)
+ {
+ this();
+ this.userName = userName;
+ this.password = password;
+ this.myproxyServer = myproxyServer;
+ this.lifetime = lifetime;
+ setLifetimeIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public MyProxyRepositorySettings(MyProxyRepositorySettings other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetUserName()) {
+ this.userName = other.userName;
+ }
+ if (other.isSetPassword()) {
+ this.password = other.password;
+ }
+ if (other.isSetMyproxyServer()) {
+ this.myproxyServer = other.myproxyServer;
+ }
+ this.lifetime = other.lifetime;
+ }
+
+ public MyProxyRepositorySettings deepCopy() {
+ return new MyProxyRepositorySettings(this);
+ }
+
+ @Override
+ public void clear() {
+ this.userName = null;
+ this.password = null;
+ this.myproxyServer = null;
+ setLifetimeIsSet(false);
+ this.lifetime = 0;
+ }
+
+ public String getUserName() {
+ return this.userName;
+ }
+
+ public MyProxyRepositorySettings setUserName(String userName) {
+ this.userName = userName;
+ return this;
+ }
+
+ public void unsetUserName() {
+ this.userName = null;
+ }
+
+ /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+ public boolean isSetUserName() {
+ return this.userName != null;
+ }
+
+ public void setUserNameIsSet(boolean value) {
+ if (!value) {
+ this.userName = null;
+ }
+ }
+
+ public String getPassword() {
+ return this.password;
+ }
+
+ public MyProxyRepositorySettings setPassword(String password) {
+ this.password = password;
+ return this;
+ }
+
+ public void unsetPassword() {
+ this.password = null;
+ }
+
+ /** Returns true if field password is set (has been assigned a value) and false otherwise */
+ public boolean isSetPassword() {
+ return this.password != null;
+ }
+
+ public void setPasswordIsSet(boolean value) {
+ if (!value) {
+ this.password = null;
+ }
+ }
+
+ public String getMyproxyServer() {
+ return this.myproxyServer;
+ }
+
+ public MyProxyRepositorySettings setMyproxyServer(String myproxyServer) {
+ this.myproxyServer = myproxyServer;
+ return this;
+ }
+
+ public void unsetMyproxyServer() {
+ this.myproxyServer = null;
+ }
+
+ /** Returns true if field myproxyServer is set (has been assigned a value) and false otherwise */
+ public boolean isSetMyproxyServer() {
+ return this.myproxyServer != null;
+ }
+
+ public void setMyproxyServerIsSet(boolean value) {
+ if (!value) {
+ this.myproxyServer = null;
+ }
+ }
+
+ public int getLifetime() {
+ return this.lifetime;
+ }
+
+ public MyProxyRepositorySettings setLifetime(int lifetime) {
+ this.lifetime = lifetime;
+ setLifetimeIsSet(true);
+ return this;
+ }
+
+ public void unsetLifetime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIFETIME_ISSET_ID);
+ }
+
+ /** Returns true if field lifetime is set (has been assigned a value) and false otherwise */
+ public boolean isSetLifetime() {
+ return EncodingUtils.testBit(__isset_bitfield, __LIFETIME_ISSET_ID);
+ }
+
+ public void setLifetimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIFETIME_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case USER_NAME:
+ if (value == null) {
+ unsetUserName();
+ } else {
+ setUserName((String)value);
+ }
+ break;
+
+ case PASSWORD:
+ if (value == null) {
+ unsetPassword();
+ } else {
+ setPassword((String)value);
+ }
+ break;
+
+ case MYPROXY_SERVER:
+ if (value == null) {
+ unsetMyproxyServer();
+ } else {
+ setMyproxyServer((String)value);
+ }
+ break;
+
+ case LIFETIME:
+ if (value == null) {
+ unsetLifetime();
+ } else {
+ setLifetime((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case USER_NAME:
+ return getUserName();
+
+ case PASSWORD:
+ return getPassword();
+
+ case MYPROXY_SERVER:
+ return getMyproxyServer();
+
+ case LIFETIME:
+ return Integer.valueOf(getLifetime());
+
+ }
+ 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 USER_NAME:
+ return isSetUserName();
+ case PASSWORD:
+ return isSetPassword();
+ case MYPROXY_SERVER:
+ return isSetMyproxyServer();
+ case LIFETIME:
+ return isSetLifetime();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof MyProxyRepositorySettings)
+ return this.equals((MyProxyRepositorySettings)that);
+ return false;
+ }
+
+ public boolean equals(MyProxyRepositorySettings that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_userName = true && this.isSetUserName();
+ boolean that_present_userName = true && that.isSetUserName();
+ if (this_present_userName || that_present_userName) {
+ if (!(this_present_userName && that_present_userName))
+ return false;
+ if (!this.userName.equals(that.userName))
+ return false;
+ }
+
+ boolean this_present_password = true && this.isSetPassword();
+ boolean that_present_password = true && that.isSetPassword();
+ if (this_present_password || that_present_password) {
+ if (!(this_present_password && that_present_password))
+ return false;
+ if (!this.password.equals(that.password))
+ return false;
+ }
+
+ boolean this_present_myproxyServer = true && this.isSetMyproxyServer();
+ boolean that_present_myproxyServer = true && that.isSetMyproxyServer();
+ if (this_present_myproxyServer || that_present_myproxyServer) {
+ if (!(this_present_myproxyServer && that_present_myproxyServer))
+ return false;
+ if (!this.myproxyServer.equals(that.myproxyServer))
+ return false;
+ }
+
+ boolean this_present_lifetime = true;
+ boolean that_present_lifetime = true;
+ if (this_present_lifetime || that_present_lifetime) {
+ if (!(this_present_lifetime && that_present_lifetime))
+ return false;
+ if (this.lifetime != that.lifetime)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(MyProxyRepositorySettings other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUserName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPassword()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMyproxyServer()).compareTo(other.isSetMyproxyServer());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMyproxyServer()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myproxyServer, other.myproxyServer);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLifetime()).compareTo(other.isSetLifetime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLifetime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lifetime, other.lifetime);
+ 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("MyProxyRepositorySettings(");
+ boolean first = true;
+
+ sb.append("userName:");
+ if (this.userName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.userName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("password:");
+ if (this.password == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.password);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("myproxyServer:");
+ if (this.myproxyServer == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.myproxyServer);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("lifetime:");
+ sb.append(this.lifetime);
+ 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 MyProxyRepositorySettingsStandardSchemeFactory implements SchemeFactory {
+ public MyProxyRepositorySettingsStandardScheme getScheme() {
+ return new MyProxyRepositorySettingsStandardScheme();
+ }
+ }
+
+ private static class MyProxyRepositorySettingsStandardScheme extends StandardScheme<MyProxyRepositorySettings> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, MyProxyRepositorySettings 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: // USER_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PASSWORD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // MYPROXY_SERVER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.myproxyServer = iprot.readString();
+ struct.setMyproxyServerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // LIFETIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.lifetime = iprot.readI32();
+ struct.setLifetimeIsSet(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, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.userName != null) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(struct.userName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.password != null) {
+ oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
+ oprot.writeString(struct.password);
+ oprot.writeFieldEnd();
+ }
+ if (struct.myproxyServer != null) {
+ oprot.writeFieldBegin(MYPROXY_SERVER_FIELD_DESC);
+ oprot.writeString(struct.myproxyServer);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(LIFETIME_FIELD_DESC);
+ oprot.writeI32(struct.lifetime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class MyProxyRepositorySettingsTupleSchemeFactory implements SchemeFactory {
+ public MyProxyRepositorySettingsTupleScheme getScheme() {
+ return new MyProxyRepositorySettingsTupleScheme();
+ }
+ }
+
+ private static class MyProxyRepositorySettingsTupleScheme extends TupleScheme<MyProxyRepositorySettings> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetUserName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPassword()) {
+ optionals.set(1);
+ }
+ if (struct.isSetMyproxyServer()) {
+ optionals.set(2);
+ }
+ if (struct.isSetLifetime()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetUserName()) {
+ oprot.writeString(struct.userName);
+ }
+ if (struct.isSetPassword()) {
+ oprot.writeString(struct.password);
+ }
+ if (struct.isSetMyproxyServer()) {
+ oprot.writeString(struct.myproxyServer);
+ }
+ if (struct.isSetLifetime()) {
+ oprot.writeI32(struct.lifetime);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.userName = iprot.readString();
+ struct.setUserNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.myproxyServer = iprot.readString();
+ struct.setMyproxyServerIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.lifetime = iprot.readI32();
+ struct.setLifetimeIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,588 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.experiment.execution;
+
+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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NameValuePairType implements org.apache.thrift.TBase<NameValuePairType, NameValuePairType._Fields>, java.io.Serializable, Cloneable, Comparable<NameValuePairType> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NameValuePairType");
+
+ 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 VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new NameValuePairTypeStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new NameValuePairTypeTupleSchemeFactory());
+ }
+
+ public String name; // required
+ public String value; // required
+ public String description; // 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((short)1, "name"),
+ VALUE((short)2, "value"),
+ DESCRIPTION((short)3, "description");
+
+ 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: // VALUE
+ return VALUE;
+ case 3: // DESCRIPTION
+ return DESCRIPTION;
+ 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.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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(NameValuePairType.class, metaDataMap);
+ }
+
+ public NameValuePairType() {
+ }
+
+ public NameValuePairType(
+ String name,
+ String value,
+ String description)
+ {
+ this();
+ this.name = name;
+ this.value = value;
+ this.description = description;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public NameValuePairType(NameValuePairType other) {
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetValue()) {
+ this.value = other.value;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ }
+
+ public NameValuePairType deepCopy() {
+ return new NameValuePairType(this);
+ }
+
+ @Override
+ public void clear() {
+ this.name = null;
+ this.value = null;
+ this.description = null;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public NameValuePairType 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 getValue() {
+ return this.value;
+ }
+
+ public NameValuePairType setValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ public void unsetValue() {
+ this.value = null;
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return this.value != null;
+ }
+
+ public void setValueIsSet(boolean value) {
+ if (!value) {
+ this.value = null;
+ }
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public NameValuePairType setDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ /** Returns true if field description is set (has been assigned a value) and false otherwise */
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.description = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NAME:
+ return getName();
+
+ case VALUE:
+ return getValue();
+
+ case DESCRIPTION:
+ return getDescription();
+
+ }
+ 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 VALUE:
+ return isSetValue();
+ case DESCRIPTION:
+ return isSetDescription();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof NameValuePairType)
+ return this.equals((NameValuePairType)that);
+ return false;
+ }
+
+ public boolean equals(NameValuePairType 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_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (!this.value.equals(that.value))
+ return false;
+ }
+
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(NameValuePairType 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(isSetValue()).compareTo(other.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+ 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("NameValuePairType(");
+ 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("value:");
+ if (this.value == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.value);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ 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 NameValuePairTypeStandardSchemeFactory implements SchemeFactory {
+ public NameValuePairTypeStandardScheme getScheme() {
+ return new NameValuePairTypeStandardScheme();
+ }
+ }
+
+ private static class NameValuePairTypeStandardScheme extends StandardScheme<NameValuePairType> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, NameValuePairType 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: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(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, NameValuePairType 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.value != null) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeString(struct.value);
+ oprot.writeFieldEnd();
+ }
+ if (struct.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class NameValuePairTypeTupleSchemeFactory implements SchemeFactory {
+ public NameValuePairTypeTupleScheme getScheme() {
+ return new NameValuePairTypeTupleScheme();
+ }
+ }
+
+ private static class NameValuePairTypeTupleScheme extends TupleScheme<NameValuePairType> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetValue()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDescription()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetValue()) {
+ oprot.writeString(struct.value);
+ }
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.value = iprot.readString();
+ struct.setValueIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,852 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.experiment.execution;
+
+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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class NodeSettings implements org.apache.thrift.TBase<NodeSettings, NodeSettings._Fields>, java.io.Serializable, Cloneable, Comparable<NodeSettings> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NodeSettings");
+
+ private static final org.apache.thrift.protocol.TField NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SERVICE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField HOST_SCHEDULING_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("hostSchedulingSettings", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField HPC_SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("hpcSettings", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField NAME_VALUE_PAIR_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("nameValuePairList", org.apache.thrift.protocol.TType.LIST, (short)5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new NodeSettingsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new NodeSettingsTupleSchemeFactory());
+ }
+
+ public String nodeId; // required
+ public String serviceId; // required
+ public HostSchedulingSettings hostSchedulingSettings; // required
+ public HPCSettings hpcSettings; // required
+ public List<NameValuePairType> nameValuePairList; // 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 {
+ NODE_ID((short)1, "nodeId"),
+ SERVICE_ID((short)2, "serviceId"),
+ HOST_SCHEDULING_SETTINGS((short)3, "hostSchedulingSettings"),
+ HPC_SETTINGS((short)4, "hpcSettings"),
+ NAME_VALUE_PAIR_LIST((short)5, "nameValuePairList");
+
+ 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: // NODE_ID
+ return NODE_ID;
+ case 2: // SERVICE_ID
+ return SERVICE_ID;
+ case 3: // HOST_SCHEDULING_SETTINGS
+ return HOST_SCHEDULING_SETTINGS;
+ case 4: // HPC_SETTINGS
+ return HPC_SETTINGS;
+ case 5: // NAME_VALUE_PAIR_LIST
+ return NAME_VALUE_PAIR_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.NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("nodeId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SERVICE_ID, new org.apache.thrift.meta_data.FieldMetaData("serviceId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HOST_SCHEDULING_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("hostSchedulingSettings", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HostSchedulingSettings.class)));
+ tmpMap.put(_Fields.HPC_SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("hpcSettings", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HPCSettings.class)));
+ tmpMap.put(_Fields.NAME_VALUE_PAIR_LIST, new org.apache.thrift.meta_data.FieldMetaData("nameValuePairList", 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, NameValuePairType.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NodeSettings.class, metaDataMap);
+ }
+
+ public NodeSettings() {
+ }
+
+ public NodeSettings(
+ String nodeId,
+ String serviceId,
+ HostSchedulingSettings hostSchedulingSettings,
+ HPCSettings hpcSettings,
+ List<NameValuePairType> nameValuePairList)
+ {
+ this();
+ this.nodeId = nodeId;
+ this.serviceId = serviceId;
+ this.hostSchedulingSettings = hostSchedulingSettings;
+ this.hpcSettings = hpcSettings;
+ this.nameValuePairList = nameValuePairList;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public NodeSettings(NodeSettings other) {
+ if (other.isSetNodeId()) {
+ this.nodeId = other.nodeId;
+ }
+ if (other.isSetServiceId()) {
+ this.serviceId = other.serviceId;
+ }
+ if (other.isSetHostSchedulingSettings()) {
+ this.hostSchedulingSettings = new HostSchedulingSettings(other.hostSchedulingSettings);
+ }
+ if (other.isSetHpcSettings()) {
+ this.hpcSettings = new HPCSettings(other.hpcSettings);
+ }
+ if (other.isSetNameValuePairList()) {
+ List<NameValuePairType> __this__nameValuePairList = new ArrayList<NameValuePairType>(other.nameValuePairList.size());
+ for (NameValuePairType other_element : other.nameValuePairList) {
+ __this__nameValuePairList.add(new NameValuePairType(other_element));
+ }
+ this.nameValuePairList = __this__nameValuePairList;
+ }
+ }
+
+ public NodeSettings deepCopy() {
+ return new NodeSettings(this);
+ }
+
+ @Override
+ public void clear() {
+ this.nodeId = null;
+ this.serviceId = null;
+ this.hostSchedulingSettings = null;
+ this.hpcSettings = null;
+ this.nameValuePairList = null;
+ }
+
+ public String getNodeId() {
+ return this.nodeId;
+ }
+
+ public NodeSettings setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ return this;
+ }
+
+ public void unsetNodeId() {
+ this.nodeId = null;
+ }
+
+ /** Returns true if field nodeId is set (has been assigned a value) and false otherwise */
+ public boolean isSetNodeId() {
+ return this.nodeId != null;
+ }
+
+ public void setNodeIdIsSet(boolean value) {
+ if (!value) {
+ this.nodeId = null;
+ }
+ }
+
+ public String getServiceId() {
+ return this.serviceId;
+ }
+
+ public NodeSettings setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ return this;
+ }
+
+ public void unsetServiceId() {
+ this.serviceId = null;
+ }
+
+ /** Returns true if field serviceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetServiceId() {
+ return this.serviceId != null;
+ }
+
+ public void setServiceIdIsSet(boolean value) {
+ if (!value) {
+ this.serviceId = null;
+ }
+ }
+
+ public HostSchedulingSettings getHostSchedulingSettings() {
+ return this.hostSchedulingSettings;
+ }
+
+ public NodeSettings setHostSchedulingSettings(HostSchedulingSettings hostSchedulingSettings) {
+ this.hostSchedulingSettings = hostSchedulingSettings;
+ return this;
+ }
+
+ public void unsetHostSchedulingSettings() {
+ this.hostSchedulingSettings = null;
+ }
+
+ /** Returns true if field hostSchedulingSettings is set (has been assigned a value) and false otherwise */
+ public boolean isSetHostSchedulingSettings() {
+ return this.hostSchedulingSettings != null;
+ }
+
+ public void setHostSchedulingSettingsIsSet(boolean value) {
+ if (!value) {
+ this.hostSchedulingSettings = null;
+ }
+ }
+
+ public HPCSettings getHpcSettings() {
+ return this.hpcSettings;
+ }
+
+ public NodeSettings setHpcSettings(HPCSettings hpcSettings) {
+ this.hpcSettings = hpcSettings;
+ return this;
+ }
+
+ public void unsetHpcSettings() {
+ this.hpcSettings = null;
+ }
+
+ /** Returns true if field hpcSettings is set (has been assigned a value) and false otherwise */
+ public boolean isSetHpcSettings() {
+ return this.hpcSettings != null;
+ }
+
+ public void setHpcSettingsIsSet(boolean value) {
+ if (!value) {
+ this.hpcSettings = null;
+ }
+ }
+
+ public int getNameValuePairListSize() {
+ return (this.nameValuePairList == null) ? 0 : this.nameValuePairList.size();
+ }
+
+ public java.util.Iterator<NameValuePairType> getNameValuePairListIterator() {
+ return (this.nameValuePairList == null) ? null : this.nameValuePairList.iterator();
+ }
+
+ public void addToNameValuePairList(NameValuePairType elem) {
+ if (this.nameValuePairList == null) {
+ this.nameValuePairList = new ArrayList<NameValuePairType>();
+ }
+ this.nameValuePairList.add(elem);
+ }
+
+ public List<NameValuePairType> getNameValuePairList() {
+ return this.nameValuePairList;
+ }
+
+ public NodeSettings setNameValuePairList(List<NameValuePairType> nameValuePairList) {
+ this.nameValuePairList = nameValuePairList;
+ return this;
+ }
+
+ public void unsetNameValuePairList() {
+ this.nameValuePairList = null;
+ }
+
+ /** Returns true if field nameValuePairList is set (has been assigned a value) and false otherwise */
+ public boolean isSetNameValuePairList() {
+ return this.nameValuePairList != null;
+ }
+
+ public void setNameValuePairListIsSet(boolean value) {
+ if (!value) {
+ this.nameValuePairList = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NODE_ID:
+ if (value == null) {
+ unsetNodeId();
+ } else {
+ setNodeId((String)value);
+ }
+ break;
+
+ case SERVICE_ID:
+ if (value == null) {
+ unsetServiceId();
+ } else {
+ setServiceId((String)value);
+ }
+ break;
+
+ case HOST_SCHEDULING_SETTINGS:
+ if (value == null) {
+ unsetHostSchedulingSettings();
+ } else {
+ setHostSchedulingSettings((HostSchedulingSettings)value);
+ }
+ break;
+
+ case HPC_SETTINGS:
+ if (value == null) {
+ unsetHpcSettings();
+ } else {
+ setHpcSettings((HPCSettings)value);
+ }
+ break;
+
+ case NAME_VALUE_PAIR_LIST:
+ if (value == null) {
+ unsetNameValuePairList();
+ } else {
+ setNameValuePairList((List<NameValuePairType>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NODE_ID:
+ return getNodeId();
+
+ case SERVICE_ID:
+ return getServiceId();
+
+ case HOST_SCHEDULING_SETTINGS:
+ return getHostSchedulingSettings();
+
+ case HPC_SETTINGS:
+ return getHpcSettings();
+
+ case NAME_VALUE_PAIR_LIST:
+ return getNameValuePairList();
+
+ }
+ 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 NODE_ID:
+ return isSetNodeId();
+ case SERVICE_ID:
+ return isSetServiceId();
+ case HOST_SCHEDULING_SETTINGS:
+ return isSetHostSchedulingSettings();
+ case HPC_SETTINGS:
+ return isSetHpcSettings();
+ case NAME_VALUE_PAIR_LIST:
+ return isSetNameValuePairList();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof NodeSettings)
+ return this.equals((NodeSettings)that);
+ return false;
+ }
+
+ public boolean equals(NodeSettings that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_nodeId = true && this.isSetNodeId();
+ boolean that_present_nodeId = true && that.isSetNodeId();
+ if (this_present_nodeId || that_present_nodeId) {
+ if (!(this_present_nodeId && that_present_nodeId))
+ return false;
+ if (!this.nodeId.equals(that.nodeId))
+ return false;
+ }
+
+ boolean this_present_serviceId = true && this.isSetServiceId();
+ boolean that_present_serviceId = true && that.isSetServiceId();
+ if (this_present_serviceId || that_present_serviceId) {
+ if (!(this_present_serviceId && that_present_serviceId))
+ return false;
+ if (!this.serviceId.equals(that.serviceId))
+ return false;
+ }
+
+ boolean this_present_hostSchedulingSettings = true && this.isSetHostSchedulingSettings();
+ boolean that_present_hostSchedulingSettings = true && that.isSetHostSchedulingSettings();
+ if (this_present_hostSchedulingSettings || that_present_hostSchedulingSettings) {
+ if (!(this_present_hostSchedulingSettings && that_present_hostSchedulingSettings))
+ return false;
+ if (!this.hostSchedulingSettings.equals(that.hostSchedulingSettings))
+ return false;
+ }
+
+ boolean this_present_hpcSettings = true && this.isSetHpcSettings();
+ boolean that_present_hpcSettings = true && that.isSetHpcSettings();
+ if (this_present_hpcSettings || that_present_hpcSettings) {
+ if (!(this_present_hpcSettings && that_present_hpcSettings))
+ return false;
+ if (!this.hpcSettings.equals(that.hpcSettings))
+ return false;
+ }
+
+ boolean this_present_nameValuePairList = true && this.isSetNameValuePairList();
+ boolean that_present_nameValuePairList = true && that.isSetNameValuePairList();
+ if (this_present_nameValuePairList || that_present_nameValuePairList) {
+ if (!(this_present_nameValuePairList && that_present_nameValuePairList))
+ return false;
+ if (!this.nameValuePairList.equals(that.nameValuePairList))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(NodeSettings other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetNodeId()).compareTo(other.isSetNodeId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNodeId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeId, other.nodeId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetServiceId()).compareTo(other.isSetServiceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServiceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceId, other.serviceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHostSchedulingSettings()).compareTo(other.isSetHostSchedulingSettings());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHostSchedulingSettings()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostSchedulingSettings, other.hostSchedulingSettings);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHpcSettings()).compareTo(other.isSetHpcSettings());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHpcSettings()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hpcSettings, other.hpcSettings);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNameValuePairList()).compareTo(other.isSetNameValuePairList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNameValuePairList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameValuePairList, other.nameValuePairList);
+ 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("NodeSettings(");
+ boolean first = true;
+
+ sb.append("nodeId:");
+ if (this.nodeId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nodeId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("serviceId:");
+ if (this.serviceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serviceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hostSchedulingSettings:");
+ if (this.hostSchedulingSettings == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.hostSchedulingSettings);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hpcSettings:");
+ if (this.hpcSettings == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.hpcSettings);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("nameValuePairList:");
+ if (this.nameValuePairList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.nameValuePairList);
+ }
+ 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 (hostSchedulingSettings != null) {
+ hostSchedulingSettings.validate();
+ }
+ if (hpcSettings != null) {
+ hpcSettings.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 NodeSettingsStandardSchemeFactory implements SchemeFactory {
+ public NodeSettingsStandardScheme getScheme() {
+ return new NodeSettingsStandardScheme();
+ }
+ }
+
+ private static class NodeSettingsStandardScheme extends StandardScheme<NodeSettings> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, NodeSettings 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: // NODE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nodeId = iprot.readString();
+ struct.setNodeIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SERVICE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.serviceId = iprot.readString();
+ struct.setServiceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // HOST_SCHEDULING_SETTINGS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.hostSchedulingSettings = new HostSchedulingSettings();
+ struct.hostSchedulingSettings.read(iprot);
+ struct.setHostSchedulingSettingsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // HPC_SETTINGS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.hpcSettings = new HPCSettings();
+ struct.hpcSettings.read(iprot);
+ struct.setHpcSettingsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // NAME_VALUE_PAIR_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.nameValuePairList = new ArrayList<NameValuePairType>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ NameValuePairType _elem2;
+ _elem2 = new NameValuePairType();
+ _elem2.read(iprot);
+ struct.nameValuePairList.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setNameValuePairListIsSet(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, NodeSettings struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.nodeId != null) {
+ oprot.writeFieldBegin(NODE_ID_FIELD_DESC);
+ oprot.writeString(struct.nodeId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.serviceId != null) {
+ oprot.writeFieldBegin(SERVICE_ID_FIELD_DESC);
+ oprot.writeString(struct.serviceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.hostSchedulingSettings != null) {
+ oprot.writeFieldBegin(HOST_SCHEDULING_SETTINGS_FIELD_DESC);
+ struct.hostSchedulingSettings.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.hpcSettings != null) {
+ oprot.writeFieldBegin(HPC_SETTINGS_FIELD_DESC);
+ struct.hpcSettings.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.nameValuePairList != null) {
+ oprot.writeFieldBegin(NAME_VALUE_PAIR_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nameValuePairList.size()));
+ for (NameValuePairType _iter3 : struct.nameValuePairList)
+ {
+ _iter3.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class NodeSettingsTupleSchemeFactory implements SchemeFactory {
+ public NodeSettingsTupleScheme getScheme() {
+ return new NodeSettingsTupleScheme();
+ }
+ }
+
+ private static class NodeSettingsTupleScheme extends TupleScheme<NodeSettings> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, NodeSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetNodeId()) {
+ optionals.set(0);
+ }
+ if (struct.isSetServiceId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetHostSchedulingSettings()) {
+ optionals.set(2);
+ }
+ if (struct.isSetHpcSettings()) {
+ optionals.set(3);
+ }
+ if (struct.isSetNameValuePairList()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetNodeId()) {
+ oprot.writeString(struct.nodeId);
+ }
+ if (struct.isSetServiceId()) {
+ oprot.writeString(struct.serviceId);
+ }
+ if (struct.isSetHostSchedulingSettings()) {
+ struct.hostSchedulingSettings.write(oprot);
+ }
+ if (struct.isSetHpcSettings()) {
+ struct.hpcSettings.write(oprot);
+ }
+ if (struct.isSetNameValuePairList()) {
+ {
+ oprot.writeI32(struct.nameValuePairList.size());
+ for (NameValuePairType _iter4 : struct.nameValuePairList)
+ {
+ _iter4.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, NodeSettings struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.nodeId = iprot.readString();
+ struct.setNodeIdIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.serviceId = iprot.readString();
+ struct.setServiceIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.hostSchedulingSettings = new HostSchedulingSettings();
+ struct.hostSchedulingSettings.read(iprot);
+ struct.setHostSchedulingSettingsIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.hpcSettings = new HPCSettings();
+ struct.hpcSettings.read(iprot);
+ struct.setHpcSettingsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.nameValuePairList = new ArrayList<NameValuePairType>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ NameValuePairType _elem7;
+ _elem7 = new NameValuePairType();
+ _elem7.read(iprot);
+ struct.nameValuePairList.add(_elem7);
+ }
+ }
+ struct.setNameValuePairListIsSet(true);
+ }
+ }
+ }
+
+}
+