You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/07/03 22:13:49 UTC
[01/10] Committed generated classes for thrift models - AIRAVATA-1203
Repository: airavata
Updated Branches:
refs/heads/master 52cedaccc -> 59a7443ac
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayProfile.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayProfile.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayProfile.java
index 20b766f..791403e 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayProfile.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/GatewayProfile.java
@@ -51,10 +51,11 @@ import org.slf4j.LoggerFactory;
/**
* Gateway Profile
*
- * resourceId:
+ * gatewayID:
+ * Unique identifier for the gateway assigned by Airavata
*
- * hostName:
- * Fully Qualified Host Name.
+ * gatewayName:
+ * Name of the Gateway.
*
* ipAddress:
* IP Addresse of the Hostname.
@@ -76,7 +77,7 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayID", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField GATEWAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField GATEWAY_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayDescription", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final org.apache.thrift.protocol.TField PREFERED_RESOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("preferedResource", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_PREFERENCES_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourcePreferences", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -87,14 +88,14 @@ import org.slf4j.LoggerFactory;
private String gatewayID; // required
private String gatewayName; // required
private String gatewayDescription; // optional
- private String preferedResource; // optional
+ private List<ComputeResourcePreference> computeResourcePreferences; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
GATEWAY_ID((short)1, "gatewayID"),
GATEWAY_NAME((short)2, "gatewayName"),
GATEWAY_DESCRIPTION((short)3, "gatewayDescription"),
- PREFERED_RESOURCE((short)4, "preferedResource");
+ COMPUTE_RESOURCE_PREFERENCES((short)4, "computeResourcePreferences");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -115,8 +116,8 @@ import org.slf4j.LoggerFactory;
return GATEWAY_NAME;
case 3: // GATEWAY_DESCRIPTION
return GATEWAY_DESCRIPTION;
- case 4: // PREFERED_RESOURCE
- return PREFERED_RESOURCE;
+ case 4: // COMPUTE_RESOURCE_PREFERENCES
+ return COMPUTE_RESOURCE_PREFERENCES;
default:
return null;
}
@@ -157,7 +158,7 @@ import org.slf4j.LoggerFactory;
}
// isset id assignments
- private _Fields optionals[] = {_Fields.GATEWAY_DESCRIPTION,_Fields.PREFERED_RESOURCE};
+ private _Fields optionals[] = {_Fields.GATEWAY_DESCRIPTION,_Fields.COMPUTE_RESOURCE_PREFERENCES};
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);
@@ -167,8 +168,9 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GATEWAY_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("gatewayDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PREFERED_RESOURCE, new org.apache.thrift.meta_data.FieldMetaData("preferedResource", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_PREFERENCES, new org.apache.thrift.meta_data.FieldMetaData("computeResourcePreferences", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, ComputeResourcePreference.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GatewayProfile.class, metaDataMap);
}
@@ -200,8 +202,12 @@ import org.slf4j.LoggerFactory;
if (other.isSetGatewayDescription()) {
this.gatewayDescription = other.gatewayDescription;
}
- if (other.isSetPreferedResource()) {
- this.preferedResource = other.preferedResource;
+ if (other.isSetComputeResourcePreferences()) {
+ List<ComputeResourcePreference> __this__computeResourcePreferences = new ArrayList<ComputeResourcePreference>(other.computeResourcePreferences.size());
+ for (ComputeResourcePreference other_element : other.computeResourcePreferences) {
+ __this__computeResourcePreferences.add(new ComputeResourcePreference(other_element));
+ }
+ this.computeResourcePreferences = __this__computeResourcePreferences;
}
}
@@ -215,7 +221,7 @@ import org.slf4j.LoggerFactory;
this.gatewayName = null;
this.gatewayDescription = null;
- this.preferedResource = null;
+ this.computeResourcePreferences = null;
}
public String getGatewayID() {
@@ -287,26 +293,41 @@ import org.slf4j.LoggerFactory;
}
}
- public String getPreferedResource() {
- return this.preferedResource;
+ public int getComputeResourcePreferencesSize() {
+ return (this.computeResourcePreferences == null) ? 0 : this.computeResourcePreferences.size();
+ }
+
+ public java.util.Iterator<ComputeResourcePreference> getComputeResourcePreferencesIterator() {
+ return (this.computeResourcePreferences == null) ? null : this.computeResourcePreferences.iterator();
+ }
+
+ public void addToComputeResourcePreferences(ComputeResourcePreference elem) {
+ if (this.computeResourcePreferences == null) {
+ this.computeResourcePreferences = new ArrayList<ComputeResourcePreference>();
+ }
+ this.computeResourcePreferences.add(elem);
}
- public void setPreferedResource(String preferedResource) {
- this.preferedResource = preferedResource;
+ public List<ComputeResourcePreference> getComputeResourcePreferences() {
+ return this.computeResourcePreferences;
}
- public void unsetPreferedResource() {
- this.preferedResource = null;
+ public void setComputeResourcePreferences(List<ComputeResourcePreference> computeResourcePreferences) {
+ this.computeResourcePreferences = computeResourcePreferences;
}
- /** Returns true if field preferedResource is set (has been assigned a value) and false otherwise */
- public boolean isSetPreferedResource() {
- return this.preferedResource != null;
+ public void unsetComputeResourcePreferences() {
+ this.computeResourcePreferences = null;
}
- public void setPreferedResourceIsSet(boolean value) {
+ /** Returns true if field computeResourcePreferences is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputeResourcePreferences() {
+ return this.computeResourcePreferences != null;
+ }
+
+ public void setComputeResourcePreferencesIsSet(boolean value) {
if (!value) {
- this.preferedResource = null;
+ this.computeResourcePreferences = null;
}
}
@@ -336,11 +357,11 @@ import org.slf4j.LoggerFactory;
}
break;
- case PREFERED_RESOURCE:
+ case COMPUTE_RESOURCE_PREFERENCES:
if (value == null) {
- unsetPreferedResource();
+ unsetComputeResourcePreferences();
} else {
- setPreferedResource((String)value);
+ setComputeResourcePreferences((List<ComputeResourcePreference>)value);
}
break;
@@ -358,8 +379,8 @@ import org.slf4j.LoggerFactory;
case GATEWAY_DESCRIPTION:
return getGatewayDescription();
- case PREFERED_RESOURCE:
- return getPreferedResource();
+ case COMPUTE_RESOURCE_PREFERENCES:
+ return getComputeResourcePreferences();
}
throw new IllegalStateException();
@@ -378,8 +399,8 @@ import org.slf4j.LoggerFactory;
return isSetGatewayName();
case GATEWAY_DESCRIPTION:
return isSetGatewayDescription();
- case PREFERED_RESOURCE:
- return isSetPreferedResource();
+ case COMPUTE_RESOURCE_PREFERENCES:
+ return isSetComputeResourcePreferences();
}
throw new IllegalStateException();
}
@@ -424,12 +445,12 @@ import org.slf4j.LoggerFactory;
return false;
}
- boolean this_present_preferedResource = true && this.isSetPreferedResource();
- boolean that_present_preferedResource = true && that.isSetPreferedResource();
- if (this_present_preferedResource || that_present_preferedResource) {
- if (!(this_present_preferedResource && that_present_preferedResource))
+ boolean this_present_computeResourcePreferences = true && this.isSetComputeResourcePreferences();
+ boolean that_present_computeResourcePreferences = true && that.isSetComputeResourcePreferences();
+ if (this_present_computeResourcePreferences || that_present_computeResourcePreferences) {
+ if (!(this_present_computeResourcePreferences && that_present_computeResourcePreferences))
return false;
- if (!this.preferedResource.equals(that.preferedResource))
+ if (!this.computeResourcePreferences.equals(that.computeResourcePreferences))
return false;
}
@@ -479,12 +500,12 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPreferedResource()).compareTo(other.isSetPreferedResource());
+ lastComparison = Boolean.valueOf(isSetComputeResourcePreferences()).compareTo(other.isSetComputeResourcePreferences());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetPreferedResource()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferedResource, other.preferedResource);
+ if (isSetComputeResourcePreferences()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourcePreferences, other.computeResourcePreferences);
if (lastComparison != 0) {
return lastComparison;
}
@@ -534,13 +555,13 @@ import org.slf4j.LoggerFactory;
}
first = false;
}
- if (isSetPreferedResource()) {
+ if (isSetComputeResourcePreferences()) {
if (!first) sb.append(", ");
- sb.append("preferedResource:");
- if (this.preferedResource == null) {
+ sb.append("computeResourcePreferences:");
+ if (this.computeResourcePreferences == null) {
sb.append("null");
} else {
- sb.append(this.preferedResource);
+ sb.append(this.computeResourcePreferences);
}
first = false;
}
@@ -619,10 +640,21 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 4: // PREFERED_RESOURCE
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.preferedResource = iprot.readString();
- struct.setPreferedResourceIsSet(true);
+ case 4: // COMPUTE_RESOURCE_PREFERENCES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ ComputeResourcePreference _elem2;
+ _elem2 = new ComputeResourcePreference();
+ _elem2.read(iprot);
+ struct.computeResourcePreferences.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setComputeResourcePreferencesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -657,10 +689,17 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldEnd();
}
}
- if (struct.preferedResource != null) {
- if (struct.isSetPreferedResource()) {
- oprot.writeFieldBegin(PREFERED_RESOURCE_FIELD_DESC);
- oprot.writeString(struct.preferedResource);
+ if (struct.computeResourcePreferences != null) {
+ if (struct.isSetComputeResourcePreferences()) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_PREFERENCES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.computeResourcePreferences.size()));
+ for (ComputeResourcePreference _iter3 : struct.computeResourcePreferences)
+ {
+ _iter3.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
oprot.writeFieldEnd();
}
}
@@ -687,15 +726,21 @@ import org.slf4j.LoggerFactory;
if (struct.isSetGatewayDescription()) {
optionals.set(0);
}
- if (struct.isSetPreferedResource()) {
+ if (struct.isSetComputeResourcePreferences()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetGatewayDescription()) {
oprot.writeString(struct.gatewayDescription);
}
- if (struct.isSetPreferedResource()) {
- oprot.writeString(struct.preferedResource);
+ if (struct.isSetComputeResourcePreferences()) {
+ {
+ oprot.writeI32(struct.computeResourcePreferences.size());
+ for (ComputeResourcePreference _iter4 : struct.computeResourcePreferences)
+ {
+ _iter4.write(oprot);
+ }
+ }
}
}
@@ -712,8 +757,18 @@ import org.slf4j.LoggerFactory;
struct.setGatewayDescriptionIsSet(true);
}
if (incoming.get(1)) {
- struct.preferedResource = iprot.readString();
- struct.setPreferedResourceIsSet(true);
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.computeResourcePreferences = new ArrayList<ComputeResourcePreference>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ ComputeResourcePreference _elem7;
+ _elem7 = new ComputeResourcePreference();
+ _elem7.read(iprot);
+ struct.computeResourcePreferences.add(_elem7);
+ }
+ }
+ struct.setComputeResourcePreferencesIsSet(true);
}
}
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/thrift-interface-descriptions/gatewayProfileModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/gatewayProfileModel.thrift b/airavata-api/thrift-interface-descriptions/gatewayProfileModel.thrift
index 7a82008..f295bbb 100644
--- a/airavata-api/thrift-interface-descriptions/gatewayProfileModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/gatewayProfileModel.thrift
@@ -52,8 +52,8 @@ struct ComputeResourcePreference {
3: optional string preferredJobSubmissionProtocol,
4: optional string preferredDataMovementProtocol,
5: optional string preferredBatchQueue,
- 5: optional string scratchLocation,
- 6: optional string allocationProjectNumber
+ 6: optional string scratchLocation,
+ 7: optional string allocationProjectNumber
}
/**
[08/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
new file mode 100644
index 0000000..ceaa246
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -0,0 +1,1733 @@
+<?php
+namespace Airavata\Model\AppCatalog\ComputeResource;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+final class ResourceJobManager {
+ const FORK = 0;
+ const PBS = 1;
+ const UGE = 2;
+ const SLURM = 3;
+ static public $__names = array(
+ 0 => 'FORK',
+ 1 => 'PBS',
+ 2 => 'UGE',
+ 3 => 'SLURM',
+ );
+}
+
+final class FileSystems {
+ const HOME = 0;
+ const WORK = 1;
+ const LOCALTMP = 2;
+ const SCRATCH = 3;
+ const ARCHIVE = 4;
+ static public $__names = array(
+ 0 => 'HOME',
+ 1 => 'WORK',
+ 2 => 'LOCALTMP',
+ 3 => 'SCRATCH',
+ 4 => 'ARCHIVE',
+ );
+}
+
+final class SecurityProtocol {
+ const USERNAME_PASSWORD = 0;
+ const SSH_KEYS = 1;
+ const GSI = 2;
+ const KERBEROS = 3;
+ const OAUTH = 4;
+ static public $__names = array(
+ 0 => 'USERNAME_PASSWORD',
+ 1 => 'SSH_KEYS',
+ 2 => 'GSI',
+ 3 => 'KERBEROS',
+ 4 => 'OAUTH',
+ );
+}
+
+final class JobSubmissionProtocol {
+ const LOCAL = 0;
+ const SSH = 1;
+ const GSISSH = 2;
+ const GRAM = 3;
+ const UNICORE = 4;
+ static public $__names = array(
+ 0 => 'LOCAL',
+ 1 => 'SSH',
+ 2 => 'GSISSH',
+ 3 => 'GRAM',
+ 4 => 'UNICORE',
+ );
+}
+
+final class DataMovementProtocol {
+ const LOCAL = 0;
+ const SCP = 1;
+ const SFTP = 2;
+ const GridFTP = 3;
+ const UNICORE_STORAGE_SERVICE = 4;
+ static public $__names = array(
+ 0 => 'LOCAL',
+ 1 => 'SCP',
+ 2 => 'SFTP',
+ 3 => 'GridFTP',
+ 4 => 'UNICORE_STORAGE_SERVICE',
+ );
+}
+
+class BatchQueue {
+ static $_TSPEC;
+
+ public $queueName = null;
+ public $queueDescription = null;
+ public $maxRunTime = null;
+ public $maxNodes = null;
+ public $maxProcessors = null;
+ public $maxJobsInQueue = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'queueName',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'queueDescription',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'maxRunTime',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'maxNodes',
+ 'type' => TType::I32,
+ ),
+ 5 => array(
+ 'var' => 'maxProcessors',
+ 'type' => TType::I32,
+ ),
+ 6 => array(
+ 'var' => 'maxJobsInQueue',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['queueName'])) {
+ $this->queueName = $vals['queueName'];
+ }
+ if (isset($vals['queueDescription'])) {
+ $this->queueDescription = $vals['queueDescription'];
+ }
+ if (isset($vals['maxRunTime'])) {
+ $this->maxRunTime = $vals['maxRunTime'];
+ }
+ if (isset($vals['maxNodes'])) {
+ $this->maxNodes = $vals['maxNodes'];
+ }
+ if (isset($vals['maxProcessors'])) {
+ $this->maxProcessors = $vals['maxProcessors'];
+ }
+ if (isset($vals['maxJobsInQueue'])) {
+ $this->maxJobsInQueue = $vals['maxJobsInQueue'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'BatchQueue';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->queueName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->queueDescription);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->maxRunTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->maxNodes);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->maxProcessors);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->maxJobsInQueue);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('BatchQueue');
+ if ($this->queueName !== null) {
+ $xfer += $output->writeFieldBegin('queueName', TType::STRING, 1);
+ $xfer += $output->writeString($this->queueName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->queueDescription !== null) {
+ $xfer += $output->writeFieldBegin('queueDescription', TType::STRING, 2);
+ $xfer += $output->writeString($this->queueDescription);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->maxRunTime !== null) {
+ $xfer += $output->writeFieldBegin('maxRunTime', TType::I32, 3);
+ $xfer += $output->writeI32($this->maxRunTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->maxNodes !== null) {
+ $xfer += $output->writeFieldBegin('maxNodes', TType::I32, 4);
+ $xfer += $output->writeI32($this->maxNodes);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->maxProcessors !== null) {
+ $xfer += $output->writeFieldBegin('maxProcessors', TType::I32, 5);
+ $xfer += $output->writeI32($this->maxProcessors);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->maxJobsInQueue !== null) {
+ $xfer += $output->writeFieldBegin('maxJobsInQueue', TType::I32, 6);
+ $xfer += $output->writeI32($this->maxJobsInQueue);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class SCPDataMovement {
+ static $_TSPEC;
+
+ public $dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+ public $securityProtocol = null;
+ public $alternativeSCPHostName = null;
+ public $sshPort = 22;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dataMovementInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'securityProtocol',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'alternativeSCPHostName',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'sshPort',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['dataMovementInterfaceId'])) {
+ $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
+ }
+ if (isset($vals['securityProtocol'])) {
+ $this->securityProtocol = $vals['securityProtocol'];
+ }
+ if (isset($vals['alternativeSCPHostName'])) {
+ $this->alternativeSCPHostName = $vals['alternativeSCPHostName'];
+ }
+ if (isset($vals['sshPort'])) {
+ $this->sshPort = $vals['sshPort'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'SCPDataMovement';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dataMovementInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->securityProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->alternativeSCPHostName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->sshPort);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('SCPDataMovement');
+ if ($this->dataMovementInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->dataMovementInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->securityProtocol !== null) {
+ $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
+ $xfer += $output->writeI32($this->securityProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->alternativeSCPHostName !== null) {
+ $xfer += $output->writeFieldBegin('alternativeSCPHostName', TType::STRING, 3);
+ $xfer += $output->writeString($this->alternativeSCPHostName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->sshPort !== null) {
+ $xfer += $output->writeFieldBegin('sshPort', TType::I32, 4);
+ $xfer += $output->writeI32($this->sshPort);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class GridFTPDataMovement {
+ static $_TSPEC;
+
+ public $dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+ public $securityProtocol = null;
+ public $gridFTPEndPoints = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dataMovementInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'securityProtocol',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'gridFTPEndPoints',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['dataMovementInterfaceId'])) {
+ $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
+ }
+ if (isset($vals['securityProtocol'])) {
+ $this->securityProtocol = $vals['securityProtocol'];
+ }
+ if (isset($vals['gridFTPEndPoints'])) {
+ $this->gridFTPEndPoints = $vals['gridFTPEndPoints'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'GridFTPDataMovement';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dataMovementInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->securityProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->gridFTPEndPoints = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $xfer += $input->readString($elem5);
+ $this->gridFTPEndPoints []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('GridFTPDataMovement');
+ if ($this->dataMovementInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->dataMovementInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->securityProtocol !== null) {
+ $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
+ $xfer += $output->writeI32($this->securityProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->gridFTPEndPoints !== null) {
+ if (!is_array($this->gridFTPEndPoints)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('gridFTPEndPoints', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::STRING, count($this->gridFTPEndPoints));
+ {
+ foreach ($this->gridFTPEndPoints as $iter6)
+ {
+ $xfer += $output->writeString($iter6);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class LOCALSubmission {
+ static $_TSPEC;
+
+ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+ public $resourceJobManager = null;
+ public $monitoringMechanism = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'jobSubmissionInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'resourceJobManager',
+ 'type' => TType::I32,
+ ),
+ 6 => array(
+ 'var' => 'monitoringMechanism',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['jobSubmissionInterfaceId'])) {
+ $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
+ }
+ if (isset($vals['resourceJobManager'])) {
+ $this->resourceJobManager = $vals['resourceJobManager'];
+ }
+ if (isset($vals['monitoringMechanism'])) {
+ $this->monitoringMechanism = $vals['monitoringMechanism'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'LOCALSubmission';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->jobSubmissionInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->resourceJobManager);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->monitoringMechanism);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('LOCALSubmission');
+ if ($this->jobSubmissionInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->jobSubmissionInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->resourceJobManager !== null) {
+ $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 3);
+ $xfer += $output->writeI32($this->resourceJobManager);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->monitoringMechanism !== null) {
+ $xfer += $output->writeFieldBegin('monitoringMechanism', TType::STRING, 6);
+ $xfer += $output->writeString($this->monitoringMechanism);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class LOCALDataMovement {
+ static $_TSPEC;
+
+ public $dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dataMovementInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['dataMovementInterfaceId'])) {
+ $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'LOCALDataMovement';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dataMovementInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('LOCALDataMovement');
+ if ($this->dataMovementInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->dataMovementInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class SSHJobSubmission {
+ static $_TSPEC;
+
+ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+ public $securityProtocol = null;
+ public $resourceJobManager = null;
+ public $alternativeSSHHostName = null;
+ public $sshPort = 22;
+ public $monitoringMechanism = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'jobSubmissionInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'securityProtocol',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'resourceJobManager',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'alternativeSSHHostName',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'sshPort',
+ 'type' => TType::I32,
+ ),
+ 6 => array(
+ 'var' => 'monitoringMechanism',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['jobSubmissionInterfaceId'])) {
+ $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
+ }
+ if (isset($vals['securityProtocol'])) {
+ $this->securityProtocol = $vals['securityProtocol'];
+ }
+ if (isset($vals['resourceJobManager'])) {
+ $this->resourceJobManager = $vals['resourceJobManager'];
+ }
+ if (isset($vals['alternativeSSHHostName'])) {
+ $this->alternativeSSHHostName = $vals['alternativeSSHHostName'];
+ }
+ if (isset($vals['sshPort'])) {
+ $this->sshPort = $vals['sshPort'];
+ }
+ if (isset($vals['monitoringMechanism'])) {
+ $this->monitoringMechanism = $vals['monitoringMechanism'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'SSHJobSubmission';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->jobSubmissionInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->securityProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->resourceJobManager);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->alternativeSSHHostName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->sshPort);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->monitoringMechanism);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('SSHJobSubmission');
+ if ($this->jobSubmissionInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->jobSubmissionInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->securityProtocol !== null) {
+ $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
+ $xfer += $output->writeI32($this->securityProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->resourceJobManager !== null) {
+ $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 3);
+ $xfer += $output->writeI32($this->resourceJobManager);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->alternativeSSHHostName !== null) {
+ $xfer += $output->writeFieldBegin('alternativeSSHHostName', TType::STRING, 4);
+ $xfer += $output->writeString($this->alternativeSSHHostName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->sshPort !== null) {
+ $xfer += $output->writeFieldBegin('sshPort', TType::I32, 5);
+ $xfer += $output->writeI32($this->sshPort);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->monitoringMechanism !== null) {
+ $xfer += $output->writeFieldBegin('monitoringMechanism', TType::STRING, 6);
+ $xfer += $output->writeString($this->monitoringMechanism);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class GlobusJobSubmission {
+ static $_TSPEC;
+
+ public $jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+ public $securityProtocol = null;
+ public $resourceJobManager = null;
+ public $globusGateKeeperEndPoint = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'jobSubmissionInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'securityProtocol',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'resourceJobManager',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'globusGateKeeperEndPoint',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['jobSubmissionInterfaceId'])) {
+ $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
+ }
+ if (isset($vals['securityProtocol'])) {
+ $this->securityProtocol = $vals['securityProtocol'];
+ }
+ if (isset($vals['resourceJobManager'])) {
+ $this->resourceJobManager = $vals['resourceJobManager'];
+ }
+ if (isset($vals['globusGateKeeperEndPoint'])) {
+ $this->globusGateKeeperEndPoint = $vals['globusGateKeeperEndPoint'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'GlobusJobSubmission';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->jobSubmissionInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->securityProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->resourceJobManager);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::LST) {
+ $this->globusGateKeeperEndPoint = array();
+ $_size7 = 0;
+ $_etype10 = 0;
+ $xfer += $input->readListBegin($_etype10, $_size7);
+ for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+ {
+ $elem12 = null;
+ $xfer += $input->readString($elem12);
+ $this->globusGateKeeperEndPoint []= $elem12;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('GlobusJobSubmission');
+ if ($this->jobSubmissionInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->jobSubmissionInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->securityProtocol !== null) {
+ $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
+ $xfer += $output->writeI32($this->securityProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->resourceJobManager !== null) {
+ $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 3);
+ $xfer += $output->writeI32($this->resourceJobManager);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->globusGateKeeperEndPoint !== null) {
+ if (!is_array($this->globusGateKeeperEndPoint)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('globusGateKeeperEndPoint', TType::LST, 4);
+ {
+ $output->writeListBegin(TType::STRING, count($this->globusGateKeeperEndPoint));
+ {
+ foreach ($this->globusGateKeeperEndPoint as $iter13)
+ {
+ $xfer += $output->writeString($iter13);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class JobSubmissionInterface {
+ static $_TSPEC;
+
+ public $jobSubmissionInterfaceId = null;
+ public $jobSubmissionProtocol = null;
+ public $priorityOrder = 0;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'jobSubmissionInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'jobSubmissionProtocol',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'priorityOrder',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['jobSubmissionInterfaceId'])) {
+ $this->jobSubmissionInterfaceId = $vals['jobSubmissionInterfaceId'];
+ }
+ if (isset($vals['jobSubmissionProtocol'])) {
+ $this->jobSubmissionProtocol = $vals['jobSubmissionProtocol'];
+ }
+ if (isset($vals['priorityOrder'])) {
+ $this->priorityOrder = $vals['priorityOrder'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'JobSubmissionInterface';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->jobSubmissionInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->jobSubmissionProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->priorityOrder);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('JobSubmissionInterface');
+ if ($this->jobSubmissionInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('jobSubmissionInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->jobSubmissionInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->jobSubmissionProtocol !== null) {
+ $xfer += $output->writeFieldBegin('jobSubmissionProtocol', TType::I32, 2);
+ $xfer += $output->writeI32($this->jobSubmissionProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->priorityOrder !== null) {
+ $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 3);
+ $xfer += $output->writeI32($this->priorityOrder);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class DataMovementInterface {
+ static $_TSPEC;
+
+ public $dataMovementInterfaceId = null;
+ public $dataMovementProtocol = null;
+ public $priorityOrder = 0;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dataMovementInterfaceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'dataMovementProtocol',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'priorityOrder',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['dataMovementInterfaceId'])) {
+ $this->dataMovementInterfaceId = $vals['dataMovementInterfaceId'];
+ }
+ if (isset($vals['dataMovementProtocol'])) {
+ $this->dataMovementProtocol = $vals['dataMovementProtocol'];
+ }
+ if (isset($vals['priorityOrder'])) {
+ $this->priorityOrder = $vals['priorityOrder'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'DataMovementInterface';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dataMovementInterfaceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->dataMovementProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->priorityOrder);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('DataMovementInterface');
+ if ($this->dataMovementInterfaceId !== null) {
+ $xfer += $output->writeFieldBegin('dataMovementInterfaceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->dataMovementInterfaceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dataMovementProtocol !== null) {
+ $xfer += $output->writeFieldBegin('dataMovementProtocol', TType::I32, 2);
+ $xfer += $output->writeI32($this->dataMovementProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->priorityOrder !== null) {
+ $xfer += $output->writeFieldBegin('priorityOrder', TType::I32, 3);
+ $xfer += $output->writeI32($this->priorityOrder);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ComputeResourceDescription {
+ static $_TSPEC;
+
+ public $isEmpty = false;
+ public $computeResourceId = "DO_NOT_SET_AT_CLIENTS";
+ public $hostName = null;
+ public $hostAliases = null;
+ public $ipAddresses = null;
+ public $computeResourceDescription = null;
+ public $resourceJobManager = null;
+ public $batchQueues = null;
+ public $fileSystems = null;
+ public $jobSubmissionInterfaces = null;
+ public $dataMovemenetInterfaces = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'isEmpty',
+ 'type' => TType::BOOL,
+ ),
+ 2 => array(
+ 'var' => 'computeResourceId',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'hostName',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'hostAliases',
+ 'type' => TType::SET,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 5 => array(
+ 'var' => 'ipAddresses',
+ 'type' => TType::SET,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 6 => array(
+ 'var' => 'computeResourceDescription',
+ 'type' => TType::STRING,
+ ),
+ 7 => array(
+ 'var' => 'resourceJobManager',
+ 'type' => TType::I32,
+ ),
+ 8 => array(
+ 'var' => 'batchQueues',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\AppCatalog\ComputeResource\BatchQueue',
+ ),
+ ),
+ 9 => array(
+ 'var' => 'fileSystems',
+ 'type' => TType::MAP,
+ 'ktype' => TType::I32,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::I32,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 10 => array(
+ 'var' => 'jobSubmissionInterfaces',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\AppCatalog\ComputeResource\JobSubmissionInterface',
+ ),
+ ),
+ 11 => array(
+ 'var' => 'dataMovemenetInterfaces',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\AppCatalog\ComputeResource\DataMovementInterface',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['isEmpty'])) {
+ $this->isEmpty = $vals['isEmpty'];
+ }
+ if (isset($vals['computeResourceId'])) {
+ $this->computeResourceId = $vals['computeResourceId'];
+ }
+ if (isset($vals['hostName'])) {
+ $this->hostName = $vals['hostName'];
+ }
+ if (isset($vals['hostAliases'])) {
+ $this->hostAliases = $vals['hostAliases'];
+ }
+ if (isset($vals['ipAddresses'])) {
+ $this->ipAddresses = $vals['ipAddresses'];
+ }
+ if (isset($vals['computeResourceDescription'])) {
+ $this->computeResourceDescription = $vals['computeResourceDescription'];
+ }
+ if (isset($vals['resourceJobManager'])) {
+ $this->resourceJobManager = $vals['resourceJobManager'];
+ }
+ if (isset($vals['batchQueues'])) {
+ $this->batchQueues = $vals['batchQueues'];
+ }
+ if (isset($vals['fileSystems'])) {
+ $this->fileSystems = $vals['fileSystems'];
+ }
+ if (isset($vals['jobSubmissionInterfaces'])) {
+ $this->jobSubmissionInterfaces = $vals['jobSubmissionInterfaces'];
+ }
+ if (isset($vals['dataMovemenetInterfaces'])) {
+ $this->dataMovemenetInterfaces = $vals['dataMovemenetInterfaces'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ComputeResourceDescription';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->isEmpty);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->computeResourceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->hostName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::SET) {
+ $this->hostAliases = array();
+ $_size14 = 0;
+ $_etype17 = 0;
+ $xfer += $input->readSetBegin($_etype17, $_size14);
+ for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
+ {
+ $elem19 = null;
+ $xfer += $input->readString($elem19);
+ if (is_scalar($elem19)) {
+ $this->hostAliases[$elem19] = true;
+ } else {
+ $this->hostAliases []= $elem19;
+ }
+ }
+ $xfer += $input->readSetEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::SET) {
+ $this->ipAddresses = array();
+ $_size20 = 0;
+ $_etype23 = 0;
+ $xfer += $input->readSetBegin($_etype23, $_size20);
+ for ($_i24 = 0; $_i24 < $_size20; ++$_i24)
+ {
+ $elem25 = null;
+ $xfer += $input->readString($elem25);
+ if (is_scalar($elem25)) {
+ $this->ipAddresses[$elem25] = true;
+ } else {
+ $this->ipAddresses []= $elem25;
+ }
+ }
+ $xfer += $input->readSetEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->computeResourceDescription);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->resourceJobManager);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::LST) {
+ $this->batchQueues = array();
+ $_size26 = 0;
+ $_etype29 = 0;
+ $xfer += $input->readListBegin($_etype29, $_size26);
+ for ($_i30 = 0; $_i30 < $_size26; ++$_i30)
+ {
+ $elem31 = null;
+ $elem31 = new \Airavata\Model\AppCatalog\ComputeResource\BatchQueue();
+ $xfer += $elem31->read($input);
+ $this->batchQueues []= $elem31;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::MAP) {
+ $this->fileSystems = array();
+ $_size32 = 0;
+ $_ktype33 = 0;
+ $_vtype34 = 0;
+ $xfer += $input->readMapBegin($_ktype33, $_vtype34, $_size32);
+ for ($_i36 = 0; $_i36 < $_size32; ++$_i36)
+ {
+ $key37 = 0;
+ $val38 = '';
+ $xfer += $input->readI32($key37);
+ $xfer += $input->readString($val38);
+ $this->fileSystems[$key37] = $val38;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::LST) {
+ $this->jobSubmissionInterfaces = array();
+ $_size39 = 0;
+ $_etype42 = 0;
+ $xfer += $input->readListBegin($_etype42, $_size39);
+ for ($_i43 = 0; $_i43 < $_size39; ++$_i43)
+ {
+ $elem44 = null;
+ $elem44 = new \Airavata\Model\AppCatalog\ComputeResource\JobSubmissionInterface();
+ $xfer += $elem44->read($input);
+ $this->jobSubmissionInterfaces []= $elem44;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 11:
+ if ($ftype == TType::LST) {
+ $this->dataMovemenetInterfaces = array();
+ $_size45 = 0;
+ $_etype48 = 0;
+ $xfer += $input->readListBegin($_etype48, $_size45);
+ for ($_i49 = 0; $_i49 < $_size45; ++$_i49)
+ {
+ $elem50 = null;
+ $elem50 = new \Airavata\Model\AppCatalog\ComputeResource\DataMovementInterface();
+ $xfer += $elem50->read($input);
+ $this->dataMovemenetInterfaces []= $elem50;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ComputeResourceDescription');
+ if ($this->isEmpty !== null) {
+ $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+ $xfer += $output->writeBool($this->isEmpty);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->computeResourceId !== null) {
+ $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 2);
+ $xfer += $output->writeString($this->computeResourceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->hostName !== null) {
+ $xfer += $output->writeFieldBegin('hostName', TType::STRING, 3);
+ $xfer += $output->writeString($this->hostName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->hostAliases !== null) {
+ if (!is_array($this->hostAliases)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('hostAliases', TType::SET, 4);
+ {
+ $output->writeSetBegin(TType::STRING, count($this->hostAliases));
+ {
+ foreach ($this->hostAliases as $iter51 => $iter52)
+ {
+ if (is_scalar($iter52)) {
+ $xfer += $output->writeString($iter51);
+ } else {
+ $xfer += $output->writeString($iter52);
+ }
+ }
+ }
+ $output->writeSetEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ipAddresses !== null) {
+ if (!is_array($this->ipAddresses)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('ipAddresses', TType::SET, 5);
+ {
+ $output->writeSetBegin(TType::STRING, count($this->ipAddresses));
+ {
+ foreach ($this->ipAddresses as $iter53 => $iter54)
+ {
+ if (is_scalar($iter54)) {
+ $xfer += $output->writeString($iter53);
+ } else {
+ $xfer += $output->writeString($iter54);
+ }
+ }
+ }
+ $output->writeSetEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->computeResourceDescription !== null) {
+ $xfer += $output->writeFieldBegin('computeResourceDescription', TType::STRING, 6);
+ $xfer += $output->writeString($this->computeResourceDescription);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->resourceJobManager !== null) {
+ $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 7);
+ $xfer += $output->writeI32($this->resourceJobManager);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->batchQueues !== null) {
+ if (!is_array($this->batchQueues)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('batchQueues', TType::LST, 8);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->batchQueues));
+ {
+ foreach ($this->batchQueues as $iter55)
+ {
+ $xfer += $iter55->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->fileSystems !== null) {
+ if (!is_array($this->fileSystems)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('fileSystems', TType::MAP, 9);
+ {
+ $output->writeMapBegin(TType::I32, TType::STRING, count($this->fileSystems));
+ {
+ foreach ($this->fileSystems as $kiter56 => $viter57)
+ {
+ $xfer += $output->writeI32($kiter56);
+ $xfer += $output->writeString($viter57);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->jobSubmissionInterfaces !== null) {
+ if (!is_array($this->jobSubmissionInterfaces)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('jobSubmissionInterfaces', TType::LST, 10);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->jobSubmissionInterfaces));
+ {
+ foreach ($this->jobSubmissionInterfaces as $iter58)
+ {
+ $xfer += $iter58->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dataMovemenetInterfaces !== null) {
+ if (!is_array($this->dataMovemenetInterfaces)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('dataMovemenetInterfaces', TType::LST, 11);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->dataMovemenetInterfaces));
+ {
+ foreach ($this->dataMovemenetInterfaces as $iter59)
+ {
+ $xfer += $iter59->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+$GLOBALS['computeResourceModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
+
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
index 1ec9fbc..6201a18 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/GatewayProfile/Types.php
@@ -17,13 +17,205 @@ use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Exception\TApplicationException;
+class ComputeResourcePreference {
+ static $_TSPEC;
+
+ public $computeResourceId = null;
+ public $overridebyAiravata = true;
+ public $preferredJobSubmissionProtocol = null;
+ public $preferredDataMovementProtocol = null;
+ public $preferredBatchQueue = null;
+ public $scratchLocation = null;
+ public $allocationProjectNumber = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'computeResourceId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'overridebyAiravata',
+ 'type' => TType::BOOL,
+ ),
+ 3 => array(
+ 'var' => 'preferredJobSubmissionProtocol',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'preferredDataMovementProtocol',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'preferredBatchQueue',
+ 'type' => TType::STRING,
+ ),
+ 6 => array(
+ 'var' => 'scratchLocation',
+ 'type' => TType::STRING,
+ ),
+ 7 => array(
+ 'var' => 'allocationProjectNumber',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['computeResourceId'])) {
+ $this->computeResourceId = $vals['computeResourceId'];
+ }
+ if (isset($vals['overridebyAiravata'])) {
+ $this->overridebyAiravata = $vals['overridebyAiravata'];
+ }
+ if (isset($vals['preferredJobSubmissionProtocol'])) {
+ $this->preferredJobSubmissionProtocol = $vals['preferredJobSubmissionProtocol'];
+ }
+ if (isset($vals['preferredDataMovementProtocol'])) {
+ $this->preferredDataMovementProtocol = $vals['preferredDataMovementProtocol'];
+ }
+ if (isset($vals['preferredBatchQueue'])) {
+ $this->preferredBatchQueue = $vals['preferredBatchQueue'];
+ }
+ if (isset($vals['scratchLocation'])) {
+ $this->scratchLocation = $vals['scratchLocation'];
+ }
+ if (isset($vals['allocationProjectNumber'])) {
+ $this->allocationProjectNumber = $vals['allocationProjectNumber'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ComputeResourcePreference';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->computeResourceId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->overridebyAiravata);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->preferredJobSubmissionProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->preferredDataMovementProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->preferredBatchQueue);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->scratchLocation);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->allocationProjectNumber);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ComputeResourcePreference');
+ if ($this->computeResourceId !== null) {
+ $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
+ $xfer += $output->writeString($this->computeResourceId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->overridebyAiravata !== null) {
+ $xfer += $output->writeFieldBegin('overridebyAiravata', TType::BOOL, 2);
+ $xfer += $output->writeBool($this->overridebyAiravata);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->preferredJobSubmissionProtocol !== null) {
+ $xfer += $output->writeFieldBegin('preferredJobSubmissionProtocol', TType::STRING, 3);
+ $xfer += $output->writeString($this->preferredJobSubmissionProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->preferredDataMovementProtocol !== null) {
+ $xfer += $output->writeFieldBegin('preferredDataMovementProtocol', TType::STRING, 4);
+ $xfer += $output->writeString($this->preferredDataMovementProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->preferredBatchQueue !== null) {
+ $xfer += $output->writeFieldBegin('preferredBatchQueue', TType::STRING, 5);
+ $xfer += $output->writeString($this->preferredBatchQueue);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->scratchLocation !== null) {
+ $xfer += $output->writeFieldBegin('scratchLocation', TType::STRING, 6);
+ $xfer += $output->writeString($this->scratchLocation);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->allocationProjectNumber !== null) {
+ $xfer += $output->writeFieldBegin('allocationProjectNumber', TType::STRING, 7);
+ $xfer += $output->writeString($this->allocationProjectNumber);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class GatewayProfile {
static $_TSPEC;
public $gatewayID = "DO_NOT_SET_AT_CLIENTS";
public $gatewayName = null;
public $gatewayDescription = null;
- public $preferedResource = null;
+ public $computeResourcePreferences = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -41,8 +233,13 @@ class GatewayProfile {
'type' => TType::STRING,
),
4 => array(
- 'var' => 'preferedResource',
- 'type' => TType::STRING,
+ 'var' => 'computeResourcePreferences',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference',
+ ),
),
);
}
@@ -56,8 +253,8 @@ class GatewayProfile {
if (isset($vals['gatewayDescription'])) {
$this->gatewayDescription = $vals['gatewayDescription'];
}
- if (isset($vals['preferedResource'])) {
- $this->preferedResource = $vals['preferedResource'];
+ if (isset($vals['computeResourcePreferences'])) {
+ $this->computeResourcePreferences = $vals['computeResourcePreferences'];
}
}
}
@@ -103,8 +300,19 @@ class GatewayProfile {
}
break;
case 4:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->preferedResource);
+ if ($ftype == TType::LST) {
+ $this->computeResourcePreferences = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $elem5 = new \Airavata\Model\AppCatalog\GatewayProfile\ComputeResourcePreference();
+ $xfer += $elem5->read($input);
+ $this->computeResourcePreferences []= $elem5;
+ }
+ $xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
@@ -137,9 +345,21 @@ class GatewayProfile {
$xfer += $output->writeString($this->gatewayDescription);
$xfer += $output->writeFieldEnd();
}
- if ($this->preferedResource !== null) {
- $xfer += $output->writeFieldBegin('preferedResource', TType::STRING, 4);
- $xfer += $output->writeString($this->preferedResource);
+ if ($this->computeResourcePreferences !== null) {
+ if (!is_array($this->computeResourcePreferences)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('computeResourcePreferences', TType::LST, 4);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->computeResourcePreferences));
+ {
+ foreach ($this->computeResourcePreferences as $iter6)
+ {
+ $xfer += $iter6->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
index db053ac..b3ed27a 100755
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/registerAppModule.php
@@ -57,7 +57,6 @@ try
$appModuleVersion = $argv[2];
$appModuleDescription = $argv[3];
-
$appModule = new ApplicationModule();
$appModule->appModuleName = $appModuleName;
$appModule->appModuleVersion = $appModuleVersion;
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
index b20793c..f4e5b8b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/appdeployment/ApplicationDeploymentDescription.java
@@ -83,7 +83,7 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField COMPUTE_HOST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeHostId", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField EXECUTABLE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("executablePath", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField APP_DEPLOYMENT_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("appDeploymentDescription", org.apache.thrift.protocol.TType.STRING, (short)6);
- private static final org.apache.thrift.protocol.TField MODULE_LOAD_CMD_FIELD_DESC = new org.apache.thrift.protocol.TField("moduleLoadCmd", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField MODULE_LOAD_CMDS_FIELD_DESC = new org.apache.thrift.protocol.TField("moduleLoadCmds", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.protocol.TField LIB_PREPEND_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("libPrependPaths", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField LIB_APPEND_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("libAppendPaths", org.apache.thrift.protocol.TType.LIST, (short)9);
private static final org.apache.thrift.protocol.TField SET_ENVIRONMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("setEnvironment", org.apache.thrift.protocol.TType.LIST, (short)10);
@@ -100,7 +100,7 @@ import org.slf4j.LoggerFactory;
private String computeHostId; // required
private String executablePath; // required
private String appDeploymentDescription; // optional
- private String moduleLoadCmd; // optional
+ private List<String> moduleLoadCmds; // optional
private List<SetEnvPaths> libPrependPaths; // optional
private List<SetEnvPaths> libAppendPaths; // optional
private List<SetEnvPaths> setEnvironment; // optional
@@ -113,7 +113,7 @@ import org.slf4j.LoggerFactory;
COMPUTE_HOST_ID((short)4, "computeHostId"),
EXECUTABLE_PATH((short)5, "executablePath"),
APP_DEPLOYMENT_DESCRIPTION((short)6, "appDeploymentDescription"),
- MODULE_LOAD_CMD((short)7, "moduleLoadCmd"),
+ MODULE_LOAD_CMDS((short)7, "moduleLoadCmds"),
LIB_PREPEND_PATHS((short)8, "libPrependPaths"),
LIB_APPEND_PATHS((short)9, "libAppendPaths"),
SET_ENVIRONMENT((short)10, "setEnvironment");
@@ -143,8 +143,8 @@ import org.slf4j.LoggerFactory;
return EXECUTABLE_PATH;
case 6: // APP_DEPLOYMENT_DESCRIPTION
return APP_DEPLOYMENT_DESCRIPTION;
- case 7: // MODULE_LOAD_CMD
- return MODULE_LOAD_CMD;
+ case 7: // MODULE_LOAD_CMDS
+ return MODULE_LOAD_CMDS;
case 8: // LIB_PREPEND_PATHS
return LIB_PREPEND_PATHS;
case 9: // LIB_APPEND_PATHS
@@ -193,7 +193,7 @@ import org.slf4j.LoggerFactory;
// isset id assignments
private static final int __ISEMPTY_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMD,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT};
+ private _Fields optionals[] = {_Fields.APP_DEPLOYMENT_DESCRIPTION,_Fields.MODULE_LOAD_CMDS,_Fields.LIB_PREPEND_PATHS,_Fields.LIB_APPEND_PATHS,_Fields.SET_ENVIRONMENT};
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);
@@ -209,8 +209,9 @@ import org.slf4j.LoggerFactory;
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.APP_DEPLOYMENT_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("appDeploymentDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.MODULE_LOAD_CMD, new org.apache.thrift.meta_data.FieldMetaData("moduleLoadCmd", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MODULE_LOAD_CMDS, new org.apache.thrift.meta_data.FieldMetaData("moduleLoadCmds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.LIB_PREPEND_PATHS, new org.apache.thrift.meta_data.FieldMetaData("libPrependPaths", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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, SetEnvPaths.class))));
@@ -268,8 +269,9 @@ import org.slf4j.LoggerFactory;
if (other.isSetAppDeploymentDescription()) {
this.appDeploymentDescription = other.appDeploymentDescription;
}
- if (other.isSetModuleLoadCmd()) {
- this.moduleLoadCmd = other.moduleLoadCmd;
+ if (other.isSetModuleLoadCmds()) {
+ List<String> __this__moduleLoadCmds = new ArrayList<String>(other.moduleLoadCmds);
+ this.moduleLoadCmds = __this__moduleLoadCmds;
}
if (other.isSetLibPrependPaths()) {
List<SetEnvPaths> __this__libPrependPaths = new ArrayList<SetEnvPaths>(other.libPrependPaths.size());
@@ -308,7 +310,7 @@ import org.slf4j.LoggerFactory;
this.computeHostId = null;
this.executablePath = null;
this.appDeploymentDescription = null;
- this.moduleLoadCmd = null;
+ this.moduleLoadCmds = null;
this.libPrependPaths = null;
this.libAppendPaths = null;
this.setEnvironment = null;
@@ -451,26 +453,41 @@ import org.slf4j.LoggerFactory;
}
}
- public String getModuleLoadCmd() {
- return this.moduleLoadCmd;
+ public int getModuleLoadCmdsSize() {
+ return (this.moduleLoadCmds == null) ? 0 : this.moduleLoadCmds.size();
+ }
+
+ public java.util.Iterator<String> getModuleLoadCmdsIterator() {
+ return (this.moduleLoadCmds == null) ? null : this.moduleLoadCmds.iterator();
+ }
+
+ public void addToModuleLoadCmds(String elem) {
+ if (this.moduleLoadCmds == null) {
+ this.moduleLoadCmds = new ArrayList<String>();
+ }
+ this.moduleLoadCmds.add(elem);
+ }
+
+ public List<String> getModuleLoadCmds() {
+ return this.moduleLoadCmds;
}
- public void setModuleLoadCmd(String moduleLoadCmd) {
- this.moduleLoadCmd = moduleLoadCmd;
+ public void setModuleLoadCmds(List<String> moduleLoadCmds) {
+ this.moduleLoadCmds = moduleLoadCmds;
}
- public void unsetModuleLoadCmd() {
- this.moduleLoadCmd = null;
+ public void unsetModuleLoadCmds() {
+ this.moduleLoadCmds = null;
}
- /** Returns true if field moduleLoadCmd is set (has been assigned a value) and false otherwise */
- public boolean isSetModuleLoadCmd() {
- return this.moduleLoadCmd != null;
+ /** Returns true if field moduleLoadCmds is set (has been assigned a value) and false otherwise */
+ public boolean isSetModuleLoadCmds() {
+ return this.moduleLoadCmds != null;
}
- public void setModuleLoadCmdIsSet(boolean value) {
+ public void setModuleLoadCmdsIsSet(boolean value) {
if (!value) {
- this.moduleLoadCmd = null;
+ this.moduleLoadCmds = null;
}
}
@@ -638,11 +655,11 @@ import org.slf4j.LoggerFactory;
}
break;
- case MODULE_LOAD_CMD:
+ case MODULE_LOAD_CMDS:
if (value == null) {
- unsetModuleLoadCmd();
+ unsetModuleLoadCmds();
} else {
- setModuleLoadCmd((String)value);
+ setModuleLoadCmds((List<String>)value);
}
break;
@@ -693,8 +710,8 @@ import org.slf4j.LoggerFactory;
case APP_DEPLOYMENT_DESCRIPTION:
return getAppDeploymentDescription();
- case MODULE_LOAD_CMD:
- return getModuleLoadCmd();
+ case MODULE_LOAD_CMDS:
+ return getModuleLoadCmds();
case LIB_PREPEND_PATHS:
return getLibPrependPaths();
@@ -728,8 +745,8 @@ import org.slf4j.LoggerFactory;
return isSetExecutablePath();
case APP_DEPLOYMENT_DESCRIPTION:
return isSetAppDeploymentDescription();
- case MODULE_LOAD_CMD:
- return isSetModuleLoadCmd();
+ case MODULE_LOAD_CMDS:
+ return isSetModuleLoadCmds();
case LIB_PREPEND_PATHS:
return isSetLibPrependPaths();
case LIB_APPEND_PATHS:
@@ -807,12 +824,12 @@ import org.slf4j.LoggerFactory;
return false;
}
- boolean this_present_moduleLoadCmd = true && this.isSetModuleLoadCmd();
- boolean that_present_moduleLoadCmd = true && that.isSetModuleLoadCmd();
- if (this_present_moduleLoadCmd || that_present_moduleLoadCmd) {
- if (!(this_present_moduleLoadCmd && that_present_moduleLoadCmd))
+ boolean this_present_moduleLoadCmds = true && this.isSetModuleLoadCmds();
+ boolean that_present_moduleLoadCmds = true && that.isSetModuleLoadCmds();
+ if (this_present_moduleLoadCmds || that_present_moduleLoadCmds) {
+ if (!(this_present_moduleLoadCmds && that_present_moduleLoadCmds))
return false;
- if (!this.moduleLoadCmd.equals(that.moduleLoadCmd))
+ if (!this.moduleLoadCmds.equals(that.moduleLoadCmds))
return false;
}
@@ -919,12 +936,12 @@ import org.slf4j.LoggerFactory;
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetModuleLoadCmd()).compareTo(other.isSetModuleLoadCmd());
+ lastComparison = Boolean.valueOf(isSetModuleLoadCmds()).compareTo(other.isSetModuleLoadCmds());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetModuleLoadCmd()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.moduleLoadCmd, other.moduleLoadCmd);
+ if (isSetModuleLoadCmds()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.moduleLoadCmds, other.moduleLoadCmds);
if (lastComparison != 0) {
return lastComparison;
}
@@ -1024,13 +1041,13 @@ import org.slf4j.LoggerFactory;
}
first = false;
}
- if (isSetModuleLoadCmd()) {
+ if (isSetModuleLoadCmds()) {
if (!first) sb.append(", ");
- sb.append("moduleLoadCmd:");
- if (this.moduleLoadCmd == null) {
+ sb.append("moduleLoadCmds:");
+ if (this.moduleLoadCmds == null) {
sb.append("null");
} else {
- sb.append(this.moduleLoadCmd);
+ sb.append(this.moduleLoadCmds);
}
first = false;
}
@@ -1177,63 +1194,73 @@ import org.slf4j.LoggerFactory;
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 7: // MODULE_LOAD_CMD
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.moduleLoadCmd = iprot.readString();
- struct.setModuleLoadCmdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // LIB_PREPEND_PATHS
+ case 7: // MODULE_LOAD_CMDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.libPrependPaths = new ArrayList<SetEnvPaths>(_list0.size);
+ struct.moduleLoadCmds = new ArrayList<String>(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
- SetEnvPaths _elem2;
- _elem2 = new SetEnvPaths();
- _elem2.read(iprot);
- struct.libPrependPaths.add(_elem2);
+ String _elem2;
+ _elem2 = iprot.readString();
+ struct.moduleLoadCmds.add(_elem2);
}
iprot.readListEnd();
}
- struct.setLibPrependPathsIsSet(true);
+ struct.setModuleLoadCmdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 9: // LIB_APPEND_PATHS
+ case 8: // LIB_PREPEND_PATHS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
- struct.libAppendPaths = new ArrayList<SetEnvPaths>(_list3.size);
+ struct.libPrependPaths = new ArrayList<SetEnvPaths>(_list3.size);
for (int _i4 = 0; _i4 < _list3.size; ++_i4)
{
SetEnvPaths _elem5;
_elem5 = new SetEnvPaths();
_elem5.read(iprot);
- struct.libAppendPaths.add(_elem5);
+ struct.libPrependPaths.add(_elem5);
}
iprot.readListEnd();
}
- struct.setLibAppendPathsIsSet(true);
+ struct.setLibPrependPathsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // SET_ENVIRONMENT
+ case 9: // LIB_APPEND_PATHS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
- struct.setEnvironment = new ArrayList<SetEnvPaths>(_list6.size);
+ struct.libAppendPaths = new ArrayList<SetEnvPaths>(_list6.size);
for (int _i7 = 0; _i7 < _list6.size; ++_i7)
{
SetEnvPaths _elem8;
_elem8 = new SetEnvPaths();
_elem8.read(iprot);
- struct.setEnvironment.add(_elem8);
+ struct.libAppendPaths.add(_elem8);
+ }
+ iprot.readListEnd();
+ }
+ struct.setLibAppendPathsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // SET_ENVIRONMENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list9 = iprot.readListBegin();
+ struct.setEnvironment = new ArrayList<SetEnvPaths>(_list9.size);
+ for (int _i10 = 0; _i10 < _list9.size; ++_i10)
+ {
+ SetEnvPaths _elem11;
+ _elem11 = new SetEnvPaths();
+ _elem11.read(iprot);
+ struct.setEnvironment.add(_elem11);
}
iprot.readListEnd();
}
@@ -1285,10 +1312,17 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldEnd();
}
}
- if (struct.moduleLoadCmd != null) {
- if (struct.isSetModuleLoadCmd()) {
- oprot.writeFieldBegin(MODULE_LOAD_CMD_FIELD_DESC);
- oprot.writeString(struct.moduleLoadCmd);
+ if (struct.moduleLoadCmds != null) {
+ if (struct.isSetModuleLoadCmds()) {
+ oprot.writeFieldBegin(MODULE_LOAD_CMDS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.moduleLoadCmds.size()));
+ for (String _iter12 : struct.moduleLoadCmds)
+ {
+ oprot.writeString(_iter12);
+ }
+ oprot.writeListEnd();
+ }
oprot.writeFieldEnd();
}
}
@@ -1297,9 +1331,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(LIB_PREPEND_PATHS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.libPrependPaths.size()));
- for (SetEnvPaths _iter9 : struct.libPrependPaths)
+ for (SetEnvPaths _iter13 : struct.libPrependPaths)
{
- _iter9.write(oprot);
+ _iter13.write(oprot);
}
oprot.writeListEnd();
}
@@ -1311,9 +1345,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(LIB_APPEND_PATHS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.libAppendPaths.size()));
- for (SetEnvPaths _iter10 : struct.libAppendPaths)
+ for (SetEnvPaths _iter14 : struct.libAppendPaths)
{
- _iter10.write(oprot);
+ _iter14.write(oprot);
}
oprot.writeListEnd();
}
@@ -1325,9 +1359,9 @@ import org.slf4j.LoggerFactory;
oprot.writeFieldBegin(SET_ENVIRONMENT_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.setEnvironment.size()));
- for (SetEnvPaths _iter11 : struct.setEnvironment)
+ for (SetEnvPaths _iter15 : struct.setEnvironment)
{
- _iter11.write(oprot);
+ _iter15.write(oprot);
}
oprot.writeListEnd();
}
@@ -1360,7 +1394,7 @@ import org.slf4j.LoggerFactory;
if (struct.isSetAppDeploymentDescription()) {
optionals.set(0);
}
- if (struct.isSetModuleLoadCmd()) {
+ if (struct.isSetModuleLoadCmds()) {
optionals.set(1);
}
if (struct.isSetLibPrependPaths()) {
@@ -1376,33 +1410,39 @@ import org.slf4j.LoggerFactory;
if (struct.isSetAppDeploymentDescription()) {
oprot.writeString(struct.appDeploymentDescription);
}
- if (struct.isSetModuleLoadCmd()) {
- oprot.writeString(struct.moduleLoadCmd);
+ if (struct.isSetModuleLoadCmds()) {
+ {
+ oprot.writeI32(struct.moduleLoadCmds.size());
+ for (String _iter16 : struct.moduleLoadCmds)
+ {
+ oprot.writeString(_iter16);
+ }
+ }
}
if (struct.isSetLibPrependPaths()) {
{
oprot.writeI32(struct.libPrependPaths.size());
- for (SetEnvPaths _iter12 : struct.libPrependPaths)
+ for (SetEnvPaths _iter17 : struct.libPrependPaths)
{
- _iter12.write(oprot);
+ _iter17.write(oprot);
}
}
}
if (struct.isSetLibAppendPaths()) {
{
oprot.writeI32(struct.libAppendPaths.size());
- for (SetEnvPaths _iter13 : struct.libAppendPaths)
+ for (SetEnvPaths _iter18 : struct.libAppendPaths)
{
- _iter13.write(oprot);
+ _iter18.write(oprot);
}
}
}
if (struct.isSetSetEnvironment()) {
{
oprot.writeI32(struct.setEnvironment.size());
- for (SetEnvPaths _iter14 : struct.setEnvironment)
+ for (SetEnvPaths _iter19 : struct.setEnvironment)
{
- _iter14.write(oprot);
+ _iter19.write(oprot);
}
}
}
@@ -1427,47 +1467,56 @@ import org.slf4j.LoggerFactory;
struct.setAppDeploymentDescriptionIsSet(true);
}
if (incoming.get(1)) {
- struct.moduleLoadCmd = iprot.readString();
- struct.setModuleLoadCmdIsSet(true);
+ {
+ org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.moduleLoadCmds = new ArrayList<String>(_list20.size);
+ for (int _i21 = 0; _i21 < _list20.size; ++_i21)
+ {
+ String _elem22;
+ _elem22 = iprot.readString();
+ struct.moduleLoadCmds.add(_elem22);
+ }
+ }
+ struct.setModuleLoadCmdsIsSet(true);
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.libPrependPaths = new ArrayList<SetEnvPaths>(_list15.size);
- for (int _i16 = 0; _i16 < _list15.size; ++_i16)
+ org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.libPrependPaths = new ArrayList<SetEnvPaths>(_list23.size);
+ for (int _i24 = 0; _i24 < _list23.size; ++_i24)
{
- SetEnvPaths _elem17;
- _elem17 = new SetEnvPaths();
- _elem17.read(iprot);
- struct.libPrependPaths.add(_elem17);
+ SetEnvPaths _elem25;
+ _elem25 = new SetEnvPaths();
+ _elem25.read(iprot);
+ struct.libPrependPaths.add(_elem25);
}
}
struct.setLibPrependPathsIsSet(true);
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.libAppendPaths = new ArrayList<SetEnvPaths>(_list18.size);
- for (int _i19 = 0; _i19 < _list18.size; ++_i19)
+ org.apache.thrift.protocol.TList _list26 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.libAppendPaths = new ArrayList<SetEnvPaths>(_list26.size);
+ for (int _i27 = 0; _i27 < _list26.size; ++_i27)
{
- SetEnvPaths _elem20;
- _elem20 = new SetEnvPaths();
- _elem20.read(iprot);
- struct.libAppendPaths.add(_elem20);
+ SetEnvPaths _elem28;
+ _elem28 = new SetEnvPaths();
+ _elem28.read(iprot);
+ struct.libAppendPaths.add(_elem28);
}
}
struct.setLibAppendPathsIsSet(true);
}
if (incoming.get(4)) {
{
- org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.setEnvironment = new ArrayList<SetEnvPaths>(_list21.size);
- for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+ org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.setEnvironment = new ArrayList<SetEnvPaths>(_list29.size);
+ for (int _i30 = 0; _i30 < _list29.size; ++_i30)
{
- SetEnvPaths _elem23;
- _elem23 = new SetEnvPaths();
- _elem23.read(iprot);
- struct.setEnvironment.add(_elem23);
+ SetEnvPaths _elem31;
+ _elem31 = new SetEnvPaths();
+ _elem31.read(iprot);
+ struct.setEnvironment.add(_elem31);
}
}
struct.setSetEnvironmentIsSet(true);
[02/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
new file mode 100644
index 0000000..c906089
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
@@ -0,0 +1,929 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Authenticate using Secured Shell
+ *
+ * alternativeSSHHostName:
+ * If the login to ssh is different than the hostname itself, specify it here
+ *
+ * sshPort:
+ * If a non-defualt port needs to used, specify it.
+ */
+@SuppressWarnings("all") public class SSHJobSubmission implements org.apache.thrift.TBase<SSHJobSubmission, SSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<SSHJobSubmission> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SSHJobSubmission");
+
+ private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField ALTERNATIVE_SSHHOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("alternativeSSHHostName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField MONITORING_MECHANISM_FIELD_DESC = new org.apache.thrift.protocol.TField("monitoringMechanism", org.apache.thrift.protocol.TType.STRING, (short)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SSHJobSubmissionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SSHJobSubmissionTupleSchemeFactory());
+ }
+
+ private String jobSubmissionInterfaceId; // required
+ private SecurityProtocol securityProtocol; // required
+ private ResourceJobManager resourceJobManager; // required
+ private String alternativeSSHHostName; // optional
+ private int sshPort; // optional
+ private String monitoringMechanism; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"),
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ SECURITY_PROTOCOL((short)2, "securityProtocol"),
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ RESOURCE_JOB_MANAGER((short)3, "resourceJobManager"),
+ ALTERNATIVE_SSHHOST_NAME((short)4, "alternativeSSHHostName"),
+ SSH_PORT((short)5, "sshPort"),
+ MONITORING_MECHANISM((short)6, "monitoringMechanism");
+
+ 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: // JOB_SUBMISSION_INTERFACE_ID
+ return JOB_SUBMISSION_INTERFACE_ID;
+ case 2: // SECURITY_PROTOCOL
+ return SECURITY_PROTOCOL;
+ case 3: // RESOURCE_JOB_MANAGER
+ return RESOURCE_JOB_MANAGER;
+ case 4: // ALTERNATIVE_SSHHOST_NAME
+ return ALTERNATIVE_SSHHOST_NAME;
+ case 5: // SSH_PORT
+ return SSH_PORT;
+ case 6: // MONITORING_MECHANISM
+ return MONITORING_MECHANISM;
+ 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 __SSHPORT_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.ALTERNATIVE_SSHHOST_NAME,_Fields.SSH_PORT,_Fields.MONITORING_MECHANISM};
+ 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.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
+ tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
+ tmpMap.put(_Fields.ALTERNATIVE_SSHHOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("alternativeSSHHostName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MONITORING_MECHANISM, new org.apache.thrift.meta_data.FieldMetaData("monitoringMechanism", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHJobSubmission.class, metaDataMap);
+ }
+
+ public SSHJobSubmission() {
+ this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.sshPort = 22;
+
+ }
+
+ public SSHJobSubmission(
+ String jobSubmissionInterfaceId,
+ SecurityProtocol securityProtocol,
+ ResourceJobManager resourceJobManager)
+ {
+ this();
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ this.securityProtocol = securityProtocol;
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public SSHJobSubmission(SSHJobSubmission other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobSubmissionInterfaceId()) {
+ this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
+ }
+ if (other.isSetSecurityProtocol()) {
+ this.securityProtocol = other.securityProtocol;
+ }
+ if (other.isSetResourceJobManager()) {
+ this.resourceJobManager = other.resourceJobManager;
+ }
+ if (other.isSetAlternativeSSHHostName()) {
+ this.alternativeSSHHostName = other.alternativeSSHHostName;
+ }
+ this.sshPort = other.sshPort;
+ if (other.isSetMonitoringMechanism()) {
+ this.monitoringMechanism = other.monitoringMechanism;
+ }
+ }
+
+ public SSHJobSubmission deepCopy() {
+ return new SSHJobSubmission(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.securityProtocol = null;
+ this.resourceJobManager = null;
+ this.alternativeSSHHostName = null;
+ this.sshPort = 22;
+
+ this.monitoringMechanism = null;
+ }
+
+ public String getJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId;
+ }
+
+ public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ }
+
+ public void unsetJobSubmissionInterfaceId() {
+ this.jobSubmissionInterfaceId = null;
+ }
+
+ /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId != null;
+ }
+
+ public void setJobSubmissionInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.jobSubmissionInterfaceId = null;
+ }
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public SecurityProtocol getSecurityProtocol() {
+ return this.securityProtocol;
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public void setSecurityProtocol(SecurityProtocol securityProtocol) {
+ this.securityProtocol = securityProtocol;
+ }
+
+ public void unsetSecurityProtocol() {
+ this.securityProtocol = null;
+ }
+
+ /** Returns true if field securityProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetSecurityProtocol() {
+ return this.securityProtocol != null;
+ }
+
+ public void setSecurityProtocolIsSet(boolean value) {
+ if (!value) {
+ this.securityProtocol = null;
+ }
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public ResourceJobManager getResourceJobManager() {
+ return this.resourceJobManager;
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public void setResourceJobManager(ResourceJobManager resourceJobManager) {
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ public void unsetResourceJobManager() {
+ this.resourceJobManager = null;
+ }
+
+ /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
+ public boolean isSetResourceJobManager() {
+ return this.resourceJobManager != null;
+ }
+
+ public void setResourceJobManagerIsSet(boolean value) {
+ if (!value) {
+ this.resourceJobManager = null;
+ }
+ }
+
+ public String getAlternativeSSHHostName() {
+ return this.alternativeSSHHostName;
+ }
+
+ public void setAlternativeSSHHostName(String alternativeSSHHostName) {
+ this.alternativeSSHHostName = alternativeSSHHostName;
+ }
+
+ public void unsetAlternativeSSHHostName() {
+ this.alternativeSSHHostName = null;
+ }
+
+ /** Returns true if field alternativeSSHHostName is set (has been assigned a value) and false otherwise */
+ public boolean isSetAlternativeSSHHostName() {
+ return this.alternativeSSHHostName != null;
+ }
+
+ public void setAlternativeSSHHostNameIsSet(boolean value) {
+ if (!value) {
+ this.alternativeSSHHostName = null;
+ }
+ }
+
+ public int getSshPort() {
+ return this.sshPort;
+ }
+
+ public void setSshPort(int sshPort) {
+ this.sshPort = sshPort;
+ setSshPortIsSet(true);
+ }
+
+ public void unsetSshPort() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSHPORT_ISSET_ID);
+ }
+
+ /** Returns true if field sshPort is set (has been assigned a value) and false otherwise */
+ public boolean isSetSshPort() {
+ return EncodingUtils.testBit(__isset_bitfield, __SSHPORT_ISSET_ID);
+ }
+
+ public void setSshPortIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
+ }
+
+ public String getMonitoringMechanism() {
+ return this.monitoringMechanism;
+ }
+
+ public void setMonitoringMechanism(String monitoringMechanism) {
+ this.monitoringMechanism = monitoringMechanism;
+ }
+
+ public void unsetMonitoringMechanism() {
+ this.monitoringMechanism = null;
+ }
+
+ /** Returns true if field monitoringMechanism is set (has been assigned a value) and false otherwise */
+ public boolean isSetMonitoringMechanism() {
+ return this.monitoringMechanism != null;
+ }
+
+ public void setMonitoringMechanismIsSet(boolean value) {
+ if (!value) {
+ this.monitoringMechanism = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ if (value == null) {
+ unsetJobSubmissionInterfaceId();
+ } else {
+ setJobSubmissionInterfaceId((String)value);
+ }
+ break;
+
+ case SECURITY_PROTOCOL:
+ if (value == null) {
+ unsetSecurityProtocol();
+ } else {
+ setSecurityProtocol((SecurityProtocol)value);
+ }
+ break;
+
+ case RESOURCE_JOB_MANAGER:
+ if (value == null) {
+ unsetResourceJobManager();
+ } else {
+ setResourceJobManager((ResourceJobManager)value);
+ }
+ break;
+
+ case ALTERNATIVE_SSHHOST_NAME:
+ if (value == null) {
+ unsetAlternativeSSHHostName();
+ } else {
+ setAlternativeSSHHostName((String)value);
+ }
+ break;
+
+ case SSH_PORT:
+ if (value == null) {
+ unsetSshPort();
+ } else {
+ setSshPort((Integer)value);
+ }
+ break;
+
+ case MONITORING_MECHANISM:
+ if (value == null) {
+ unsetMonitoringMechanism();
+ } else {
+ setMonitoringMechanism((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ return getJobSubmissionInterfaceId();
+
+ case SECURITY_PROTOCOL:
+ return getSecurityProtocol();
+
+ case RESOURCE_JOB_MANAGER:
+ return getResourceJobManager();
+
+ case ALTERNATIVE_SSHHOST_NAME:
+ return getAlternativeSSHHostName();
+
+ case SSH_PORT:
+ return Integer.valueOf(getSshPort());
+
+ case MONITORING_MECHANISM:
+ return getMonitoringMechanism();
+
+ }
+ 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 JOB_SUBMISSION_INTERFACE_ID:
+ return isSetJobSubmissionInterfaceId();
+ case SECURITY_PROTOCOL:
+ return isSetSecurityProtocol();
+ case RESOURCE_JOB_MANAGER:
+ return isSetResourceJobManager();
+ case ALTERNATIVE_SSHHOST_NAME:
+ return isSetAlternativeSSHHostName();
+ case SSH_PORT:
+ return isSetSshPort();
+ case MONITORING_MECHANISM:
+ return isSetMonitoringMechanism();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof SSHJobSubmission)
+ return this.equals((SSHJobSubmission)that);
+ return false;
+ }
+
+ public boolean equals(SSHJobSubmission that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
+ boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
+ if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
+ if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId))
+ return false;
+ if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId))
+ return false;
+ }
+
+ boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
+ boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
+ if (this_present_securityProtocol || that_present_securityProtocol) {
+ if (!(this_present_securityProtocol && that_present_securityProtocol))
+ return false;
+ if (!this.securityProtocol.equals(that.securityProtocol))
+ return false;
+ }
+
+ boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
+ boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
+ if (this_present_resourceJobManager || that_present_resourceJobManager) {
+ if (!(this_present_resourceJobManager && that_present_resourceJobManager))
+ return false;
+ if (!this.resourceJobManager.equals(that.resourceJobManager))
+ return false;
+ }
+
+ boolean this_present_alternativeSSHHostName = true && this.isSetAlternativeSSHHostName();
+ boolean that_present_alternativeSSHHostName = true && that.isSetAlternativeSSHHostName();
+ if (this_present_alternativeSSHHostName || that_present_alternativeSSHHostName) {
+ if (!(this_present_alternativeSSHHostName && that_present_alternativeSSHHostName))
+ return false;
+ if (!this.alternativeSSHHostName.equals(that.alternativeSSHHostName))
+ return false;
+ }
+
+ boolean this_present_sshPort = true && this.isSetSshPort();
+ boolean that_present_sshPort = true && that.isSetSshPort();
+ if (this_present_sshPort || that_present_sshPort) {
+ if (!(this_present_sshPort && that_present_sshPort))
+ return false;
+ if (this.sshPort != that.sshPort)
+ return false;
+ }
+
+ boolean this_present_monitoringMechanism = true && this.isSetMonitoringMechanism();
+ boolean that_present_monitoringMechanism = true && that.isSetMonitoringMechanism();
+ if (this_present_monitoringMechanism || that_present_monitoringMechanism) {
+ if (!(this_present_monitoringMechanism && that_present_monitoringMechanism))
+ return false;
+ if (!this.monitoringMechanism.equals(that.monitoringMechanism))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(SSHJobSubmission other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobSubmissionInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSecurityProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securityProtocol, other.securityProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResourceJobManager()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAlternativeSSHHostName()).compareTo(other.isSetAlternativeSSHHostName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAlternativeSSHHostName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alternativeSSHHostName, other.alternativeSSHHostName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSshPort()).compareTo(other.isSetSshPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSshPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshPort, other.sshPort);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMonitoringMechanism()).compareTo(other.isSetMonitoringMechanism());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMonitoringMechanism()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitoringMechanism, other.monitoringMechanism);
+ 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("SSHJobSubmission(");
+ boolean first = true;
+
+ sb.append("jobSubmissionInterfaceId:");
+ if (this.jobSubmissionInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobSubmissionInterfaceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("securityProtocol:");
+ if (this.securityProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.securityProtocol);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("resourceJobManager:");
+ if (this.resourceJobManager == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.resourceJobManager);
+ }
+ first = false;
+ if (isSetAlternativeSSHHostName()) {
+ if (!first) sb.append(", ");
+ sb.append("alternativeSSHHostName:");
+ if (this.alternativeSSHHostName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.alternativeSSHHostName);
+ }
+ first = false;
+ }
+ if (isSetSshPort()) {
+ if (!first) sb.append(", ");
+ sb.append("sshPort:");
+ sb.append(this.sshPort);
+ first = false;
+ }
+ if (isSetMonitoringMechanism()) {
+ if (!first) sb.append(", ");
+ sb.append("monitoringMechanism:");
+ if (this.monitoringMechanism == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.monitoringMechanism);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetJobSubmissionInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetSecurityProtocol()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
+ }
+
+ if (!isSetResourceJobManager()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
+ }
+
+ // 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 SSHJobSubmissionStandardSchemeFactory implements SchemeFactory {
+ public SSHJobSubmissionStandardScheme getScheme() {
+ return new SSHJobSubmissionStandardScheme();
+ }
+ }
+
+ private static class SSHJobSubmissionStandardScheme extends StandardScheme<SSHJobSubmission> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SSHJobSubmission 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: // JOB_SUBMISSION_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SECURITY_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // RESOURCE_JOB_MANAGER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // ALTERNATIVE_SSHHOST_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.alternativeSSHHostName = iprot.readString();
+ struct.setAlternativeSSHHostNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // SSH_PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.sshPort = iprot.readI32();
+ struct.setSshPortIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // MONITORING_MECHANISM
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.monitoringMechanism = iprot.readString();
+ struct.setMonitoringMechanismIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, SSHJobSubmission struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobSubmissionInterfaceId != null) {
+ oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.securityProtocol != null) {
+ oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.resourceJobManager != null) {
+ oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.alternativeSSHHostName != null) {
+ if (struct.isSetAlternativeSSHHostName()) {
+ oprot.writeFieldBegin(ALTERNATIVE_SSHHOST_NAME_FIELD_DESC);
+ oprot.writeString(struct.alternativeSSHHostName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetSshPort()) {
+ oprot.writeFieldBegin(SSH_PORT_FIELD_DESC);
+ oprot.writeI32(struct.sshPort);
+ oprot.writeFieldEnd();
+ }
+ if (struct.monitoringMechanism != null) {
+ if (struct.isSetMonitoringMechanism()) {
+ oprot.writeFieldBegin(MONITORING_MECHANISM_FIELD_DESC);
+ oprot.writeString(struct.monitoringMechanism);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SSHJobSubmissionTupleSchemeFactory implements SchemeFactory {
+ public SSHJobSubmissionTupleScheme getScheme() {
+ return new SSHJobSubmissionTupleScheme();
+ }
+ }
+
+ private static class SSHJobSubmissionTupleScheme extends TupleScheme<SSHJobSubmission> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetAlternativeSSHHostName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetSshPort()) {
+ optionals.set(1);
+ }
+ if (struct.isSetMonitoringMechanism()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetAlternativeSSHHostName()) {
+ oprot.writeString(struct.alternativeSSHHostName);
+ }
+ if (struct.isSetSshPort()) {
+ oprot.writeI32(struct.sshPort);
+ }
+ if (struct.isSetMonitoringMechanism()) {
+ oprot.writeString(struct.monitoringMechanism);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, SSHJobSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.alternativeSSHHostName = iprot.readString();
+ struct.setAlternativeSSHHostNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.sshPort = iprot.readI32();
+ struct.setSshPortIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.monitoringMechanism = iprot.readString();
+ struct.setMonitoringMechanismIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java
new file mode 100644
index 0000000..fe1f625
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java
@@ -0,0 +1,82 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * Enumeration of security authentication and authorization mechanisms supported by Airavata. This enumeration just
+ * describes the supported mechanism. The corresponding security credentials are registered with Airavata Credential
+ * store.
+ *
+ * USERNAME_PASSWORD:
+ * A User Name.
+ *
+ * SSH_KEYS:
+ * SSH Keys
+ *
+ */
+@SuppressWarnings("all") public enum SecurityProtocol implements org.apache.thrift.TEnum {
+ USERNAME_PASSWORD(0),
+ SSH_KEYS(1),
+ GSI(2),
+ KERBEROS(3),
+ OAUTH(4);
+
+ private final int value;
+
+ private SecurityProtocol(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static SecurityProtocol findByValue(int value) {
+ switch (value) {
+ case 0:
+ return USERNAME_PASSWORD;
+ case 1:
+ return SSH_KEYS;
+ case 2:
+ return GSI;
+ case 3:
+ return KERBEROS;
+ case 4:
+ return OAUTH;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/computeResourceModelConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/computeResourceModelConstants.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/computeResourceModelConstants.java
new file mode 100644
index 0000000..250a671
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/computeResourceModelConstants.java
@@ -0,0 +1,55 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+@SuppressWarnings("all") public class computeResourceModelConstants {
+
+ public static final String DEFAULT_ID = "DO_NOT_SET_AT_CLIENTS";
+
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
new file mode 100644
index 0000000..47375e3
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/gatewayprofile/ComputeResourcePreference.java
@@ -0,0 +1,1023 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.gatewayprofile;
+
+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;
+
+/**
+ * Resource Preferences for each of the gateway
+ *
+ * computeResourceId:
+ * Corelate the preference for compute resource to
+ *
+ * gatewayName:
+ * Name of the Gateway.
+ *
+ * ipAddress:
+ * IP Addresse of the Hostname.
+ *
+ * resourceDescription:
+ * A user friendly description of the hostname.
+ *
+ * JobSubmissionProtocols:
+ * A computational resources may have one or more ways of submitting Jobs. This structure
+ * will hold all available mechanisms to interact with the resource.
+ *
+ * DataMovementProtocol:
+ * Option to specify a prefered data movement mechanism of the available options.
+ *
+ */
+@SuppressWarnings("all") public class ComputeResourcePreference implements org.apache.thrift.TBase<ComputeResourcePreference, ComputeResourcePreference._Fields>, java.io.Serializable, Cloneable, Comparable<ComputeResourcePreference> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputeResourcePreference");
+
+ private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField OVERRIDEBY_AIRAVATA_FIELD_DESC = new org.apache.thrift.protocol.TField("overridebyAiravata", org.apache.thrift.protocol.TType.BOOL, (short)2);
+ private static final org.apache.thrift.protocol.TField PREFERRED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredJobSubmissionProtocol", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField PREFERRED_DATA_MOVEMENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredDataMovementProtocol", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField PREFERRED_BATCH_QUEUE_FIELD_DESC = new org.apache.thrift.protocol.TField("preferredBatchQueue", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField SCRATCH_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("scratchLocation", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField ALLOCATION_PROJECT_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("allocationProjectNumber", org.apache.thrift.protocol.TType.STRING, (short)7);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ComputeResourcePreferenceStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ComputeResourcePreferenceTupleSchemeFactory());
+ }
+
+ private String computeResourceId; // required
+ private boolean overridebyAiravata; // required
+ private String preferredJobSubmissionProtocol; // optional
+ private String preferredDataMovementProtocol; // optional
+ private String preferredBatchQueue; // optional
+ private String scratchLocation; // optional
+ private String allocationProjectNumber; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ COMPUTE_RESOURCE_ID((short)1, "computeResourceId"),
+ OVERRIDEBY_AIRAVATA((short)2, "overridebyAiravata"),
+ PREFERRED_JOB_SUBMISSION_PROTOCOL((short)3, "preferredJobSubmissionProtocol"),
+ PREFERRED_DATA_MOVEMENT_PROTOCOL((short)4, "preferredDataMovementProtocol"),
+ PREFERRED_BATCH_QUEUE((short)5, "preferredBatchQueue"),
+ SCRATCH_LOCATION((short)6, "scratchLocation"),
+ ALLOCATION_PROJECT_NUMBER((short)7, "allocationProjectNumber");
+
+ 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: // COMPUTE_RESOURCE_ID
+ return COMPUTE_RESOURCE_ID;
+ case 2: // OVERRIDEBY_AIRAVATA
+ return OVERRIDEBY_AIRAVATA;
+ case 3: // PREFERRED_JOB_SUBMISSION_PROTOCOL
+ return PREFERRED_JOB_SUBMISSION_PROTOCOL;
+ case 4: // PREFERRED_DATA_MOVEMENT_PROTOCOL
+ return PREFERRED_DATA_MOVEMENT_PROTOCOL;
+ case 5: // PREFERRED_BATCH_QUEUE
+ return PREFERRED_BATCH_QUEUE;
+ case 6: // SCRATCH_LOCATION
+ return SCRATCH_LOCATION;
+ case 7: // ALLOCATION_PROJECT_NUMBER
+ return ALLOCATION_PROJECT_NUMBER;
+ 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 __OVERRIDEBYAIRAVATA_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL,_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL,_Fields.PREFERRED_BATCH_QUEUE,_Fields.SCRATCH_LOCATION,_Fields.ALLOCATION_PROJECT_NUMBER};
+ 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.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OVERRIDEBY_AIRAVATA, new org.apache.thrift.meta_data.FieldMetaData("overridebyAiravata", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.PREFERRED_JOB_SUBMISSION_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("preferredJobSubmissionProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PREFERRED_DATA_MOVEMENT_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("preferredDataMovementProtocol", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PREFERRED_BATCH_QUEUE, new org.apache.thrift.meta_data.FieldMetaData("preferredBatchQueue", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SCRATCH_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("scratchLocation", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.ALLOCATION_PROJECT_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("allocationProjectNumber", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourcePreference.class, metaDataMap);
+ }
+
+ public ComputeResourcePreference() {
+ this.overridebyAiravata = true;
+
+ }
+
+ public ComputeResourcePreference(
+ String computeResourceId,
+ boolean overridebyAiravata)
+ {
+ this();
+ this.computeResourceId = computeResourceId;
+ this.overridebyAiravata = overridebyAiravata;
+ setOverridebyAiravataIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ComputeResourcePreference(ComputeResourcePreference other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetComputeResourceId()) {
+ this.computeResourceId = other.computeResourceId;
+ }
+ this.overridebyAiravata = other.overridebyAiravata;
+ if (other.isSetPreferredJobSubmissionProtocol()) {
+ this.preferredJobSubmissionProtocol = other.preferredJobSubmissionProtocol;
+ }
+ if (other.isSetPreferredDataMovementProtocol()) {
+ this.preferredDataMovementProtocol = other.preferredDataMovementProtocol;
+ }
+ if (other.isSetPreferredBatchQueue()) {
+ this.preferredBatchQueue = other.preferredBatchQueue;
+ }
+ if (other.isSetScratchLocation()) {
+ this.scratchLocation = other.scratchLocation;
+ }
+ if (other.isSetAllocationProjectNumber()) {
+ this.allocationProjectNumber = other.allocationProjectNumber;
+ }
+ }
+
+ public ComputeResourcePreference deepCopy() {
+ return new ComputeResourcePreference(this);
+ }
+
+ @Override
+ public void clear() {
+ this.computeResourceId = null;
+ this.overridebyAiravata = true;
+
+ this.preferredJobSubmissionProtocol = null;
+ this.preferredDataMovementProtocol = null;
+ this.preferredBatchQueue = null;
+ this.scratchLocation = null;
+ this.allocationProjectNumber = null;
+ }
+
+ public String getComputeResourceId() {
+ return this.computeResourceId;
+ }
+
+ public void setComputeResourceId(String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ }
+
+ public void unsetComputeResourceId() {
+ this.computeResourceId = null;
+ }
+
+ /** Returns true if field computeResourceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputeResourceId() {
+ return this.computeResourceId != null;
+ }
+
+ public void setComputeResourceIdIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceId = null;
+ }
+ }
+
+ public boolean isOverridebyAiravata() {
+ return this.overridebyAiravata;
+ }
+
+ public void setOverridebyAiravata(boolean overridebyAiravata) {
+ this.overridebyAiravata = overridebyAiravata;
+ setOverridebyAiravataIsSet(true);
+ }
+
+ public void unsetOverridebyAiravata() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OVERRIDEBYAIRAVATA_ISSET_ID);
+ }
+
+ /** Returns true if field overridebyAiravata is set (has been assigned a value) and false otherwise */
+ public boolean isSetOverridebyAiravata() {
+ return EncodingUtils.testBit(__isset_bitfield, __OVERRIDEBYAIRAVATA_ISSET_ID);
+ }
+
+ public void setOverridebyAiravataIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OVERRIDEBYAIRAVATA_ISSET_ID, value);
+ }
+
+ public String getPreferredJobSubmissionProtocol() {
+ return this.preferredJobSubmissionProtocol;
+ }
+
+ public void setPreferredJobSubmissionProtocol(String preferredJobSubmissionProtocol) {
+ this.preferredJobSubmissionProtocol = preferredJobSubmissionProtocol;
+ }
+
+ public void unsetPreferredJobSubmissionProtocol() {
+ this.preferredJobSubmissionProtocol = null;
+ }
+
+ /** Returns true if field preferredJobSubmissionProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetPreferredJobSubmissionProtocol() {
+ return this.preferredJobSubmissionProtocol != null;
+ }
+
+ public void setPreferredJobSubmissionProtocolIsSet(boolean value) {
+ if (!value) {
+ this.preferredJobSubmissionProtocol = null;
+ }
+ }
+
+ public String getPreferredDataMovementProtocol() {
+ return this.preferredDataMovementProtocol;
+ }
+
+ public void setPreferredDataMovementProtocol(String preferredDataMovementProtocol) {
+ this.preferredDataMovementProtocol = preferredDataMovementProtocol;
+ }
+
+ public void unsetPreferredDataMovementProtocol() {
+ this.preferredDataMovementProtocol = null;
+ }
+
+ /** Returns true if field preferredDataMovementProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetPreferredDataMovementProtocol() {
+ return this.preferredDataMovementProtocol != null;
+ }
+
+ public void setPreferredDataMovementProtocolIsSet(boolean value) {
+ if (!value) {
+ this.preferredDataMovementProtocol = null;
+ }
+ }
+
+ public String getPreferredBatchQueue() {
+ return this.preferredBatchQueue;
+ }
+
+ public void setPreferredBatchQueue(String preferredBatchQueue) {
+ this.preferredBatchQueue = preferredBatchQueue;
+ }
+
+ public void unsetPreferredBatchQueue() {
+ this.preferredBatchQueue = null;
+ }
+
+ /** Returns true if field preferredBatchQueue is set (has been assigned a value) and false otherwise */
+ public boolean isSetPreferredBatchQueue() {
+ return this.preferredBatchQueue != null;
+ }
+
+ public void setPreferredBatchQueueIsSet(boolean value) {
+ if (!value) {
+ this.preferredBatchQueue = null;
+ }
+ }
+
+ public String getScratchLocation() {
+ return this.scratchLocation;
+ }
+
+ public void setScratchLocation(String scratchLocation) {
+ this.scratchLocation = scratchLocation;
+ }
+
+ public void unsetScratchLocation() {
+ this.scratchLocation = null;
+ }
+
+ /** Returns true if field scratchLocation is set (has been assigned a value) and false otherwise */
+ public boolean isSetScratchLocation() {
+ return this.scratchLocation != null;
+ }
+
+ public void setScratchLocationIsSet(boolean value) {
+ if (!value) {
+ this.scratchLocation = null;
+ }
+ }
+
+ public String getAllocationProjectNumber() {
+ return this.allocationProjectNumber;
+ }
+
+ public void setAllocationProjectNumber(String allocationProjectNumber) {
+ this.allocationProjectNumber = allocationProjectNumber;
+ }
+
+ public void unsetAllocationProjectNumber() {
+ this.allocationProjectNumber = null;
+ }
+
+ /** Returns true if field allocationProjectNumber is set (has been assigned a value) and false otherwise */
+ public boolean isSetAllocationProjectNumber() {
+ return this.allocationProjectNumber != null;
+ }
+
+ public void setAllocationProjectNumberIsSet(boolean value) {
+ if (!value) {
+ this.allocationProjectNumber = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case COMPUTE_RESOURCE_ID:
+ if (value == null) {
+ unsetComputeResourceId();
+ } else {
+ setComputeResourceId((String)value);
+ }
+ break;
+
+ case OVERRIDEBY_AIRAVATA:
+ if (value == null) {
+ unsetOverridebyAiravata();
+ } else {
+ setOverridebyAiravata((Boolean)value);
+ }
+ break;
+
+ case PREFERRED_JOB_SUBMISSION_PROTOCOL:
+ if (value == null) {
+ unsetPreferredJobSubmissionProtocol();
+ } else {
+ setPreferredJobSubmissionProtocol((String)value);
+ }
+ break;
+
+ case PREFERRED_DATA_MOVEMENT_PROTOCOL:
+ if (value == null) {
+ unsetPreferredDataMovementProtocol();
+ } else {
+ setPreferredDataMovementProtocol((String)value);
+ }
+ break;
+
+ case PREFERRED_BATCH_QUEUE:
+ if (value == null) {
+ unsetPreferredBatchQueue();
+ } else {
+ setPreferredBatchQueue((String)value);
+ }
+ break;
+
+ case SCRATCH_LOCATION:
+ if (value == null) {
+ unsetScratchLocation();
+ } else {
+ setScratchLocation((String)value);
+ }
+ break;
+
+ case ALLOCATION_PROJECT_NUMBER:
+ if (value == null) {
+ unsetAllocationProjectNumber();
+ } else {
+ setAllocationProjectNumber((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case COMPUTE_RESOURCE_ID:
+ return getComputeResourceId();
+
+ case OVERRIDEBY_AIRAVATA:
+ return Boolean.valueOf(isOverridebyAiravata());
+
+ case PREFERRED_JOB_SUBMISSION_PROTOCOL:
+ return getPreferredJobSubmissionProtocol();
+
+ case PREFERRED_DATA_MOVEMENT_PROTOCOL:
+ return getPreferredDataMovementProtocol();
+
+ case PREFERRED_BATCH_QUEUE:
+ return getPreferredBatchQueue();
+
+ case SCRATCH_LOCATION:
+ return getScratchLocation();
+
+ case ALLOCATION_PROJECT_NUMBER:
+ return getAllocationProjectNumber();
+
+ }
+ 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 COMPUTE_RESOURCE_ID:
+ return isSetComputeResourceId();
+ case OVERRIDEBY_AIRAVATA:
+ return isSetOverridebyAiravata();
+ case PREFERRED_JOB_SUBMISSION_PROTOCOL:
+ return isSetPreferredJobSubmissionProtocol();
+ case PREFERRED_DATA_MOVEMENT_PROTOCOL:
+ return isSetPreferredDataMovementProtocol();
+ case PREFERRED_BATCH_QUEUE:
+ return isSetPreferredBatchQueue();
+ case SCRATCH_LOCATION:
+ return isSetScratchLocation();
+ case ALLOCATION_PROJECT_NUMBER:
+ return isSetAllocationProjectNumber();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ComputeResourcePreference)
+ return this.equals((ComputeResourcePreference)that);
+ return false;
+ }
+
+ public boolean equals(ComputeResourcePreference that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_computeResourceId = true && this.isSetComputeResourceId();
+ boolean that_present_computeResourceId = true && that.isSetComputeResourceId();
+ if (this_present_computeResourceId || that_present_computeResourceId) {
+ if (!(this_present_computeResourceId && that_present_computeResourceId))
+ return false;
+ if (!this.computeResourceId.equals(that.computeResourceId))
+ return false;
+ }
+
+ boolean this_present_overridebyAiravata = true;
+ boolean that_present_overridebyAiravata = true;
+ if (this_present_overridebyAiravata || that_present_overridebyAiravata) {
+ if (!(this_present_overridebyAiravata && that_present_overridebyAiravata))
+ return false;
+ if (this.overridebyAiravata != that.overridebyAiravata)
+ return false;
+ }
+
+ boolean this_present_preferredJobSubmissionProtocol = true && this.isSetPreferredJobSubmissionProtocol();
+ boolean that_present_preferredJobSubmissionProtocol = true && that.isSetPreferredJobSubmissionProtocol();
+ if (this_present_preferredJobSubmissionProtocol || that_present_preferredJobSubmissionProtocol) {
+ if (!(this_present_preferredJobSubmissionProtocol && that_present_preferredJobSubmissionProtocol))
+ return false;
+ if (!this.preferredJobSubmissionProtocol.equals(that.preferredJobSubmissionProtocol))
+ return false;
+ }
+
+ boolean this_present_preferredDataMovementProtocol = true && this.isSetPreferredDataMovementProtocol();
+ boolean that_present_preferredDataMovementProtocol = true && that.isSetPreferredDataMovementProtocol();
+ if (this_present_preferredDataMovementProtocol || that_present_preferredDataMovementProtocol) {
+ if (!(this_present_preferredDataMovementProtocol && that_present_preferredDataMovementProtocol))
+ return false;
+ if (!this.preferredDataMovementProtocol.equals(that.preferredDataMovementProtocol))
+ return false;
+ }
+
+ boolean this_present_preferredBatchQueue = true && this.isSetPreferredBatchQueue();
+ boolean that_present_preferredBatchQueue = true && that.isSetPreferredBatchQueue();
+ if (this_present_preferredBatchQueue || that_present_preferredBatchQueue) {
+ if (!(this_present_preferredBatchQueue && that_present_preferredBatchQueue))
+ return false;
+ if (!this.preferredBatchQueue.equals(that.preferredBatchQueue))
+ return false;
+ }
+
+ boolean this_present_scratchLocation = true && this.isSetScratchLocation();
+ boolean that_present_scratchLocation = true && that.isSetScratchLocation();
+ if (this_present_scratchLocation || that_present_scratchLocation) {
+ if (!(this_present_scratchLocation && that_present_scratchLocation))
+ return false;
+ if (!this.scratchLocation.equals(that.scratchLocation))
+ return false;
+ }
+
+ boolean this_present_allocationProjectNumber = true && this.isSetAllocationProjectNumber();
+ boolean that_present_allocationProjectNumber = true && that.isSetAllocationProjectNumber();
+ if (this_present_allocationProjectNumber || that_present_allocationProjectNumber) {
+ if (!(this_present_allocationProjectNumber && that_present_allocationProjectNumber))
+ return false;
+ if (!this.allocationProjectNumber.equals(that.allocationProjectNumber))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ComputeResourcePreference other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceId, other.computeResourceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOverridebyAiravata()).compareTo(other.isSetOverridebyAiravata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOverridebyAiravata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overridebyAiravata, other.overridebyAiravata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPreferredJobSubmissionProtocol()).compareTo(other.isSetPreferredJobSubmissionProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPreferredJobSubmissionProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferredJobSubmissionProtocol, other.preferredJobSubmissionProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPreferredDataMovementProtocol()).compareTo(other.isSetPreferredDataMovementProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPreferredDataMovementProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferredDataMovementProtocol, other.preferredDataMovementProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPreferredBatchQueue()).compareTo(other.isSetPreferredBatchQueue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPreferredBatchQueue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preferredBatchQueue, other.preferredBatchQueue);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetScratchLocation()).compareTo(other.isSetScratchLocation());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetScratchLocation()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scratchLocation, other.scratchLocation);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAllocationProjectNumber()).compareTo(other.isSetAllocationProjectNumber());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAllocationProjectNumber()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allocationProjectNumber, other.allocationProjectNumber);
+ 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("ComputeResourcePreference(");
+ boolean first = true;
+
+ sb.append("computeResourceId:");
+ if (this.computeResourceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("overridebyAiravata:");
+ sb.append(this.overridebyAiravata);
+ first = false;
+ if (isSetPreferredJobSubmissionProtocol()) {
+ if (!first) sb.append(", ");
+ sb.append("preferredJobSubmissionProtocol:");
+ if (this.preferredJobSubmissionProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.preferredJobSubmissionProtocol);
+ }
+ first = false;
+ }
+ if (isSetPreferredDataMovementProtocol()) {
+ if (!first) sb.append(", ");
+ sb.append("preferredDataMovementProtocol:");
+ if (this.preferredDataMovementProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.preferredDataMovementProtocol);
+ }
+ first = false;
+ }
+ if (isSetPreferredBatchQueue()) {
+ if (!first) sb.append(", ");
+ sb.append("preferredBatchQueue:");
+ if (this.preferredBatchQueue == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.preferredBatchQueue);
+ }
+ first = false;
+ }
+ if (isSetScratchLocation()) {
+ if (!first) sb.append(", ");
+ sb.append("scratchLocation:");
+ if (this.scratchLocation == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.scratchLocation);
+ }
+ first = false;
+ }
+ if (isSetAllocationProjectNumber()) {
+ if (!first) sb.append(", ");
+ sb.append("allocationProjectNumber:");
+ if (this.allocationProjectNumber == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.allocationProjectNumber);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetComputeResourceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'computeResourceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetOverridebyAiravata()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'overridebyAiravata' is unset! Struct:" + toString());
+ }
+
+ // 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 ComputeResourcePreferenceStandardSchemeFactory implements SchemeFactory {
+ public ComputeResourcePreferenceStandardScheme getScheme() {
+ return new ComputeResourcePreferenceStandardScheme();
+ }
+ }
+
+ private static class ComputeResourcePreferenceStandardScheme extends StandardScheme<ComputeResourcePreference> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ComputeResourcePreference 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: // COMPUTE_RESOURCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // OVERRIDEBY_AIRAVATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.overridebyAiravata = iprot.readBool();
+ struct.setOverridebyAiravataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PREFERRED_JOB_SUBMISSION_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.preferredJobSubmissionProtocol = iprot.readString();
+ struct.setPreferredJobSubmissionProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // PREFERRED_DATA_MOVEMENT_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.preferredDataMovementProtocol = iprot.readString();
+ struct.setPreferredDataMovementProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // PREFERRED_BATCH_QUEUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.preferredBatchQueue = iprot.readString();
+ struct.setPreferredBatchQueueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // SCRATCH_LOCATION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.scratchLocation = iprot.readString();
+ struct.setScratchLocationIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // ALLOCATION_PROJECT_NUMBER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.allocationProjectNumber = iprot.readString();
+ struct.setAllocationProjectNumberIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ComputeResourcePreference struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.computeResourceId != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC);
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(OVERRIDEBY_AIRAVATA_FIELD_DESC);
+ oprot.writeBool(struct.overridebyAiravata);
+ oprot.writeFieldEnd();
+ if (struct.preferredJobSubmissionProtocol != null) {
+ if (struct.isSetPreferredJobSubmissionProtocol()) {
+ oprot.writeFieldBegin(PREFERRED_JOB_SUBMISSION_PROTOCOL_FIELD_DESC);
+ oprot.writeString(struct.preferredJobSubmissionProtocol);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.preferredDataMovementProtocol != null) {
+ if (struct.isSetPreferredDataMovementProtocol()) {
+ oprot.writeFieldBegin(PREFERRED_DATA_MOVEMENT_PROTOCOL_FIELD_DESC);
+ oprot.writeString(struct.preferredDataMovementProtocol);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.preferredBatchQueue != null) {
+ if (struct.isSetPreferredBatchQueue()) {
+ oprot.writeFieldBegin(PREFERRED_BATCH_QUEUE_FIELD_DESC);
+ oprot.writeString(struct.preferredBatchQueue);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.scratchLocation != null) {
+ if (struct.isSetScratchLocation()) {
+ oprot.writeFieldBegin(SCRATCH_LOCATION_FIELD_DESC);
+ oprot.writeString(struct.scratchLocation);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.allocationProjectNumber != null) {
+ if (struct.isSetAllocationProjectNumber()) {
+ oprot.writeFieldBegin(ALLOCATION_PROJECT_NUMBER_FIELD_DESC);
+ oprot.writeString(struct.allocationProjectNumber);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ComputeResourcePreferenceTupleSchemeFactory implements SchemeFactory {
+ public ComputeResourcePreferenceTupleScheme getScheme() {
+ return new ComputeResourcePreferenceTupleScheme();
+ }
+ }
+
+ private static class ComputeResourcePreferenceTupleScheme extends TupleScheme<ComputeResourcePreference> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ComputeResourcePreference struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeBool(struct.overridebyAiravata);
+ BitSet optionals = new BitSet();
+ if (struct.isSetPreferredJobSubmissionProtocol()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPreferredDataMovementProtocol()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPreferredBatchQueue()) {
+ optionals.set(2);
+ }
+ if (struct.isSetScratchLocation()) {
+ optionals.set(3);
+ }
+ if (struct.isSetAllocationProjectNumber()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetPreferredJobSubmissionProtocol()) {
+ oprot.writeString(struct.preferredJobSubmissionProtocol);
+ }
+ if (struct.isSetPreferredDataMovementProtocol()) {
+ oprot.writeString(struct.preferredDataMovementProtocol);
+ }
+ if (struct.isSetPreferredBatchQueue()) {
+ oprot.writeString(struct.preferredBatchQueue);
+ }
+ if (struct.isSetScratchLocation()) {
+ oprot.writeString(struct.scratchLocation);
+ }
+ if (struct.isSetAllocationProjectNumber()) {
+ oprot.writeString(struct.allocationProjectNumber);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ComputeResourcePreference struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ struct.overridebyAiravata = iprot.readBool();
+ struct.setOverridebyAiravataIsSet(true);
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.preferredJobSubmissionProtocol = iprot.readString();
+ struct.setPreferredJobSubmissionProtocolIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.preferredDataMovementProtocol = iprot.readString();
+ struct.setPreferredDataMovementProtocolIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.preferredBatchQueue = iprot.readString();
+ struct.setPreferredBatchQueueIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.scratchLocation = iprot.readString();
+ struct.setScratchLocationIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.allocationProjectNumber = iprot.readString();
+ struct.setAllocationProjectNumberIsSet(true);
+ }
+ }
+ }
+
+}
+
[10/10] git commit: Committed generated classes for thrift models -
AIRAVATA-1203
Posted by sm...@apache.org.
Committed generated classes for thrift models - AIRAVATA-1203
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/59a7443a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/59a7443a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/59a7443a
Branch: refs/heads/master
Commit: 59a7443ac68488fb9ec4e9312bdbae33d1fa9e3a
Parents: 52cedac
Author: Suresh Marru <sm...@apache.org>
Authored: Thu Jul 3 16:13:44 2014 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Thu Jul 3 16:13:44 2014 -0400
----------------------------------------------------------------------
.../lib/applicationDeploymentModel_types.cpp | 92 +-
.../lib/applicationDeploymentModel_types.h | 22 +-
.../lib/computeResourceModel_types.cpp | 1066 +++++++----
.../resources/lib/computeResourceModel_types.h | 571 ++++--
.../resources/lib/gatewayProfileModel_types.cpp | 189 +-
.../resources/lib/gatewayProfileModel_types.h | 126 +-
.../Model/AppCatalog/AppDeployment/Types.php | 88 +-
.../Model/AppCatalog/ComputeResource/Types.php | 1733 +++++++++++++++++
.../Model/AppCatalog/GatewayProfile/Types.php | 240 ++-
.../php-cli-samples/registerAppModule.php | 1 -
.../ApplicationDeploymentDescription.java | 259 +--
.../appcatalog/computeresource/BatchQueue.java | 886 +++++++++
.../ComputeResourceDescription.java | 1763 ++++++++++++++++++
.../computeresource/DataMovementInterface.java | 609 ++++++
.../computeresource/DataMovementProtocol.java | 86 +
.../appcatalog/computeresource/FileSystems.java | 86 +
.../computeresource/GSISSHJobSubmission.java | 1262 +++++++++++++
.../computeresource/GlobusJobSubmission.java | 768 ++++++++
.../computeresource/GridFTPDataMovement.java | 660 +++++++
.../computeresource/JobSubmissionInterface.java | 609 ++++++
.../computeresource/JobSubmissionProtocol.java | 83 +
.../computeresource/LOCALDataMovement.java | 407 ++++
.../computeresource/LOCALSubmission.java | 620 ++++++
.../computeresource/ResourceJobManager.java | 83 +
.../computeresource/SCPDataMovement.java | 720 +++++++
.../computeresource/SSHJobSubmission.java | 929 +++++++++
.../computeresource/SecurityProtocol.java | 82 +
.../computeResourceModelConstants.java | 55 +
.../ComputeResourcePreference.java | 1023 ++++++++++
.../gatewayprofile/GatewayProfile.java | 169 +-
.../gatewayProfileModel.thrift | 4 +-
31 files changed, 14534 insertions(+), 757 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
index 9a3f90a..f11af28 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.cpp
@@ -215,8 +215,8 @@ void swap(ApplicationModule &a, ApplicationModule &b) {
swap(a.__isset, b.__isset);
}
-const char* ApplicationDeploymentDescription::ascii_fingerprint = "50C12617CDB84220D07D0920711332CF";
-const uint8_t ApplicationDeploymentDescription::binary_fingerprint[16] = {0x50,0xC1,0x26,0x17,0xCD,0xB8,0x42,0x20,0xD0,0x7D,0x09,0x20,0x71,0x13,0x32,0xCF};
+const char* ApplicationDeploymentDescription::ascii_fingerprint = "3A2FD6631F126C4A6D132FA8EEFDAD7E";
+const uint8_t ApplicationDeploymentDescription::binary_fingerprint[16] = {0x3A,0x2F,0xD6,0x63,0x1F,0x12,0x6C,0x4A,0x6D,0x13,0x2F,0xA8,0xEE,0xFD,0xAD,0x7E};
uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -292,65 +292,77 @@ uint32_t ApplicationDeploymentDescription::read(::apache::thrift::protocol::TPro
}
break;
case 7:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->moduleLoadCmd);
- this->__isset.moduleLoadCmd = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 8:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
- this->libPrependPaths.clear();
+ this->moduleLoadCmds.clear();
uint32_t _size0;
::apache::thrift::protocol::TType _etype3;
xfer += iprot->readListBegin(_etype3, _size0);
- this->libPrependPaths.resize(_size0);
+ this->moduleLoadCmds.resize(_size0);
uint32_t _i4;
for (_i4 = 0; _i4 < _size0; ++_i4)
{
- xfer += this->libPrependPaths[_i4].read(iprot);
+ xfer += iprot->readString(this->moduleLoadCmds[_i4]);
}
xfer += iprot->readListEnd();
}
- this->__isset.libPrependPaths = true;
+ this->__isset.moduleLoadCmds = true;
} else {
xfer += iprot->skip(ftype);
}
break;
- case 9:
+ case 8:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
- this->libAppendPaths.clear();
+ this->libPrependPaths.clear();
uint32_t _size5;
::apache::thrift::protocol::TType _etype8;
xfer += iprot->readListBegin(_etype8, _size5);
- this->libAppendPaths.resize(_size5);
+ this->libPrependPaths.resize(_size5);
uint32_t _i9;
for (_i9 = 0; _i9 < _size5; ++_i9)
{
- xfer += this->libAppendPaths[_i9].read(iprot);
+ xfer += this->libPrependPaths[_i9].read(iprot);
}
xfer += iprot->readListEnd();
}
- this->__isset.libAppendPaths = true;
+ this->__isset.libPrependPaths = true;
} else {
xfer += iprot->skip(ftype);
}
break;
- case 10:
+ case 9:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
- this->setEnvironment.clear();
+ this->libAppendPaths.clear();
uint32_t _size10;
::apache::thrift::protocol::TType _etype13;
xfer += iprot->readListBegin(_etype13, _size10);
- this->setEnvironment.resize(_size10);
+ this->libAppendPaths.resize(_size10);
uint32_t _i14;
for (_i14 = 0; _i14 < _size10; ++_i14)
{
- xfer += this->setEnvironment[_i14].read(iprot);
+ xfer += this->libAppendPaths[_i14].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.libAppendPaths = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 10:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->setEnvironment.clear();
+ uint32_t _size15;
+ ::apache::thrift::protocol::TType _etype18;
+ xfer += iprot->readListBegin(_etype18, _size15);
+ this->setEnvironment.resize(_size15);
+ uint32_t _i19;
+ for (_i19 = 0; _i19 < _size15; ++_i19)
+ {
+ xfer += this->setEnvironment[_i19].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -410,19 +422,27 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
xfer += oprot->writeString(this->appDeploymentDescription);
xfer += oprot->writeFieldEnd();
}
- if (this->__isset.moduleLoadCmd) {
- xfer += oprot->writeFieldBegin("moduleLoadCmd", ::apache::thrift::protocol::T_STRING, 7);
- xfer += oprot->writeString(this->moduleLoadCmd);
+ if (this->__isset.moduleLoadCmds) {
+ xfer += oprot->writeFieldBegin("moduleLoadCmds", ::apache::thrift::protocol::T_LIST, 7);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->moduleLoadCmds.size()));
+ std::vector<std::string> ::const_iterator _iter20;
+ for (_iter20 = this->moduleLoadCmds.begin(); _iter20 != this->moduleLoadCmds.end(); ++_iter20)
+ {
+ xfer += oprot->writeString((*_iter20));
+ }
+ xfer += oprot->writeListEnd();
+ }
xfer += oprot->writeFieldEnd();
}
if (this->__isset.libPrependPaths) {
xfer += oprot->writeFieldBegin("libPrependPaths", ::apache::thrift::protocol::T_LIST, 8);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->libPrependPaths.size()));
- std::vector<SetEnvPaths> ::const_iterator _iter15;
- for (_iter15 = this->libPrependPaths.begin(); _iter15 != this->libPrependPaths.end(); ++_iter15)
+ std::vector<SetEnvPaths> ::const_iterator _iter21;
+ for (_iter21 = this->libPrependPaths.begin(); _iter21 != this->libPrependPaths.end(); ++_iter21)
{
- xfer += (*_iter15).write(oprot);
+ xfer += (*_iter21).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -432,10 +452,10 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
xfer += oprot->writeFieldBegin("libAppendPaths", ::apache::thrift::protocol::T_LIST, 9);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->libAppendPaths.size()));
- std::vector<SetEnvPaths> ::const_iterator _iter16;
- for (_iter16 = this->libAppendPaths.begin(); _iter16 != this->libAppendPaths.end(); ++_iter16)
+ std::vector<SetEnvPaths> ::const_iterator _iter22;
+ for (_iter22 = this->libAppendPaths.begin(); _iter22 != this->libAppendPaths.end(); ++_iter22)
{
- xfer += (*_iter16).write(oprot);
+ xfer += (*_iter22).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -445,10 +465,10 @@ uint32_t ApplicationDeploymentDescription::write(::apache::thrift::protocol::TPr
xfer += oprot->writeFieldBegin("setEnvironment", ::apache::thrift::protocol::T_LIST, 10);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->setEnvironment.size()));
- std::vector<SetEnvPaths> ::const_iterator _iter17;
- for (_iter17 = this->setEnvironment.begin(); _iter17 != this->setEnvironment.end(); ++_iter17)
+ std::vector<SetEnvPaths> ::const_iterator _iter23;
+ for (_iter23 = this->setEnvironment.begin(); _iter23 != this->setEnvironment.end(); ++_iter23)
{
- xfer += (*_iter17).write(oprot);
+ xfer += (*_iter23).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -467,7 +487,7 @@ void swap(ApplicationDeploymentDescription &a, ApplicationDeploymentDescription
swap(a.computeHostId, b.computeHostId);
swap(a.executablePath, b.executablePath);
swap(a.appDeploymentDescription, b.appDeploymentDescription);
- swap(a.moduleLoadCmd, b.moduleLoadCmd);
+ swap(a.moduleLoadCmds, b.moduleLoadCmds);
swap(a.libPrependPaths, b.libPrependPaths);
swap(a.libAppendPaths, b.libAppendPaths);
swap(a.setEnvironment, b.setEnvironment);
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
index 2bc61dd..9d6d729 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/applicationDeploymentModel_types.h
@@ -140,9 +140,9 @@ class ApplicationModule {
void swap(ApplicationModule &a, ApplicationModule &b);
typedef struct _ApplicationDeploymentDescription__isset {
- _ApplicationDeploymentDescription__isset() : appDeploymentDescription(false), moduleLoadCmd(false), libPrependPaths(false), libAppendPaths(false), setEnvironment(false) {}
+ _ApplicationDeploymentDescription__isset() : appDeploymentDescription(false), moduleLoadCmds(false), libPrependPaths(false), libAppendPaths(false), setEnvironment(false) {}
bool appDeploymentDescription;
- bool moduleLoadCmd;
+ bool moduleLoadCmds;
bool libPrependPaths;
bool libAppendPaths;
bool setEnvironment;
@@ -151,10 +151,10 @@ typedef struct _ApplicationDeploymentDescription__isset {
class ApplicationDeploymentDescription {
public:
- static const char* ascii_fingerprint; // = "50C12617CDB84220D07D0920711332CF";
- static const uint8_t binary_fingerprint[16]; // = {0x50,0xC1,0x26,0x17,0xCD,0xB8,0x42,0x20,0xD0,0x7D,0x09,0x20,0x71,0x13,0x32,0xCF};
+ static const char* ascii_fingerprint; // = "3A2FD6631F126C4A6D132FA8EEFDAD7E";
+ static const uint8_t binary_fingerprint[16]; // = {0x3A,0x2F,0xD6,0x63,0x1F,0x12,0x6C,0x4A,0x6D,0x13,0x2F,0xA8,0xEE,0xFD,0xAD,0x7E};
- ApplicationDeploymentDescription() : isEmpty(false), appDeploymentId("DO_NOT_SET_AT_CLIENTS"), appModuleId(), computeHostId(), executablePath(), appDeploymentDescription(), moduleLoadCmd() {
+ ApplicationDeploymentDescription() : isEmpty(false), appDeploymentId("DO_NOT_SET_AT_CLIENTS"), appModuleId(), computeHostId(), executablePath(), appDeploymentDescription() {
}
virtual ~ApplicationDeploymentDescription() throw() {}
@@ -165,7 +165,7 @@ class ApplicationDeploymentDescription {
std::string computeHostId;
std::string executablePath;
std::string appDeploymentDescription;
- std::string moduleLoadCmd;
+ std::vector<std::string> moduleLoadCmds;
std::vector<SetEnvPaths> libPrependPaths;
std::vector<SetEnvPaths> libAppendPaths;
std::vector<SetEnvPaths> setEnvironment;
@@ -197,9 +197,9 @@ class ApplicationDeploymentDescription {
__isset.appDeploymentDescription = true;
}
- void __set_moduleLoadCmd(const std::string& val) {
- moduleLoadCmd = val;
- __isset.moduleLoadCmd = true;
+ void __set_moduleLoadCmds(const std::vector<std::string> & val) {
+ moduleLoadCmds = val;
+ __isset.moduleLoadCmds = true;
}
void __set_libPrependPaths(const std::vector<SetEnvPaths> & val) {
@@ -233,9 +233,9 @@ class ApplicationDeploymentDescription {
return false;
else if (__isset.appDeploymentDescription && !(appDeploymentDescription == rhs.appDeploymentDescription))
return false;
- if (__isset.moduleLoadCmd != rhs.__isset.moduleLoadCmd)
+ if (__isset.moduleLoadCmds != rhs.__isset.moduleLoadCmds)
return false;
- else if (__isset.moduleLoadCmd && !(moduleLoadCmd == rhs.moduleLoadCmd))
+ else if (__isset.moduleLoadCmds && !(moduleLoadCmds == rhs.moduleLoadCmds))
return false;
if (__isset.libPrependPaths != rhs.__isset.libPrependPaths)
return false;
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.cpp
index 2ee33d4..268b534 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.cpp
@@ -24,52 +24,207 @@ const char* _kResourceJobManagerNames[] = {
};
const std::map<int, const char*> _ResourceJobManager_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kResourceJobManagerValues, _kResourceJobManagerNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+int _kFileSystemsValues[] = {
+ FileSystems::HOME,
+ FileSystems::WORK,
+ FileSystems::LOCALTMP,
+ FileSystems::SCRATCH,
+ FileSystems::ARCHIVE
+};
+const char* _kFileSystemsNames[] = {
+ "HOME",
+ "WORK",
+ "LOCALTMP",
+ "SCRATCH",
+ "ARCHIVE"
+};
+const std::map<int, const char*> _FileSystems_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kFileSystemsValues, _kFileSystemsNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
+int _kSecurityProtocolValues[] = {
+ SecurityProtocol::USERNAME_PASSWORD,
+ SecurityProtocol::SSH_KEYS,
+ SecurityProtocol::GSI,
+ SecurityProtocol::KERBEROS,
+ SecurityProtocol::OAUTH
+};
+const char* _kSecurityProtocolNames[] = {
+ "USERNAME_PASSWORD",
+ "SSH_KEYS",
+ "GSI",
+ "KERBEROS",
+ "OAUTH"
+};
+const std::map<int, const char*> _SecurityProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kSecurityProtocolValues, _kSecurityProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
int _kJobSubmissionProtocolValues[] = {
+ JobSubmissionProtocol::LOCAL,
JobSubmissionProtocol::SSH,
JobSubmissionProtocol::GSISSH,
JobSubmissionProtocol::GRAM,
JobSubmissionProtocol::UNICORE
};
const char* _kJobSubmissionProtocolNames[] = {
+ "LOCAL",
"SSH",
"GSISSH",
"GRAM",
"UNICORE"
};
-const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kJobSubmissionProtocolValues, _kJobSubmissionProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kJobSubmissionProtocolValues, _kJobSubmissionProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int _kDataMovementProtocolValues[] = {
+ DataMovementProtocol::LOCAL,
DataMovementProtocol::SCP,
DataMovementProtocol::SFTP,
DataMovementProtocol::GridFTP,
DataMovementProtocol::UNICORE_STORAGE_SERVICE
};
const char* _kDataMovementProtocolNames[] = {
+ "LOCAL",
"SCP",
"SFTP",
"GridFTP",
"UNICORE_STORAGE_SERVICE"
};
-const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kDataMovementProtocolValues, _kDataMovementProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kDataMovementProtocolValues, _kDataMovementProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-int _kSecurityProtocolValues[] = {
- SecurityProtocol::USERNAME_PASSWORD,
- SecurityProtocol::SSH_KEYS,
- SecurityProtocol::GSI,
- SecurityProtocol::KERBEROS,
- SecurityProtocol::OAUTH
-};
-const char* _kSecurityProtocolNames[] = {
- "USERNAME_PASSWORD",
- "SSH_KEYS",
- "GSI",
- "KERBEROS",
- "OAUTH"
-};
-const std::map<int, const char*> _SecurityProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kSecurityProtocolValues, _kSecurityProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const char* BatchQueue::ascii_fingerprint = "DA59FF8EE453E1822971C1CE1471EEA1";
+const uint8_t BatchQueue::binary_fingerprint[16] = {0xDA,0x59,0xFF,0x8E,0xE4,0x53,0xE1,0x82,0x29,0x71,0xC1,0xCE,0x14,0x71,0xEE,0xA1};
+
+uint32_t BatchQueue::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_queueName = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->queueName);
+ isset_queueName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->queueDescription);
+ this->__isset.queueDescription = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->maxRunTime);
+ this->__isset.maxRunTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->maxNodes);
+ this->__isset.maxNodes = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->maxProcessors);
+ this->__isset.maxProcessors = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->maxJobsInQueue);
+ this->__isset.maxJobsInQueue = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_queueName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t BatchQueue::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("BatchQueue");
+
+ xfer += oprot->writeFieldBegin("queueName", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->queueName);
+ xfer += oprot->writeFieldEnd();
-const char* SCPDataMovement::ascii_fingerprint = "FEB6B2CD28861B4EED855CACA1FEF2CB";
-const uint8_t SCPDataMovement::binary_fingerprint[16] = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
+ if (this->__isset.queueDescription) {
+ xfer += oprot->writeFieldBegin("queueDescription", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->queueDescription);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.maxRunTime) {
+ xfer += oprot->writeFieldBegin("maxRunTime", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32(this->maxRunTime);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.maxNodes) {
+ xfer += oprot->writeFieldBegin("maxNodes", ::apache::thrift::protocol::T_I32, 4);
+ xfer += oprot->writeI32(this->maxNodes);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.maxProcessors) {
+ xfer += oprot->writeFieldBegin("maxProcessors", ::apache::thrift::protocol::T_I32, 5);
+ xfer += oprot->writeI32(this->maxProcessors);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.maxJobsInQueue) {
+ xfer += oprot->writeFieldBegin("maxJobsInQueue", ::apache::thrift::protocol::T_I32, 6);
+ xfer += oprot->writeI32(this->maxJobsInQueue);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(BatchQueue &a, BatchQueue &b) {
+ using ::std::swap;
+ swap(a.queueName, b.queueName);
+ swap(a.queueDescription, b.queueDescription);
+ swap(a.maxRunTime, b.maxRunTime);
+ swap(a.maxNodes, b.maxNodes);
+ swap(a.maxProcessors, b.maxProcessors);
+ swap(a.maxJobsInQueue, b.maxJobsInQueue);
+ swap(a.__isset, b.__isset);
+}
+
+const char* SCPDataMovement::ascii_fingerprint = "63CAE6EE336A7DBD91CCCD6E22628F4A";
+const uint8_t SCPDataMovement::binary_fingerprint[16] = {0x63,0xCA,0xE6,0xEE,0x33,0x6A,0x7D,0xBD,0x91,0xCC,0xCD,0x6E,0x22,0x62,0x8F,0x4A};
uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -82,7 +237,7 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
using ::apache::thrift::protocol::TProtocolException;
- bool isset_dataMovementDataID = false;
+ bool isset_dataMovementInterfaceId = false;
bool isset_securityProtocol = false;
while (true)
@@ -95,8 +250,8 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->dataMovementDataID);
- isset_dataMovementDataID = true;
+ xfer += iprot->readString(this->dataMovementInterfaceId);
+ isset_dataMovementInterfaceId = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -112,6 +267,14 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
}
break;
case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->alternativeSCPHostName);
+ this->__isset.alternativeSCPHostName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->sshPort);
this->__isset.sshPort = true;
@@ -128,7 +291,7 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->readStructEnd();
- if (!isset_dataMovementDataID)
+ if (!isset_dataMovementInterfaceId)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_securityProtocol)
throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -139,16 +302,21 @@ uint32_t SCPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) co
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("SCPDataMovement");
- xfer += oprot->writeFieldBegin("dataMovementDataID", ::apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->dataMovementDataID);
+ xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->dataMovementInterfaceId);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->securityProtocol);
xfer += oprot->writeFieldEnd();
+ if (this->__isset.alternativeSCPHostName) {
+ xfer += oprot->writeFieldBegin("alternativeSCPHostName", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->alternativeSCPHostName);
+ xfer += oprot->writeFieldEnd();
+ }
if (this->__isset.sshPort) {
- xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 4);
xfer += oprot->writeI32(this->sshPort);
xfer += oprot->writeFieldEnd();
}
@@ -159,8 +327,9 @@ uint32_t SCPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) co
void swap(SCPDataMovement &a, SCPDataMovement &b) {
using ::std::swap;
- swap(a.dataMovementDataID, b.dataMovementDataID);
+ swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId);
swap(a.securityProtocol, b.securityProtocol);
+ swap(a.alternativeSCPHostName, b.alternativeSCPHostName);
swap(a.sshPort, b.sshPort);
swap(a.__isset, b.__isset);
}
@@ -179,9 +348,9 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
using ::apache::thrift::protocol::TProtocolException;
- bool isset_dataMovementDataID = false;
+ bool isset_dataMovementInterfaceId = false;
bool isset_securityProtocol = false;
- bool isset_gridFTPEndPoint = false;
+ bool isset_gridFTPEndPoints = false;
while (true)
{
@@ -193,8 +362,8 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->dataMovementDataID);
- isset_dataMovementDataID = true;
+ xfer += iprot->readString(this->dataMovementInterfaceId);
+ isset_dataMovementInterfaceId = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -212,19 +381,19 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
case 3:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
- this->gridFTPEndPoint.clear();
+ this->gridFTPEndPoints.clear();
uint32_t _size2;
::apache::thrift::protocol::TType _etype5;
xfer += iprot->readListBegin(_etype5, _size2);
- this->gridFTPEndPoint.resize(_size2);
+ this->gridFTPEndPoints.resize(_size2);
uint32_t _i6;
for (_i6 = 0; _i6 < _size2; ++_i6)
{
- xfer += iprot->readString(this->gridFTPEndPoint[_i6]);
+ xfer += iprot->readString(this->gridFTPEndPoints[_i6]);
}
xfer += iprot->readListEnd();
}
- isset_gridFTPEndPoint = true;
+ isset_gridFTPEndPoints = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -238,11 +407,11 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
xfer += iprot->readStructEnd();
- if (!isset_dataMovementDataID)
+ if (!isset_dataMovementInterfaceId)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_securityProtocol)
throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_gridFTPEndPoint)
+ if (!isset_gridFTPEndPoints)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
@@ -251,19 +420,19 @@ uint32_t GridFTPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("GridFTPDataMovement");
- xfer += oprot->writeFieldBegin("dataMovementDataID", ::apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->dataMovementDataID);
+ xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->dataMovementInterfaceId);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32((int32_t)this->securityProtocol);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("gridFTPEndPoint", ::apache::thrift::protocol::T_LIST, 3);
+ xfer += oprot->writeFieldBegin("gridFTPEndPoints", ::apache::thrift::protocol::T_LIST, 3);
{
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->gridFTPEndPoint.size()));
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->gridFTPEndPoints.size()));
std::vector<std::string> ::const_iterator _iter7;
- for (_iter7 = this->gridFTPEndPoint.begin(); _iter7 != this->gridFTPEndPoint.end(); ++_iter7)
+ for (_iter7 = this->gridFTPEndPoints.begin(); _iter7 != this->gridFTPEndPoints.end(); ++_iter7)
{
xfer += oprot->writeString((*_iter7));
}
@@ -278,15 +447,15 @@ uint32_t GridFTPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot
void swap(GridFTPDataMovement &a, GridFTPDataMovement &b) {
using ::std::swap;
- swap(a.dataMovementDataID, b.dataMovementDataID);
+ swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId);
swap(a.securityProtocol, b.securityProtocol);
- swap(a.gridFTPEndPoint, b.gridFTPEndPoint);
+ swap(a.gridFTPEndPoints, b.gridFTPEndPoints);
}
-const char* SSHJobSubmission::ascii_fingerprint = "FEB6B2CD28861B4EED855CACA1FEF2CB";
-const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
+const char* LOCALSubmission::ascii_fingerprint = "C9C13E23D75AC7D7DB268099D53EE995";
+const uint8_t LOCALSubmission::binary_fingerprint[16] = {0xC9,0xC1,0x3E,0x23,0xD7,0x5A,0xC7,0xD7,0xDB,0x26,0x80,0x99,0xD5,0x3E,0xE9,0x95};
-uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
@@ -297,7 +466,7 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
using ::apache::thrift::protocol::TProtocolException;
- bool isset_jobSubmissionDataID = false;
+ bool isset_jobSubmissionInterfaceId = false;
bool isset_resourceJobManager = false;
while (true)
@@ -310,13 +479,13 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->jobSubmissionDataID);
- isset_jobSubmissionDataID = true;
+ xfer += iprot->readString(this->jobSubmissionInterfaceId);
+ isset_jobSubmissionInterfaceId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
- case 2:
+ case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast8;
xfer += iprot->readI32(ecast8);
@@ -326,14 +495,202 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->skip(ftype);
}
break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->monitoringMechanism);
+ this->__isset.monitoringMechanism = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_jobSubmissionInterfaceId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_resourceJobManager)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t LOCALSubmission::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("LOCALSubmission");
+
+ xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->jobSubmissionInterfaceId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32((int32_t)this->resourceJobManager);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.monitoringMechanism) {
+ xfer += oprot->writeFieldBegin("monitoringMechanism", ::apache::thrift::protocol::T_STRING, 6);
+ xfer += oprot->writeString(this->monitoringMechanism);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(LOCALSubmission &a, LOCALSubmission &b) {
+ using ::std::swap;
+ swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
+ swap(a.resourceJobManager, b.resourceJobManager);
+ swap(a.monitoringMechanism, b.monitoringMechanism);
+ swap(a.__isset, b.__isset);
+}
+
+const char* LOCALDataMovement::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1";
+const uint8_t LOCALDataMovement::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+uint32_t LOCALDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_dataMovementInterfaceId = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->dataMovementInterfaceId);
+ isset_dataMovementInterfaceId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_dataMovementInterfaceId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t LOCALDataMovement::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("LOCALDataMovement");
+
+ xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->dataMovementInterfaceId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(LOCALDataMovement &a, LOCALDataMovement &b) {
+ using ::std::swap;
+ swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId);
+}
+
+const char* SSHJobSubmission::ascii_fingerprint = "7AD7C2665ACC6606EC984DACFC74881E";
+const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0x7A,0xD7,0xC2,0x66,0x5A,0xCC,0x66,0x06,0xEC,0x98,0x4D,0xAC,0xFC,0x74,0x88,0x1E};
+
+uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_jobSubmissionInterfaceId = false;
+ bool isset_securityProtocol = false;
+ bool isset_resourceJobManager = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->jobSubmissionInterfaceId);
+ isset_jobSubmissionInterfaceId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast9;
+ xfer += iprot->readI32(ecast9);
+ this->securityProtocol = (SecurityProtocol::type)ecast9;
+ isset_securityProtocol = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast10;
+ xfer += iprot->readI32(ecast10);
+ this->resourceJobManager = (ResourceJobManager::type)ecast10;
+ isset_resourceJobManager = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->alternativeSSHHostName);
+ this->__isset.alternativeSSHHostName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->sshPort);
this->__isset.sshPort = true;
} else {
xfer += iprot->skip(ftype);
}
break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->monitoringMechanism);
+ this->__isset.monitoringMechanism = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -343,7 +700,9 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->readStructEnd();
- if (!isset_jobSubmissionDataID)
+ if (!isset_jobSubmissionInterfaceId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_securityProtocol)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_resourceJobManager)
throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -354,19 +713,33 @@ uint32_t SSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) c
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("SSHJobSubmission");
- xfer += oprot->writeFieldBegin("jobSubmissionDataID", ::apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->jobSubmissionDataID);
+ xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->jobSubmissionInterfaceId);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32((int32_t)this->securityProtocol);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 3);
xfer += oprot->writeI32((int32_t)this->resourceJobManager);
xfer += oprot->writeFieldEnd();
+ if (this->__isset.alternativeSSHHostName) {
+ xfer += oprot->writeFieldBegin("alternativeSSHHostName", ::apache::thrift::protocol::T_STRING, 4);
+ xfer += oprot->writeString(this->alternativeSSHHostName);
+ xfer += oprot->writeFieldEnd();
+ }
if (this->__isset.sshPort) {
- xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 5);
xfer += oprot->writeI32(this->sshPort);
xfer += oprot->writeFieldEnd();
}
+ if (this->__isset.monitoringMechanism) {
+ xfer += oprot->writeFieldBegin("monitoringMechanism", ::apache::thrift::protocol::T_STRING, 6);
+ xfer += oprot->writeString(this->monitoringMechanism);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -374,9 +747,12 @@ uint32_t SSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) c
void swap(SSHJobSubmission &a, SSHJobSubmission &b) {
using ::std::swap;
- swap(a.jobSubmissionDataID, b.jobSubmissionDataID);
+ swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
+ swap(a.securityProtocol, b.securityProtocol);
swap(a.resourceJobManager, b.resourceJobManager);
+ swap(a.alternativeSSHHostName, b.alternativeSSHHostName);
swap(a.sshPort, b.sshPort);
+ swap(a.monitoringMechanism, b.monitoringMechanism);
swap(a.__isset, b.__isset);
}
@@ -394,7 +770,7 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
using ::apache::thrift::protocol::TProtocolException;
- bool isset_jobSubmissionDataID = false;
+ bool isset_jobSubmissionInterfaceId = false;
bool isset_securityProtocol = false;
bool isset_resourceJobManager = false;
@@ -408,17 +784,17 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->jobSubmissionDataID);
- isset_jobSubmissionDataID = true;
+ xfer += iprot->readString(this->jobSubmissionInterfaceId);
+ isset_jobSubmissionInterfaceId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast9;
- xfer += iprot->readI32(ecast9);
- this->securityProtocol = (SecurityProtocol::type)ecast9;
+ int32_t ecast11;
+ xfer += iprot->readI32(ecast11);
+ this->securityProtocol = (SecurityProtocol::type)ecast11;
isset_securityProtocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -426,9 +802,9 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast10;
- xfer += iprot->readI32(ecast10);
- this->resourceJobManager = (ResourceJobManager::type)ecast10;
+ int32_t ecast12;
+ xfer += iprot->readI32(ecast12);
+ this->resourceJobManager = (ResourceJobManager::type)ecast12;
isset_resourceJobManager = true;
} else {
xfer += iprot->skip(ftype);
@@ -438,14 +814,14 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->globusGateKeeperEndPoint.clear();
- uint32_t _size11;
- ::apache::thrift::protocol::TType _etype14;
- xfer += iprot->readListBegin(_etype14, _size11);
- this->globusGateKeeperEndPoint.resize(_size11);
- uint32_t _i15;
- for (_i15 = 0; _i15 < _size11; ++_i15)
+ uint32_t _size13;
+ ::apache::thrift::protocol::TType _etype16;
+ xfer += iprot->readListBegin(_etype16, _size13);
+ this->globusGateKeeperEndPoint.resize(_size13);
+ uint32_t _i17;
+ for (_i17 = 0; _i17 < _size13; ++_i17)
{
- xfer += iprot->readString(this->globusGateKeeperEndPoint[_i15]);
+ xfer += iprot->readString(this->globusGateKeeperEndPoint[_i17]);
}
xfer += iprot->readListEnd();
}
@@ -463,7 +839,7 @@ uint32_t GlobusJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
xfer += iprot->readStructEnd();
- if (!isset_jobSubmissionDataID)
+ if (!isset_jobSubmissionInterfaceId)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_securityProtocol)
throw TProtocolException(TProtocolException::INVALID_DATA);
@@ -476,8 +852,8 @@ uint32_t GlobusJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("GlobusJobSubmission");
- xfer += oprot->writeFieldBegin("jobSubmissionDataID", ::apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->jobSubmissionDataID);
+ xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->jobSubmissionInterfaceId);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("securityProtocol", ::apache::thrift::protocol::T_I32, 2);
@@ -492,10 +868,10 @@ uint32_t GlobusJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
xfer += oprot->writeFieldBegin("globusGateKeeperEndPoint", ::apache::thrift::protocol::T_LIST, 4);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->globusGateKeeperEndPoint.size()));
- std::vector<std::string> ::const_iterator _iter16;
- for (_iter16 = this->globusGateKeeperEndPoint.begin(); _iter16 != this->globusGateKeeperEndPoint.end(); ++_iter16)
+ std::vector<std::string> ::const_iterator _iter18;
+ for (_iter18 = this->globusGateKeeperEndPoint.begin(); _iter18 != this->globusGateKeeperEndPoint.end(); ++_iter18)
{
- xfer += oprot->writeString((*_iter16));
+ xfer += oprot->writeString((*_iter18));
}
xfer += oprot->writeListEnd();
}
@@ -508,17 +884,17 @@ uint32_t GlobusJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot
void swap(GlobusJobSubmission &a, GlobusJobSubmission &b) {
using ::std::swap;
- swap(a.jobSubmissionDataID, b.jobSubmissionDataID);
+ swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
swap(a.securityProtocol, b.securityProtocol);
swap(a.resourceJobManager, b.resourceJobManager);
swap(a.globusGateKeeperEndPoint, b.globusGateKeeperEndPoint);
swap(a.__isset, b.__isset);
}
-const char* GSISSHJobSubmission::ascii_fingerprint = "6969A7F145C4403B2F9081A498E933FD";
-const uint8_t GSISSHJobSubmission::binary_fingerprint[16] = {0x69,0x69,0xA7,0xF1,0x45,0xC4,0x40,0x3B,0x2F,0x90,0x81,0xA4,0x98,0xE9,0x33,0xFD};
+const char* JobSubmissionInterface::ascii_fingerprint = "A0A4DD7B8243FB842E64EAC6E5DA6C7B";
+const uint8_t JobSubmissionInterface::binary_fingerprint[16] = {0xA0,0xA4,0xDD,0x7B,0x82,0x43,0xFB,0x84,0x2E,0x64,0xEA,0xC6,0xE5,0xDA,0x6C,0x7B};
-uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t JobSubmissionInterface::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
@@ -529,8 +905,9 @@ uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
using ::apache::thrift::protocol::TProtocolException;
- bool isset_jobSubmissionDataID = false;
- bool isset_resourceJobManager = false;
+ bool isset_jobSubmissionInterfaceId = false;
+ bool isset_jobSubmissionProtocol = false;
+ bool isset_priorityOrder = false;
while (true)
{
@@ -542,103 +919,124 @@ uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->jobSubmissionDataID);
- isset_jobSubmissionDataID = true;
+ xfer += iprot->readString(this->jobSubmissionInterfaceId);
+ isset_jobSubmissionInterfaceId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast17;
- xfer += iprot->readI32(ecast17);
- this->resourceJobManager = (ResourceJobManager::type)ecast17;
- isset_resourceJobManager = true;
+ int32_t ecast19;
+ xfer += iprot->readI32(ecast19);
+ this->jobSubmissionProtocol = (JobSubmissionProtocol::type)ecast19;
+ isset_jobSubmissionProtocol = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
- xfer += iprot->readI32(this->sshPort);
- this->__isset.sshPort = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 4:
- if (ftype == ::apache::thrift::protocol::T_SET) {
- {
- this->exports.clear();
- uint32_t _size18;
- ::apache::thrift::protocol::TType _etype21;
- xfer += iprot->readSetBegin(_etype21, _size18);
- uint32_t _i22;
- for (_i22 = 0; _i22 < _size18; ++_i22)
- {
- std::string _elem23;
- xfer += iprot->readString(_elem23);
- this->exports.insert(_elem23);
- }
- xfer += iprot->readSetEnd();
- }
- this->__isset.exports = true;
+ xfer += iprot->readI32(this->priorityOrder);
+ isset_priorityOrder = true;
} else {
xfer += iprot->skip(ftype);
}
break;
- case 5:
- if (ftype == ::apache::thrift::protocol::T_LIST) {
- {
- this->preJobCommands.clear();
- uint32_t _size24;
- ::apache::thrift::protocol::TType _etype27;
- xfer += iprot->readListBegin(_etype27, _size24);
- this->preJobCommands.resize(_size24);
- uint32_t _i28;
- for (_i28 = 0; _i28 < _size24; ++_i28)
- {
- xfer += iprot->readString(this->preJobCommands[_i28]);
- }
- xfer += iprot->readListEnd();
- }
- this->__isset.preJobCommands = true;
- } else {
- xfer += iprot->skip(ftype);
- }
+ default:
+ xfer += iprot->skip(ftype);
break;
- case 6:
- if (ftype == ::apache::thrift::protocol::T_LIST) {
- {
- this->postJobCommands.clear();
- uint32_t _size29;
- ::apache::thrift::protocol::TType _etype32;
- xfer += iprot->readListBegin(_etype32, _size29);
- this->postJobCommands.resize(_size29);
- uint32_t _i33;
- for (_i33 = 0; _i33 < _size29; ++_i33)
- {
- xfer += iprot->readString(this->postJobCommands[_i33]);
- }
- xfer += iprot->readListEnd();
- }
- this->__isset.postJobCommands = true;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_jobSubmissionInterfaceId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_jobSubmissionProtocol)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_priorityOrder)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t JobSubmissionInterface::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("JobSubmissionInterface");
+
+ xfer += oprot->writeFieldBegin("jobSubmissionInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->jobSubmissionInterfaceId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("jobSubmissionProtocol", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32((int32_t)this->jobSubmissionProtocol);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("priorityOrder", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32(this->priorityOrder);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(JobSubmissionInterface &a, JobSubmissionInterface &b) {
+ using ::std::swap;
+ swap(a.jobSubmissionInterfaceId, b.jobSubmissionInterfaceId);
+ swap(a.jobSubmissionProtocol, b.jobSubmissionProtocol);
+ swap(a.priorityOrder, b.priorityOrder);
+}
+
+const char* DataMovementInterface::ascii_fingerprint = "A0A4DD7B8243FB842E64EAC6E5DA6C7B";
+const uint8_t DataMovementInterface::binary_fingerprint[16] = {0xA0,0xA4,0xDD,0x7B,0x82,0x43,0xFB,0x84,0x2E,0x64,0xEA,0xC6,0xE5,0xDA,0x6C,0x7B};
+
+uint32_t DataMovementInterface::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_dataMovementInterfaceId = false;
+ bool isset_dataMovementProtocol = false;
+ bool isset_priorityOrder = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->dataMovementInterfaceId);
+ isset_dataMovementInterfaceId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
- case 7:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->installedPath);
- this->__isset.installedPath = true;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast20;
+ xfer += iprot->readI32(ecast20);
+ this->dataMovementProtocol = (DataMovementProtocol::type)ecast20;
+ isset_dataMovementProtocol = true;
} else {
xfer += iprot->skip(ftype);
}
break;
- case 8:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->monitorMode);
- this->__isset.monitorMode = true;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->priorityOrder);
+ isset_priorityOrder = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -652,99 +1050,45 @@ uint32_t GSISSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot)
xfer += iprot->readStructEnd();
- if (!isset_jobSubmissionDataID)
+ if (!isset_dataMovementInterfaceId)
throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_resourceJobManager)
+ if (!isset_dataMovementProtocol)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_priorityOrder)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
-uint32_t GSISSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t DataMovementInterface::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
- xfer += oprot->writeStructBegin("GSISSHJobSubmission");
+ xfer += oprot->writeStructBegin("DataMovementInterface");
- xfer += oprot->writeFieldBegin("jobSubmissionDataID", ::apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->jobSubmissionDataID);
+ xfer += oprot->writeFieldBegin("dataMovementInterfaceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->dataMovementInterfaceId);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 2);
- xfer += oprot->writeI32((int32_t)this->resourceJobManager);
+ xfer += oprot->writeFieldBegin("dataMovementProtocol", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32((int32_t)this->dataMovementProtocol);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("priorityOrder", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32(this->priorityOrder);
xfer += oprot->writeFieldEnd();
- if (this->__isset.sshPort) {
- xfer += oprot->writeFieldBegin("sshPort", ::apache::thrift::protocol::T_I32, 3);
- xfer += oprot->writeI32(this->sshPort);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.exports) {
- xfer += oprot->writeFieldBegin("exports", ::apache::thrift::protocol::T_SET, 4);
- {
- xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->exports.size()));
- std::set<std::string> ::const_iterator _iter34;
- for (_iter34 = this->exports.begin(); _iter34 != this->exports.end(); ++_iter34)
- {
- xfer += oprot->writeString((*_iter34));
- }
- xfer += oprot->writeSetEnd();
- }
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.preJobCommands) {
- xfer += oprot->writeFieldBegin("preJobCommands", ::apache::thrift::protocol::T_LIST, 5);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->preJobCommands.size()));
- std::vector<std::string> ::const_iterator _iter35;
- for (_iter35 = this->preJobCommands.begin(); _iter35 != this->preJobCommands.end(); ++_iter35)
- {
- xfer += oprot->writeString((*_iter35));
- }
- xfer += oprot->writeListEnd();
- }
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.postJobCommands) {
- xfer += oprot->writeFieldBegin("postJobCommands", ::apache::thrift::protocol::T_LIST, 6);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->postJobCommands.size()));
- std::vector<std::string> ::const_iterator _iter36;
- for (_iter36 = this->postJobCommands.begin(); _iter36 != this->postJobCommands.end(); ++_iter36)
- {
- xfer += oprot->writeString((*_iter36));
- }
- xfer += oprot->writeListEnd();
- }
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.installedPath) {
- xfer += oprot->writeFieldBegin("installedPath", ::apache::thrift::protocol::T_STRING, 7);
- xfer += oprot->writeString(this->installedPath);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.monitorMode) {
- xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_STRING, 8);
- xfer += oprot->writeString(this->monitorMode);
- xfer += oprot->writeFieldEnd();
- }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
-void swap(GSISSHJobSubmission &a, GSISSHJobSubmission &b) {
+void swap(DataMovementInterface &a, DataMovementInterface &b) {
using ::std::swap;
- swap(a.jobSubmissionDataID, b.jobSubmissionDataID);
- swap(a.resourceJobManager, b.resourceJobManager);
- swap(a.sshPort, b.sshPort);
- swap(a.exports, b.exports);
- swap(a.preJobCommands, b.preJobCommands);
- swap(a.postJobCommands, b.postJobCommands);
- swap(a.installedPath, b.installedPath);
- swap(a.monitorMode, b.monitorMode);
- swap(a.__isset, b.__isset);
+ swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId);
+ swap(a.dataMovementProtocol, b.dataMovementProtocol);
+ swap(a.priorityOrder, b.priorityOrder);
}
-const char* ComputeResourceDescription::ascii_fingerprint = "A31E9EF4FF0C9ADE9027FD5C59A96555";
-const uint8_t ComputeResourceDescription::binary_fingerprint[16] = {0xA3,0x1E,0x9E,0xF4,0xFF,0x0C,0x9A,0xDE,0x90,0x27,0xFD,0x5C,0x59,0xA9,0x65,0x55};
+const char* ComputeResourceDescription::ascii_fingerprint = "ADC1452A60F79D933D0EE4B9893AD048";
+const uint8_t ComputeResourceDescription::binary_fingerprint[16] = {0xAD,0xC1,0x45,0x2A,0x60,0xF7,0x9D,0x93,0x3D,0x0E,0xE4,0xB9,0x89,0x3A,0xD0,0x48};
uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -758,10 +1102,8 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
using ::apache::thrift::protocol::TProtocolException;
bool isset_isEmpty = false;
- bool isset_resourceId = false;
+ bool isset_computeResourceId = false;
bool isset_hostName = false;
- bool isset_jobSubmissionProtocols = false;
- bool isset_dataMovementProtocols = false;
while (true)
{
@@ -781,8 +1123,8 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->resourceId);
- isset_resourceId = true;
+ xfer += iprot->readString(this->computeResourceId);
+ isset_computeResourceId = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -799,15 +1141,15 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->hostAliases.clear();
- uint32_t _size37;
- ::apache::thrift::protocol::TType _etype40;
- xfer += iprot->readSetBegin(_etype40, _size37);
- uint32_t _i41;
- for (_i41 = 0; _i41 < _size37; ++_i41)
+ uint32_t _size21;
+ ::apache::thrift::protocol::TType _etype24;
+ xfer += iprot->readSetBegin(_etype24, _size21);
+ uint32_t _i25;
+ for (_i25 = 0; _i25 < _size21; ++_i25)
{
- std::string _elem42;
- xfer += iprot->readString(_elem42);
- this->hostAliases.insert(_elem42);
+ std::string _elem26;
+ xfer += iprot->readString(_elem26);
+ this->hostAliases.insert(_elem26);
}
xfer += iprot->readSetEnd();
}
@@ -820,15 +1162,15 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (ftype == ::apache::thrift::protocol::T_SET) {
{
this->ipAddresses.clear();
- uint32_t _size43;
- ::apache::thrift::protocol::TType _etype46;
- xfer += iprot->readSetBegin(_etype46, _size43);
- uint32_t _i47;
- for (_i47 = 0; _i47 < _size43; ++_i47)
+ uint32_t _size27;
+ ::apache::thrift::protocol::TType _etype30;
+ xfer += iprot->readSetBegin(_etype30, _size27);
+ uint32_t _i31;
+ for (_i31 = 0; _i31 < _size27; ++_i31)
{
- std::string _elem48;
- xfer += iprot->readString(_elem48);
- this->ipAddresses.insert(_elem48);
+ std::string _elem32;
+ xfer += iprot->readString(_elem32);
+ this->ipAddresses.insert(_elem32);
}
xfer += iprot->readSetEnd();
}
@@ -839,16 +1181,38 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->resourceDescription);
- this->__isset.resourceDescription = true;
+ xfer += iprot->readString(this->computeResourceDescription);
+ this->__isset.computeResourceDescription = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast33;
+ xfer += iprot->readI32(ecast33);
+ this->resourceJobManager = (ResourceJobManager::type)ecast33;
+ this->__isset.resourceJobManager = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->preferredJobSubmissionProtocol);
- this->__isset.preferredJobSubmissionProtocol = true;
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->batchQueues.clear();
+ uint32_t _size34;
+ ::apache::thrift::protocol::TType _etype37;
+ xfer += iprot->readListBegin(_etype37, _size34);
+ this->batchQueues.resize(_size34);
+ uint32_t _i38;
+ for (_i38 = 0; _i38 < _size34; ++_i38)
+ {
+ xfer += this->batchQueues[_i38].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.batchQueues = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -856,49 +1220,64 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
case 9:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
- this->jobSubmissionProtocols.clear();
- uint32_t _size49;
- ::apache::thrift::protocol::TType _ktype50;
- ::apache::thrift::protocol::TType _vtype51;
- xfer += iprot->readMapBegin(_ktype50, _vtype51, _size49);
- uint32_t _i53;
- for (_i53 = 0; _i53 < _size49; ++_i53)
+ this->fileSystems.clear();
+ uint32_t _size39;
+ ::apache::thrift::protocol::TType _ktype40;
+ ::apache::thrift::protocol::TType _vtype41;
+ xfer += iprot->readMapBegin(_ktype40, _vtype41, _size39);
+ uint32_t _i43;
+ for (_i43 = 0; _i43 < _size39; ++_i43)
{
- std::string _key54;
- xfer += iprot->readString(_key54);
- JobSubmissionProtocol::type& _val55 = this->jobSubmissionProtocols[_key54];
- int32_t ecast56;
- xfer += iprot->readI32(ecast56);
- _val55 = (JobSubmissionProtocol::type)ecast56;
+ FileSystems::type _key44;
+ int32_t ecast46;
+ xfer += iprot->readI32(ecast46);
+ _key44 = (FileSystems::type)ecast46;
+ std::string& _val45 = this->fileSystems[_key44];
+ xfer += iprot->readString(_val45);
}
xfer += iprot->readMapEnd();
}
- isset_jobSubmissionProtocols = true;
+ this->__isset.fileSystems = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
- if (ftype == ::apache::thrift::protocol::T_MAP) {
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
{
- this->dataMovementProtocols.clear();
- uint32_t _size57;
- ::apache::thrift::protocol::TType _ktype58;
- ::apache::thrift::protocol::TType _vtype59;
- xfer += iprot->readMapBegin(_ktype58, _vtype59, _size57);
- uint32_t _i61;
- for (_i61 = 0; _i61 < _size57; ++_i61)
+ this->jobSubmissionInterfaces.clear();
+ uint32_t _size47;
+ ::apache::thrift::protocol::TType _etype50;
+ xfer += iprot->readListBegin(_etype50, _size47);
+ this->jobSubmissionInterfaces.resize(_size47);
+ uint32_t _i51;
+ for (_i51 = 0; _i51 < _size47; ++_i51)
{
- std::string _key62;
- xfer += iprot->readString(_key62);
- DataMovementProtocol::type& _val63 = this->dataMovementProtocols[_key62];
- int32_t ecast64;
- xfer += iprot->readI32(ecast64);
- _val63 = (DataMovementProtocol::type)ecast64;
+ xfer += this->jobSubmissionInterfaces[_i51].read(iprot);
}
- xfer += iprot->readMapEnd();
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.jobSubmissionInterfaces = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 11:
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->dataMovemenetInterfaces.clear();
+ uint32_t _size52;
+ ::apache::thrift::protocol::TType _etype55;
+ xfer += iprot->readListBegin(_etype55, _size52);
+ this->dataMovemenetInterfaces.resize(_size52);
+ uint32_t _i56;
+ for (_i56 = 0; _i56 < _size52; ++_i56)
+ {
+ xfer += this->dataMovemenetInterfaces[_i56].read(iprot);
+ }
+ xfer += iprot->readListEnd();
}
- isset_dataMovementProtocols = true;
+ this->__isset.dataMovemenetInterfaces = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -914,14 +1293,10 @@ uint32_t ComputeResourceDescription::read(::apache::thrift::protocol::TProtocol*
if (!isset_isEmpty)
throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_resourceId)
+ if (!isset_computeResourceId)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_hostName)
throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_jobSubmissionProtocols)
- throw TProtocolException(TProtocolException::INVALID_DATA);
- if (!isset_dataMovementProtocols)
- throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
@@ -933,8 +1308,8 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeBool(this->isEmpty);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("resourceId", ::apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString(this->resourceId);
+ xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->computeResourceId);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("hostName", ::apache::thrift::protocol::T_STRING, 3);
@@ -945,10 +1320,10 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("hostAliases", ::apache::thrift::protocol::T_SET, 4);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->hostAliases.size()));
- std::set<std::string> ::const_iterator _iter65;
- for (_iter65 = this->hostAliases.begin(); _iter65 != this->hostAliases.end(); ++_iter65)
+ std::set<std::string> ::const_iterator _iter57;
+ for (_iter57 = this->hostAliases.begin(); _iter57 != this->hostAliases.end(); ++_iter57)
{
- xfer += oprot->writeString((*_iter65));
+ xfer += oprot->writeString((*_iter57));
}
xfer += oprot->writeSetEnd();
}
@@ -958,51 +1333,78 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeFieldBegin("ipAddresses", ::apache::thrift::protocol::T_SET, 5);
{
xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->ipAddresses.size()));
- std::set<std::string> ::const_iterator _iter66;
- for (_iter66 = this->ipAddresses.begin(); _iter66 != this->ipAddresses.end(); ++_iter66)
+ std::set<std::string> ::const_iterator _iter58;
+ for (_iter58 = this->ipAddresses.begin(); _iter58 != this->ipAddresses.end(); ++_iter58)
{
- xfer += oprot->writeString((*_iter66));
+ xfer += oprot->writeString((*_iter58));
}
xfer += oprot->writeSetEnd();
}
xfer += oprot->writeFieldEnd();
}
- if (this->__isset.resourceDescription) {
- xfer += oprot->writeFieldBegin("resourceDescription", ::apache::thrift::protocol::T_STRING, 6);
- xfer += oprot->writeString(this->resourceDescription);
+ if (this->__isset.computeResourceDescription) {
+ xfer += oprot->writeFieldBegin("computeResourceDescription", ::apache::thrift::protocol::T_STRING, 6);
+ xfer += oprot->writeString(this->computeResourceDescription);
xfer += oprot->writeFieldEnd();
}
- if (this->__isset.preferredJobSubmissionProtocol) {
- xfer += oprot->writeFieldBegin("preferredJobSubmissionProtocol", ::apache::thrift::protocol::T_STRING, 8);
- xfer += oprot->writeString(this->preferredJobSubmissionProtocol);
+ if (this->__isset.resourceJobManager) {
+ xfer += oprot->writeFieldBegin("resourceJobManager", ::apache::thrift::protocol::T_I32, 7);
+ xfer += oprot->writeI32((int32_t)this->resourceJobManager);
xfer += oprot->writeFieldEnd();
}
- xfer += oprot->writeFieldBegin("jobSubmissionProtocols", ::apache::thrift::protocol::T_MAP, 9);
- {
- xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->jobSubmissionProtocols.size()));
- std::map<std::string, JobSubmissionProtocol::type> ::const_iterator _iter67;
- for (_iter67 = this->jobSubmissionProtocols.begin(); _iter67 != this->jobSubmissionProtocols.end(); ++_iter67)
+ if (this->__isset.batchQueues) {
+ xfer += oprot->writeFieldBegin("batchQueues", ::apache::thrift::protocol::T_LIST, 8);
{
- xfer += oprot->writeString(_iter67->first);
- xfer += oprot->writeI32((int32_t)_iter67->second);
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->batchQueues.size()));
+ std::vector<BatchQueue> ::const_iterator _iter59;
+ for (_iter59 = this->batchQueues.begin(); _iter59 != this->batchQueues.end(); ++_iter59)
+ {
+ xfer += (*_iter59).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
}
- xfer += oprot->writeMapEnd();
+ xfer += oprot->writeFieldEnd();
}
- xfer += oprot->writeFieldEnd();
-
- xfer += oprot->writeFieldBegin("dataMovementProtocols", ::apache::thrift::protocol::T_MAP, 10);
- {
- xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->dataMovementProtocols.size()));
- std::map<std::string, DataMovementProtocol::type> ::const_iterator _iter68;
- for (_iter68 = this->dataMovementProtocols.begin(); _iter68 != this->dataMovementProtocols.end(); ++_iter68)
+ if (this->__isset.fileSystems) {
+ xfer += oprot->writeFieldBegin("fileSystems", ::apache::thrift::protocol::T_MAP, 9);
{
- xfer += oprot->writeString(_iter68->first);
- xfer += oprot->writeI32((int32_t)_iter68->second);
+ xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->fileSystems.size()));
+ std::map<FileSystems::type, std::string> ::const_iterator _iter60;
+ for (_iter60 = this->fileSystems.begin(); _iter60 != this->fileSystems.end(); ++_iter60)
+ {
+ xfer += oprot->writeI32((int32_t)_iter60->first);
+ xfer += oprot->writeString(_iter60->second);
+ }
+ xfer += oprot->writeMapEnd();
}
- xfer += oprot->writeMapEnd();
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.jobSubmissionInterfaces) {
+ xfer += oprot->writeFieldBegin("jobSubmissionInterfaces", ::apache::thrift::protocol::T_LIST, 10);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->jobSubmissionInterfaces.size()));
+ std::vector<JobSubmissionInterface> ::const_iterator _iter61;
+ for (_iter61 = this->jobSubmissionInterfaces.begin(); _iter61 != this->jobSubmissionInterfaces.end(); ++_iter61)
+ {
+ xfer += (*_iter61).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.dataMovemenetInterfaces) {
+ xfer += oprot->writeFieldBegin("dataMovemenetInterfaces", ::apache::thrift::protocol::T_LIST, 11);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataMovemenetInterfaces.size()));
+ std::vector<DataMovementInterface> ::const_iterator _iter62;
+ for (_iter62 = this->dataMovemenetInterfaces.begin(); _iter62 != this->dataMovemenetInterfaces.end(); ++_iter62)
+ {
+ xfer += (*_iter62).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
}
- xfer += oprot->writeFieldEnd();
-
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -1011,14 +1413,16 @@ uint32_t ComputeResourceDescription::write(::apache::thrift::protocol::TProtocol
void swap(ComputeResourceDescription &a, ComputeResourceDescription &b) {
using ::std::swap;
swap(a.isEmpty, b.isEmpty);
- swap(a.resourceId, b.resourceId);
+ swap(a.computeResourceId, b.computeResourceId);
swap(a.hostName, b.hostName);
swap(a.hostAliases, b.hostAliases);
swap(a.ipAddresses, b.ipAddresses);
- swap(a.resourceDescription, b.resourceDescription);
- swap(a.preferredJobSubmissionProtocol, b.preferredJobSubmissionProtocol);
- swap(a.jobSubmissionProtocols, b.jobSubmissionProtocols);
- swap(a.dataMovementProtocols, b.dataMovementProtocols);
+ swap(a.computeResourceDescription, b.computeResourceDescription);
+ swap(a.resourceJobManager, b.resourceJobManager);
+ swap(a.batchQueues, b.batchQueues);
+ swap(a.fileSystems, b.fileSystems);
+ swap(a.jobSubmissionInterfaces, b.jobSubmissionInterfaces);
+ swap(a.dataMovemenetInterfaces, b.dataMovemenetInterfaces);
swap(a.__isset, b.__isset);
}
[06/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
new file mode 100644
index 0000000..00446a7
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ComputeResourceDescription.java
@@ -0,0 +1,1763 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Computational Resource Description
+ *
+ * computeResourceId: Airavata Internal Unique Identifier to distinguish Compute Resource.
+ *
+ * hostName:
+ * Fully Qualified Host Name.
+ *
+ * ipAddress:
+ * IP Addresses of the Resource.
+ *
+ * resourceDescription:
+ * A user friendly description of the resource.
+ *
+ * JobSubmissionProtocols:
+ * A computational resources may have one or more ways of submitting Jobs. This structure
+ * will hold all available mechanisms to interact with the resource.
+ * The key is the priority
+ *
+ * DataMovementProtocol:
+ * Option to specify a prefered data movement mechanism of the available options.
+ *
+ * fileSystems:
+ * Map of file systems type and the path.
+ *
+ */
+@SuppressWarnings("all") public class ComputeResourceDescription implements org.apache.thrift.TBase<ComputeResourceDescription, ComputeResourceDescription._Fields>, java.io.Serializable, Cloneable, Comparable<ComputeResourceDescription> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComputeResourceDescription");
+
+ private static final org.apache.thrift.protocol.TField IS_EMPTY_FIELD_DESC = new org.apache.thrift.protocol.TField("isEmpty", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField HOST_ALIASES_FIELD_DESC = new org.apache.thrift.protocol.TField("hostAliases", org.apache.thrift.protocol.TType.SET, (short)4);
+ private static final org.apache.thrift.protocol.TField IP_ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddresses", org.apache.thrift.protocol.TType.SET, (short)5);
+ private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceDescription", org.apache.thrift.protocol.TType.STRING, (short)6);
+ private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)7);
+ private static final org.apache.thrift.protocol.TField BATCH_QUEUES_FIELD_DESC = new org.apache.thrift.protocol.TField("batchQueues", org.apache.thrift.protocol.TType.LIST, (short)8);
+ private static final org.apache.thrift.protocol.TField FILE_SYSTEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSystems", org.apache.thrift.protocol.TType.MAP, (short)9);
+ private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACES_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaces", org.apache.thrift.protocol.TType.LIST, (short)10);
+ private static final org.apache.thrift.protocol.TField DATA_MOVEMENET_INTERFACES_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovemenetInterfaces", org.apache.thrift.protocol.TType.LIST, (short)11);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ComputeResourceDescriptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ComputeResourceDescriptionTupleSchemeFactory());
+ }
+
+ private boolean isEmpty; // required
+ private String computeResourceId; // required
+ private String hostName; // required
+ private Set<String> hostAliases; // optional
+ private Set<String> ipAddresses; // optional
+ private String computeResourceDescription; // optional
+ private ResourceJobManager resourceJobManager; // optional
+ private List<BatchQueue> batchQueues; // optional
+ private Map<FileSystems,String> fileSystems; // optional
+ private List<JobSubmissionInterface> jobSubmissionInterfaces; // optional
+ private List<DataMovementInterface> dataMovemenetInterfaces; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IS_EMPTY((short)1, "isEmpty"),
+ COMPUTE_RESOURCE_ID((short)2, "computeResourceId"),
+ HOST_NAME((short)3, "hostName"),
+ HOST_ALIASES((short)4, "hostAliases"),
+ IP_ADDRESSES((short)5, "ipAddresses"),
+ COMPUTE_RESOURCE_DESCRIPTION((short)6, "computeResourceDescription"),
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ RESOURCE_JOB_MANAGER((short)7, "resourceJobManager"),
+ BATCH_QUEUES((short)8, "batchQueues"),
+ FILE_SYSTEMS((short)9, "fileSystems"),
+ JOB_SUBMISSION_INTERFACES((short)10, "jobSubmissionInterfaces"),
+ DATA_MOVEMENET_INTERFACES((short)11, "dataMovemenetInterfaces");
+
+ 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: // IS_EMPTY
+ return IS_EMPTY;
+ case 2: // COMPUTE_RESOURCE_ID
+ return COMPUTE_RESOURCE_ID;
+ case 3: // HOST_NAME
+ return HOST_NAME;
+ case 4: // HOST_ALIASES
+ return HOST_ALIASES;
+ case 5: // IP_ADDRESSES
+ return IP_ADDRESSES;
+ case 6: // COMPUTE_RESOURCE_DESCRIPTION
+ return COMPUTE_RESOURCE_DESCRIPTION;
+ case 7: // RESOURCE_JOB_MANAGER
+ return RESOURCE_JOB_MANAGER;
+ case 8: // BATCH_QUEUES
+ return BATCH_QUEUES;
+ case 9: // FILE_SYSTEMS
+ return FILE_SYSTEMS;
+ case 10: // JOB_SUBMISSION_INTERFACES
+ return JOB_SUBMISSION_INTERFACES;
+ case 11: // DATA_MOVEMENET_INTERFACES
+ return DATA_MOVEMENET_INTERFACES;
+ 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 __ISEMPTY_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.HOST_ALIASES,_Fields.IP_ADDRESSES,_Fields.COMPUTE_RESOURCE_DESCRIPTION,_Fields.RESOURCE_JOB_MANAGER,_Fields.BATCH_QUEUES,_Fields.FILE_SYSTEMS,_Fields.JOB_SUBMISSION_INTERFACES,_Fields.DATA_MOVEMENET_INTERFACES};
+ 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.IS_EMPTY, new org.apache.thrift.meta_data.FieldMetaData("isEmpty", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("computeResourceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HOST_ALIASES, new org.apache.thrift.meta_data.FieldMetaData("hostAliases", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.IP_ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("ipAddresses", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.COMPUTE_RESOURCE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("computeResourceDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
+ tmpMap.put(_Fields.BATCH_QUEUES, new org.apache.thrift.meta_data.FieldMetaData("batchQueues", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, BatchQueue.class))));
+ tmpMap.put(_Fields.FILE_SYSTEMS, new org.apache.thrift.meta_data.FieldMetaData("fileSystems", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FileSystems.class),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.JOB_SUBMISSION_INTERFACES, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaces", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, JobSubmissionInterface.class))));
+ tmpMap.put(_Fields.DATA_MOVEMENET_INTERFACES, new org.apache.thrift.meta_data.FieldMetaData("dataMovemenetInterfaces", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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, DataMovementInterface.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComputeResourceDescription.class, metaDataMap);
+ }
+
+ public ComputeResourceDescription() {
+ this.isEmpty = false;
+
+ this.computeResourceId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public ComputeResourceDescription(
+ boolean isEmpty,
+ String computeResourceId,
+ String hostName)
+ {
+ this();
+ this.isEmpty = isEmpty;
+ setIsEmptyIsSet(true);
+ this.computeResourceId = computeResourceId;
+ this.hostName = hostName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ComputeResourceDescription(ComputeResourceDescription other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.isEmpty = other.isEmpty;
+ if (other.isSetComputeResourceId()) {
+ this.computeResourceId = other.computeResourceId;
+ }
+ if (other.isSetHostName()) {
+ this.hostName = other.hostName;
+ }
+ if (other.isSetHostAliases()) {
+ Set<String> __this__hostAliases = new HashSet<String>(other.hostAliases);
+ this.hostAliases = __this__hostAliases;
+ }
+ if (other.isSetIpAddresses()) {
+ Set<String> __this__ipAddresses = new HashSet<String>(other.ipAddresses);
+ this.ipAddresses = __this__ipAddresses;
+ }
+ if (other.isSetComputeResourceDescription()) {
+ this.computeResourceDescription = other.computeResourceDescription;
+ }
+ if (other.isSetResourceJobManager()) {
+ this.resourceJobManager = other.resourceJobManager;
+ }
+ if (other.isSetBatchQueues()) {
+ List<BatchQueue> __this__batchQueues = new ArrayList<BatchQueue>(other.batchQueues.size());
+ for (BatchQueue other_element : other.batchQueues) {
+ __this__batchQueues.add(new BatchQueue(other_element));
+ }
+ this.batchQueues = __this__batchQueues;
+ }
+ if (other.isSetFileSystems()) {
+ Map<FileSystems,String> __this__fileSystems = new HashMap<FileSystems,String>(other.fileSystems.size());
+ for (Map.Entry<FileSystems, String> other_element : other.fileSystems.entrySet()) {
+
+ FileSystems other_element_key = other_element.getKey();
+ String other_element_value = other_element.getValue();
+
+ FileSystems __this__fileSystems_copy_key = other_element_key;
+
+ String __this__fileSystems_copy_value = other_element_value;
+
+ __this__fileSystems.put(__this__fileSystems_copy_key, __this__fileSystems_copy_value);
+ }
+ this.fileSystems = __this__fileSystems;
+ }
+ if (other.isSetJobSubmissionInterfaces()) {
+ List<JobSubmissionInterface> __this__jobSubmissionInterfaces = new ArrayList<JobSubmissionInterface>(other.jobSubmissionInterfaces.size());
+ for (JobSubmissionInterface other_element : other.jobSubmissionInterfaces) {
+ __this__jobSubmissionInterfaces.add(new JobSubmissionInterface(other_element));
+ }
+ this.jobSubmissionInterfaces = __this__jobSubmissionInterfaces;
+ }
+ if (other.isSetDataMovemenetInterfaces()) {
+ List<DataMovementInterface> __this__dataMovemenetInterfaces = new ArrayList<DataMovementInterface>(other.dataMovemenetInterfaces.size());
+ for (DataMovementInterface other_element : other.dataMovemenetInterfaces) {
+ __this__dataMovemenetInterfaces.add(new DataMovementInterface(other_element));
+ }
+ this.dataMovemenetInterfaces = __this__dataMovemenetInterfaces;
+ }
+ }
+
+ public ComputeResourceDescription deepCopy() {
+ return new ComputeResourceDescription(this);
+ }
+
+ @Override
+ public void clear() {
+ this.isEmpty = false;
+
+ this.computeResourceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.hostName = null;
+ this.hostAliases = null;
+ this.ipAddresses = null;
+ this.computeResourceDescription = null;
+ this.resourceJobManager = null;
+ this.batchQueues = null;
+ this.fileSystems = null;
+ this.jobSubmissionInterfaces = null;
+ this.dataMovemenetInterfaces = null;
+ }
+
+ public boolean isIsEmpty() {
+ return this.isEmpty;
+ }
+
+ public void setIsEmpty(boolean isEmpty) {
+ this.isEmpty = isEmpty;
+ setIsEmptyIsSet(true);
+ }
+
+ public void unsetIsEmpty() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEMPTY_ISSET_ID);
+ }
+
+ /** Returns true if field isEmpty is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsEmpty() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISEMPTY_ISSET_ID);
+ }
+
+ public void setIsEmptyIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEMPTY_ISSET_ID, value);
+ }
+
+ public String getComputeResourceId() {
+ return this.computeResourceId;
+ }
+
+ public void setComputeResourceId(String computeResourceId) {
+ this.computeResourceId = computeResourceId;
+ }
+
+ public void unsetComputeResourceId() {
+ this.computeResourceId = null;
+ }
+
+ /** Returns true if field computeResourceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputeResourceId() {
+ return this.computeResourceId != null;
+ }
+
+ public void setComputeResourceIdIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceId = null;
+ }
+ }
+
+ public String getHostName() {
+ return this.hostName;
+ }
+
+ public void setHostName(String hostName) {
+ this.hostName = hostName;
+ }
+
+ public void unsetHostName() {
+ this.hostName = null;
+ }
+
+ /** Returns true if field hostName is set (has been assigned a value) and false otherwise */
+ public boolean isSetHostName() {
+ return this.hostName != null;
+ }
+
+ public void setHostNameIsSet(boolean value) {
+ if (!value) {
+ this.hostName = null;
+ }
+ }
+
+ public int getHostAliasesSize() {
+ return (this.hostAliases == null) ? 0 : this.hostAliases.size();
+ }
+
+ public java.util.Iterator<String> getHostAliasesIterator() {
+ return (this.hostAliases == null) ? null : this.hostAliases.iterator();
+ }
+
+ public void addToHostAliases(String elem) {
+ if (this.hostAliases == null) {
+ this.hostAliases = new HashSet<String>();
+ }
+ this.hostAliases.add(elem);
+ }
+
+ public Set<String> getHostAliases() {
+ return this.hostAliases;
+ }
+
+ public void setHostAliases(Set<String> hostAliases) {
+ this.hostAliases = hostAliases;
+ }
+
+ public void unsetHostAliases() {
+ this.hostAliases = null;
+ }
+
+ /** Returns true if field hostAliases is set (has been assigned a value) and false otherwise */
+ public boolean isSetHostAliases() {
+ return this.hostAliases != null;
+ }
+
+ public void setHostAliasesIsSet(boolean value) {
+ if (!value) {
+ this.hostAliases = null;
+ }
+ }
+
+ public int getIpAddressesSize() {
+ return (this.ipAddresses == null) ? 0 : this.ipAddresses.size();
+ }
+
+ public java.util.Iterator<String> getIpAddressesIterator() {
+ return (this.ipAddresses == null) ? null : this.ipAddresses.iterator();
+ }
+
+ public void addToIpAddresses(String elem) {
+ if (this.ipAddresses == null) {
+ this.ipAddresses = new HashSet<String>();
+ }
+ this.ipAddresses.add(elem);
+ }
+
+ public Set<String> getIpAddresses() {
+ return this.ipAddresses;
+ }
+
+ public void setIpAddresses(Set<String> ipAddresses) {
+ this.ipAddresses = ipAddresses;
+ }
+
+ public void unsetIpAddresses() {
+ this.ipAddresses = null;
+ }
+
+ /** Returns true if field ipAddresses is set (has been assigned a value) and false otherwise */
+ public boolean isSetIpAddresses() {
+ return this.ipAddresses != null;
+ }
+
+ public void setIpAddressesIsSet(boolean value) {
+ if (!value) {
+ this.ipAddresses = null;
+ }
+ }
+
+ public String getComputeResourceDescription() {
+ return this.computeResourceDescription;
+ }
+
+ public void setComputeResourceDescription(String computeResourceDescription) {
+ this.computeResourceDescription = computeResourceDescription;
+ }
+
+ public void unsetComputeResourceDescription() {
+ this.computeResourceDescription = null;
+ }
+
+ /** Returns true if field computeResourceDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputeResourceDescription() {
+ return this.computeResourceDescription != null;
+ }
+
+ public void setComputeResourceDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.computeResourceDescription = null;
+ }
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public ResourceJobManager getResourceJobManager() {
+ return this.resourceJobManager;
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public void setResourceJobManager(ResourceJobManager resourceJobManager) {
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ public void unsetResourceJobManager() {
+ this.resourceJobManager = null;
+ }
+
+ /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
+ public boolean isSetResourceJobManager() {
+ return this.resourceJobManager != null;
+ }
+
+ public void setResourceJobManagerIsSet(boolean value) {
+ if (!value) {
+ this.resourceJobManager = null;
+ }
+ }
+
+ public int getBatchQueuesSize() {
+ return (this.batchQueues == null) ? 0 : this.batchQueues.size();
+ }
+
+ public java.util.Iterator<BatchQueue> getBatchQueuesIterator() {
+ return (this.batchQueues == null) ? null : this.batchQueues.iterator();
+ }
+
+ public void addToBatchQueues(BatchQueue elem) {
+ if (this.batchQueues == null) {
+ this.batchQueues = new ArrayList<BatchQueue>();
+ }
+ this.batchQueues.add(elem);
+ }
+
+ public List<BatchQueue> getBatchQueues() {
+ return this.batchQueues;
+ }
+
+ public void setBatchQueues(List<BatchQueue> batchQueues) {
+ this.batchQueues = batchQueues;
+ }
+
+ public void unsetBatchQueues() {
+ this.batchQueues = null;
+ }
+
+ /** Returns true if field batchQueues is set (has been assigned a value) and false otherwise */
+ public boolean isSetBatchQueues() {
+ return this.batchQueues != null;
+ }
+
+ public void setBatchQueuesIsSet(boolean value) {
+ if (!value) {
+ this.batchQueues = null;
+ }
+ }
+
+ public int getFileSystemsSize() {
+ return (this.fileSystems == null) ? 0 : this.fileSystems.size();
+ }
+
+ public void putToFileSystems(FileSystems key, String val) {
+ if (this.fileSystems == null) {
+ this.fileSystems = new HashMap<FileSystems,String>();
+ }
+ this.fileSystems.put(key, val);
+ }
+
+ public Map<FileSystems,String> getFileSystems() {
+ return this.fileSystems;
+ }
+
+ public void setFileSystems(Map<FileSystems,String> fileSystems) {
+ this.fileSystems = fileSystems;
+ }
+
+ public void unsetFileSystems() {
+ this.fileSystems = null;
+ }
+
+ /** Returns true if field fileSystems is set (has been assigned a value) and false otherwise */
+ public boolean isSetFileSystems() {
+ return this.fileSystems != null;
+ }
+
+ public void setFileSystemsIsSet(boolean value) {
+ if (!value) {
+ this.fileSystems = null;
+ }
+ }
+
+ public int getJobSubmissionInterfacesSize() {
+ return (this.jobSubmissionInterfaces == null) ? 0 : this.jobSubmissionInterfaces.size();
+ }
+
+ public java.util.Iterator<JobSubmissionInterface> getJobSubmissionInterfacesIterator() {
+ return (this.jobSubmissionInterfaces == null) ? null : this.jobSubmissionInterfaces.iterator();
+ }
+
+ public void addToJobSubmissionInterfaces(JobSubmissionInterface elem) {
+ if (this.jobSubmissionInterfaces == null) {
+ this.jobSubmissionInterfaces = new ArrayList<JobSubmissionInterface>();
+ }
+ this.jobSubmissionInterfaces.add(elem);
+ }
+
+ public List<JobSubmissionInterface> getJobSubmissionInterfaces() {
+ return this.jobSubmissionInterfaces;
+ }
+
+ public void setJobSubmissionInterfaces(List<JobSubmissionInterface> jobSubmissionInterfaces) {
+ this.jobSubmissionInterfaces = jobSubmissionInterfaces;
+ }
+
+ public void unsetJobSubmissionInterfaces() {
+ this.jobSubmissionInterfaces = null;
+ }
+
+ /** Returns true if field jobSubmissionInterfaces is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobSubmissionInterfaces() {
+ return this.jobSubmissionInterfaces != null;
+ }
+
+ public void setJobSubmissionInterfacesIsSet(boolean value) {
+ if (!value) {
+ this.jobSubmissionInterfaces = null;
+ }
+ }
+
+ public int getDataMovemenetInterfacesSize() {
+ return (this.dataMovemenetInterfaces == null) ? 0 : this.dataMovemenetInterfaces.size();
+ }
+
+ public java.util.Iterator<DataMovementInterface> getDataMovemenetInterfacesIterator() {
+ return (this.dataMovemenetInterfaces == null) ? null : this.dataMovemenetInterfaces.iterator();
+ }
+
+ public void addToDataMovemenetInterfaces(DataMovementInterface elem) {
+ if (this.dataMovemenetInterfaces == null) {
+ this.dataMovemenetInterfaces = new ArrayList<DataMovementInterface>();
+ }
+ this.dataMovemenetInterfaces.add(elem);
+ }
+
+ public List<DataMovementInterface> getDataMovemenetInterfaces() {
+ return this.dataMovemenetInterfaces;
+ }
+
+ public void setDataMovemenetInterfaces(List<DataMovementInterface> dataMovemenetInterfaces) {
+ this.dataMovemenetInterfaces = dataMovemenetInterfaces;
+ }
+
+ public void unsetDataMovemenetInterfaces() {
+ this.dataMovemenetInterfaces = null;
+ }
+
+ /** Returns true if field dataMovemenetInterfaces is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataMovemenetInterfaces() {
+ return this.dataMovemenetInterfaces != null;
+ }
+
+ public void setDataMovemenetInterfacesIsSet(boolean value) {
+ if (!value) {
+ this.dataMovemenetInterfaces = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IS_EMPTY:
+ if (value == null) {
+ unsetIsEmpty();
+ } else {
+ setIsEmpty((Boolean)value);
+ }
+ break;
+
+ case COMPUTE_RESOURCE_ID:
+ if (value == null) {
+ unsetComputeResourceId();
+ } else {
+ setComputeResourceId((String)value);
+ }
+ break;
+
+ case HOST_NAME:
+ if (value == null) {
+ unsetHostName();
+ } else {
+ setHostName((String)value);
+ }
+ break;
+
+ case HOST_ALIASES:
+ if (value == null) {
+ unsetHostAliases();
+ } else {
+ setHostAliases((Set<String>)value);
+ }
+ break;
+
+ case IP_ADDRESSES:
+ if (value == null) {
+ unsetIpAddresses();
+ } else {
+ setIpAddresses((Set<String>)value);
+ }
+ break;
+
+ case COMPUTE_RESOURCE_DESCRIPTION:
+ if (value == null) {
+ unsetComputeResourceDescription();
+ } else {
+ setComputeResourceDescription((String)value);
+ }
+ break;
+
+ case RESOURCE_JOB_MANAGER:
+ if (value == null) {
+ unsetResourceJobManager();
+ } else {
+ setResourceJobManager((ResourceJobManager)value);
+ }
+ break;
+
+ case BATCH_QUEUES:
+ if (value == null) {
+ unsetBatchQueues();
+ } else {
+ setBatchQueues((List<BatchQueue>)value);
+ }
+ break;
+
+ case FILE_SYSTEMS:
+ if (value == null) {
+ unsetFileSystems();
+ } else {
+ setFileSystems((Map<FileSystems,String>)value);
+ }
+ break;
+
+ case JOB_SUBMISSION_INTERFACES:
+ if (value == null) {
+ unsetJobSubmissionInterfaces();
+ } else {
+ setJobSubmissionInterfaces((List<JobSubmissionInterface>)value);
+ }
+ break;
+
+ case DATA_MOVEMENET_INTERFACES:
+ if (value == null) {
+ unsetDataMovemenetInterfaces();
+ } else {
+ setDataMovemenetInterfaces((List<DataMovementInterface>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IS_EMPTY:
+ return Boolean.valueOf(isIsEmpty());
+
+ case COMPUTE_RESOURCE_ID:
+ return getComputeResourceId();
+
+ case HOST_NAME:
+ return getHostName();
+
+ case HOST_ALIASES:
+ return getHostAliases();
+
+ case IP_ADDRESSES:
+ return getIpAddresses();
+
+ case COMPUTE_RESOURCE_DESCRIPTION:
+ return getComputeResourceDescription();
+
+ case RESOURCE_JOB_MANAGER:
+ return getResourceJobManager();
+
+ case BATCH_QUEUES:
+ return getBatchQueues();
+
+ case FILE_SYSTEMS:
+ return getFileSystems();
+
+ case JOB_SUBMISSION_INTERFACES:
+ return getJobSubmissionInterfaces();
+
+ case DATA_MOVEMENET_INTERFACES:
+ return getDataMovemenetInterfaces();
+
+ }
+ 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 IS_EMPTY:
+ return isSetIsEmpty();
+ case COMPUTE_RESOURCE_ID:
+ return isSetComputeResourceId();
+ case HOST_NAME:
+ return isSetHostName();
+ case HOST_ALIASES:
+ return isSetHostAliases();
+ case IP_ADDRESSES:
+ return isSetIpAddresses();
+ case COMPUTE_RESOURCE_DESCRIPTION:
+ return isSetComputeResourceDescription();
+ case RESOURCE_JOB_MANAGER:
+ return isSetResourceJobManager();
+ case BATCH_QUEUES:
+ return isSetBatchQueues();
+ case FILE_SYSTEMS:
+ return isSetFileSystems();
+ case JOB_SUBMISSION_INTERFACES:
+ return isSetJobSubmissionInterfaces();
+ case DATA_MOVEMENET_INTERFACES:
+ return isSetDataMovemenetInterfaces();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ComputeResourceDescription)
+ return this.equals((ComputeResourceDescription)that);
+ return false;
+ }
+
+ public boolean equals(ComputeResourceDescription that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_isEmpty = true;
+ boolean that_present_isEmpty = true;
+ if (this_present_isEmpty || that_present_isEmpty) {
+ if (!(this_present_isEmpty && that_present_isEmpty))
+ return false;
+ if (this.isEmpty != that.isEmpty)
+ return false;
+ }
+
+ boolean this_present_computeResourceId = true && this.isSetComputeResourceId();
+ boolean that_present_computeResourceId = true && that.isSetComputeResourceId();
+ if (this_present_computeResourceId || that_present_computeResourceId) {
+ if (!(this_present_computeResourceId && that_present_computeResourceId))
+ return false;
+ if (!this.computeResourceId.equals(that.computeResourceId))
+ return false;
+ }
+
+ boolean this_present_hostName = true && this.isSetHostName();
+ boolean that_present_hostName = true && that.isSetHostName();
+ if (this_present_hostName || that_present_hostName) {
+ if (!(this_present_hostName && that_present_hostName))
+ return false;
+ if (!this.hostName.equals(that.hostName))
+ return false;
+ }
+
+ boolean this_present_hostAliases = true && this.isSetHostAliases();
+ boolean that_present_hostAliases = true && that.isSetHostAliases();
+ if (this_present_hostAliases || that_present_hostAliases) {
+ if (!(this_present_hostAliases && that_present_hostAliases))
+ return false;
+ if (!this.hostAliases.equals(that.hostAliases))
+ return false;
+ }
+
+ boolean this_present_ipAddresses = true && this.isSetIpAddresses();
+ boolean that_present_ipAddresses = true && that.isSetIpAddresses();
+ if (this_present_ipAddresses || that_present_ipAddresses) {
+ if (!(this_present_ipAddresses && that_present_ipAddresses))
+ return false;
+ if (!this.ipAddresses.equals(that.ipAddresses))
+ return false;
+ }
+
+ boolean this_present_computeResourceDescription = true && this.isSetComputeResourceDescription();
+ boolean that_present_computeResourceDescription = true && that.isSetComputeResourceDescription();
+ if (this_present_computeResourceDescription || that_present_computeResourceDescription) {
+ if (!(this_present_computeResourceDescription && that_present_computeResourceDescription))
+ return false;
+ if (!this.computeResourceDescription.equals(that.computeResourceDescription))
+ return false;
+ }
+
+ boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
+ boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
+ if (this_present_resourceJobManager || that_present_resourceJobManager) {
+ if (!(this_present_resourceJobManager && that_present_resourceJobManager))
+ return false;
+ if (!this.resourceJobManager.equals(that.resourceJobManager))
+ return false;
+ }
+
+ boolean this_present_batchQueues = true && this.isSetBatchQueues();
+ boolean that_present_batchQueues = true && that.isSetBatchQueues();
+ if (this_present_batchQueues || that_present_batchQueues) {
+ if (!(this_present_batchQueues && that_present_batchQueues))
+ return false;
+ if (!this.batchQueues.equals(that.batchQueues))
+ return false;
+ }
+
+ boolean this_present_fileSystems = true && this.isSetFileSystems();
+ boolean that_present_fileSystems = true && that.isSetFileSystems();
+ if (this_present_fileSystems || that_present_fileSystems) {
+ if (!(this_present_fileSystems && that_present_fileSystems))
+ return false;
+ if (!this.fileSystems.equals(that.fileSystems))
+ return false;
+ }
+
+ boolean this_present_jobSubmissionInterfaces = true && this.isSetJobSubmissionInterfaces();
+ boolean that_present_jobSubmissionInterfaces = true && that.isSetJobSubmissionInterfaces();
+ if (this_present_jobSubmissionInterfaces || that_present_jobSubmissionInterfaces) {
+ if (!(this_present_jobSubmissionInterfaces && that_present_jobSubmissionInterfaces))
+ return false;
+ if (!this.jobSubmissionInterfaces.equals(that.jobSubmissionInterfaces))
+ return false;
+ }
+
+ boolean this_present_dataMovemenetInterfaces = true && this.isSetDataMovemenetInterfaces();
+ boolean that_present_dataMovemenetInterfaces = true && that.isSetDataMovemenetInterfaces();
+ if (this_present_dataMovemenetInterfaces || that_present_dataMovemenetInterfaces) {
+ if (!(this_present_dataMovemenetInterfaces && that_present_dataMovemenetInterfaces))
+ return false;
+ if (!this.dataMovemenetInterfaces.equals(that.dataMovemenetInterfaces))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ComputeResourceDescription other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetIsEmpty()).compareTo(other.isSetIsEmpty());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsEmpty()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEmpty, other.isEmpty);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputeResourceId()).compareTo(other.isSetComputeResourceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceId, other.computeResourceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHostName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostName, other.hostName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHostAliases()).compareTo(other.isSetHostAliases());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHostAliases()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostAliases, other.hostAliases);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIpAddresses()).compareTo(other.isSetIpAddresses());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIpAddresses()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddresses, other.ipAddresses);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputeResourceDescription()).compareTo(other.isSetComputeResourceDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputeResourceDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceDescription, other.computeResourceDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResourceJobManager()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetBatchQueues()).compareTo(other.isSetBatchQueues());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBatchQueues()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchQueues, other.batchQueues);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFileSystems()).compareTo(other.isSetFileSystems());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFileSystems()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSystems, other.fileSystems);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaces()).compareTo(other.isSetJobSubmissionInterfaces());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobSubmissionInterfaces()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaces, other.jobSubmissionInterfaces);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDataMovemenetInterfaces()).compareTo(other.isSetDataMovemenetInterfaces());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataMovemenetInterfaces()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovemenetInterfaces, other.dataMovemenetInterfaces);
+ 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("ComputeResourceDescription(");
+ boolean first = true;
+
+ sb.append("isEmpty:");
+ sb.append(this.isEmpty);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("computeResourceId:");
+ if (this.computeResourceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hostName:");
+ if (this.hostName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.hostName);
+ }
+ first = false;
+ if (isSetHostAliases()) {
+ if (!first) sb.append(", ");
+ sb.append("hostAliases:");
+ if (this.hostAliases == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.hostAliases);
+ }
+ first = false;
+ }
+ if (isSetIpAddresses()) {
+ if (!first) sb.append(", ");
+ sb.append("ipAddresses:");
+ if (this.ipAddresses == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.ipAddresses);
+ }
+ first = false;
+ }
+ if (isSetComputeResourceDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("computeResourceDescription:");
+ if (this.computeResourceDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computeResourceDescription);
+ }
+ first = false;
+ }
+ if (isSetResourceJobManager()) {
+ if (!first) sb.append(", ");
+ sb.append("resourceJobManager:");
+ if (this.resourceJobManager == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.resourceJobManager);
+ }
+ first = false;
+ }
+ if (isSetBatchQueues()) {
+ if (!first) sb.append(", ");
+ sb.append("batchQueues:");
+ if (this.batchQueues == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.batchQueues);
+ }
+ first = false;
+ }
+ if (isSetFileSystems()) {
+ if (!first) sb.append(", ");
+ sb.append("fileSystems:");
+ if (this.fileSystems == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fileSystems);
+ }
+ first = false;
+ }
+ if (isSetJobSubmissionInterfaces()) {
+ if (!first) sb.append(", ");
+ sb.append("jobSubmissionInterfaces:");
+ if (this.jobSubmissionInterfaces == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobSubmissionInterfaces);
+ }
+ first = false;
+ }
+ if (isSetDataMovemenetInterfaces()) {
+ if (!first) sb.append(", ");
+ sb.append("dataMovemenetInterfaces:");
+ if (this.dataMovemenetInterfaces == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataMovemenetInterfaces);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetIsEmpty()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'isEmpty' is unset! Struct:" + toString());
+ }
+
+ if (!isSetComputeResourceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'computeResourceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetHostName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostName' is unset! Struct:" + toString());
+ }
+
+ // 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 ComputeResourceDescriptionStandardSchemeFactory implements SchemeFactory {
+ public ComputeResourceDescriptionStandardScheme getScheme() {
+ return new ComputeResourceDescriptionStandardScheme();
+ }
+ }
+
+ private static class ComputeResourceDescriptionStandardScheme extends StandardScheme<ComputeResourceDescription> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ComputeResourceDescription 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: // IS_EMPTY
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isEmpty = iprot.readBool();
+ struct.setIsEmptyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // COMPUTE_RESOURCE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // HOST_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.hostName = iprot.readString();
+ struct.setHostNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // HOST_ALIASES
+ if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+ {
+ org.apache.thrift.protocol.TSet _set16 = iprot.readSetBegin();
+ struct.hostAliases = new HashSet<String>(2*_set16.size);
+ for (int _i17 = 0; _i17 < _set16.size; ++_i17)
+ {
+ String _elem18;
+ _elem18 = iprot.readString();
+ struct.hostAliases.add(_elem18);
+ }
+ iprot.readSetEnd();
+ }
+ struct.setHostAliasesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // IP_ADDRESSES
+ if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+ {
+ org.apache.thrift.protocol.TSet _set19 = iprot.readSetBegin();
+ struct.ipAddresses = new HashSet<String>(2*_set19.size);
+ for (int _i20 = 0; _i20 < _set19.size; ++_i20)
+ {
+ String _elem21;
+ _elem21 = iprot.readString();
+ struct.ipAddresses.add(_elem21);
+ }
+ iprot.readSetEnd();
+ }
+ struct.setIpAddressesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // COMPUTE_RESOURCE_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.computeResourceDescription = iprot.readString();
+ struct.setComputeResourceDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // RESOURCE_JOB_MANAGER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // BATCH_QUEUES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
+ struct.batchQueues = new ArrayList<BatchQueue>(_list22.size);
+ for (int _i23 = 0; _i23 < _list22.size; ++_i23)
+ {
+ BatchQueue _elem24;
+ _elem24 = new BatchQueue();
+ _elem24.read(iprot);
+ struct.batchQueues.add(_elem24);
+ }
+ iprot.readListEnd();
+ }
+ struct.setBatchQueuesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // FILE_SYSTEMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map25 = iprot.readMapBegin();
+ struct.fileSystems = new HashMap<FileSystems,String>(2*_map25.size);
+ for (int _i26 = 0; _i26 < _map25.size; ++_i26)
+ {
+ FileSystems _key27;
+ String _val28;
+ _key27 = FileSystems.findByValue(iprot.readI32());
+ _val28 = iprot.readString();
+ struct.fileSystems.put(_key27, _val28);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setFileSystemsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // JOB_SUBMISSION_INTERFACES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
+ struct.jobSubmissionInterfaces = new ArrayList<JobSubmissionInterface>(_list29.size);
+ for (int _i30 = 0; _i30 < _list29.size; ++_i30)
+ {
+ JobSubmissionInterface _elem31;
+ _elem31 = new JobSubmissionInterface();
+ _elem31.read(iprot);
+ struct.jobSubmissionInterfaces.add(_elem31);
+ }
+ iprot.readListEnd();
+ }
+ struct.setJobSubmissionInterfacesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // DATA_MOVEMENET_INTERFACES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
+ struct.dataMovemenetInterfaces = new ArrayList<DataMovementInterface>(_list32.size);
+ for (int _i33 = 0; _i33 < _list32.size; ++_i33)
+ {
+ DataMovementInterface _elem34;
+ _elem34 = new DataMovementInterface();
+ _elem34.read(iprot);
+ struct.dataMovemenetInterfaces.add(_elem34);
+ }
+ iprot.readListEnd();
+ }
+ struct.setDataMovemenetInterfacesIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ComputeResourceDescription struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(IS_EMPTY_FIELD_DESC);
+ oprot.writeBool(struct.isEmpty);
+ oprot.writeFieldEnd();
+ if (struct.computeResourceId != null) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_ID_FIELD_DESC);
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.hostName != null) {
+ oprot.writeFieldBegin(HOST_NAME_FIELD_DESC);
+ oprot.writeString(struct.hostName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.hostAliases != null) {
+ if (struct.isSetHostAliases()) {
+ oprot.writeFieldBegin(HOST_ALIASES_FIELD_DESC);
+ {
+ oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.hostAliases.size()));
+ for (String _iter35 : struct.hostAliases)
+ {
+ oprot.writeString(_iter35);
+ }
+ oprot.writeSetEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.ipAddresses != null) {
+ if (struct.isSetIpAddresses()) {
+ oprot.writeFieldBegin(IP_ADDRESSES_FIELD_DESC);
+ {
+ oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.ipAddresses.size()));
+ for (String _iter36 : struct.ipAddresses)
+ {
+ oprot.writeString(_iter36);
+ }
+ oprot.writeSetEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.computeResourceDescription != null) {
+ if (struct.isSetComputeResourceDescription()) {
+ oprot.writeFieldBegin(COMPUTE_RESOURCE_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.computeResourceDescription);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.resourceJobManager != null) {
+ if (struct.isSetResourceJobManager()) {
+ oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.batchQueues != null) {
+ if (struct.isSetBatchQueues()) {
+ oprot.writeFieldBegin(BATCH_QUEUES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.batchQueues.size()));
+ for (BatchQueue _iter37 : struct.batchQueues)
+ {
+ _iter37.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.fileSystems != null) {
+ if (struct.isSetFileSystems()) {
+ oprot.writeFieldBegin(FILE_SYSTEMS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, struct.fileSystems.size()));
+ for (Map.Entry<FileSystems, String> _iter38 : struct.fileSystems.entrySet())
+ {
+ oprot.writeI32(_iter38.getKey().getValue());
+ oprot.writeString(_iter38.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.jobSubmissionInterfaces != null) {
+ if (struct.isSetJobSubmissionInterfaces()) {
+ oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.jobSubmissionInterfaces.size()));
+ for (JobSubmissionInterface _iter39 : struct.jobSubmissionInterfaces)
+ {
+ _iter39.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.dataMovemenetInterfaces != null) {
+ if (struct.isSetDataMovemenetInterfaces()) {
+ oprot.writeFieldBegin(DATA_MOVEMENET_INTERFACES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.dataMovemenetInterfaces.size()));
+ for (DataMovementInterface _iter40 : struct.dataMovemenetInterfaces)
+ {
+ _iter40.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ComputeResourceDescriptionTupleSchemeFactory implements SchemeFactory {
+ public ComputeResourceDescriptionTupleScheme getScheme() {
+ return new ComputeResourceDescriptionTupleScheme();
+ }
+ }
+
+ private static class ComputeResourceDescriptionTupleScheme extends TupleScheme<ComputeResourceDescription> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ComputeResourceDescription struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.isEmpty);
+ oprot.writeString(struct.computeResourceId);
+ oprot.writeString(struct.hostName);
+ BitSet optionals = new BitSet();
+ if (struct.isSetHostAliases()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIpAddresses()) {
+ optionals.set(1);
+ }
+ if (struct.isSetComputeResourceDescription()) {
+ optionals.set(2);
+ }
+ if (struct.isSetResourceJobManager()) {
+ optionals.set(3);
+ }
+ if (struct.isSetBatchQueues()) {
+ optionals.set(4);
+ }
+ if (struct.isSetFileSystems()) {
+ optionals.set(5);
+ }
+ if (struct.isSetJobSubmissionInterfaces()) {
+ optionals.set(6);
+ }
+ if (struct.isSetDataMovemenetInterfaces()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetHostAliases()) {
+ {
+ oprot.writeI32(struct.hostAliases.size());
+ for (String _iter41 : struct.hostAliases)
+ {
+ oprot.writeString(_iter41);
+ }
+ }
+ }
+ if (struct.isSetIpAddresses()) {
+ {
+ oprot.writeI32(struct.ipAddresses.size());
+ for (String _iter42 : struct.ipAddresses)
+ {
+ oprot.writeString(_iter42);
+ }
+ }
+ }
+ if (struct.isSetComputeResourceDescription()) {
+ oprot.writeString(struct.computeResourceDescription);
+ }
+ if (struct.isSetResourceJobManager()) {
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ }
+ if (struct.isSetBatchQueues()) {
+ {
+ oprot.writeI32(struct.batchQueues.size());
+ for (BatchQueue _iter43 : struct.batchQueues)
+ {
+ _iter43.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetFileSystems()) {
+ {
+ oprot.writeI32(struct.fileSystems.size());
+ for (Map.Entry<FileSystems, String> _iter44 : struct.fileSystems.entrySet())
+ {
+ oprot.writeI32(_iter44.getKey().getValue());
+ oprot.writeString(_iter44.getValue());
+ }
+ }
+ }
+ if (struct.isSetJobSubmissionInterfaces()) {
+ {
+ oprot.writeI32(struct.jobSubmissionInterfaces.size());
+ for (JobSubmissionInterface _iter45 : struct.jobSubmissionInterfaces)
+ {
+ _iter45.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetDataMovemenetInterfaces()) {
+ {
+ oprot.writeI32(struct.dataMovemenetInterfaces.size());
+ for (DataMovementInterface _iter46 : struct.dataMovemenetInterfaces)
+ {
+ _iter46.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ComputeResourceDescription struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.isEmpty = iprot.readBool();
+ struct.setIsEmptyIsSet(true);
+ struct.computeResourceId = iprot.readString();
+ struct.setComputeResourceIdIsSet(true);
+ struct.hostName = iprot.readString();
+ struct.setHostNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TSet _set47 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.hostAliases = new HashSet<String>(2*_set47.size);
+ for (int _i48 = 0; _i48 < _set47.size; ++_i48)
+ {
+ String _elem49;
+ _elem49 = iprot.readString();
+ struct.hostAliases.add(_elem49);
+ }
+ }
+ struct.setHostAliasesIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TSet _set50 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.ipAddresses = new HashSet<String>(2*_set50.size);
+ for (int _i51 = 0; _i51 < _set50.size; ++_i51)
+ {
+ String _elem52;
+ _elem52 = iprot.readString();
+ struct.ipAddresses.add(_elem52);
+ }
+ }
+ struct.setIpAddressesIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.computeResourceDescription = iprot.readString();
+ struct.setComputeResourceDescriptionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ }
+ if (incoming.get(4)) {
+ {
+ org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.batchQueues = new ArrayList<BatchQueue>(_list53.size);
+ for (int _i54 = 0; _i54 < _list53.size; ++_i54)
+ {
+ BatchQueue _elem55;
+ _elem55 = new BatchQueue();
+ _elem55.read(iprot);
+ struct.batchQueues.add(_elem55);
+ }
+ }
+ struct.setBatchQueuesIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TMap _map56 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.fileSystems = new HashMap<FileSystems,String>(2*_map56.size);
+ for (int _i57 = 0; _i57 < _map56.size; ++_i57)
+ {
+ FileSystems _key58;
+ String _val59;
+ _key58 = FileSystems.findByValue(iprot.readI32());
+ _val59 = iprot.readString();
+ struct.fileSystems.put(_key58, _val59);
+ }
+ }
+ struct.setFileSystemsIsSet(true);
+ }
+ if (incoming.get(6)) {
+ {
+ org.apache.thrift.protocol.TList _list60 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.jobSubmissionInterfaces = new ArrayList<JobSubmissionInterface>(_list60.size);
+ for (int _i61 = 0; _i61 < _list60.size; ++_i61)
+ {
+ JobSubmissionInterface _elem62;
+ _elem62 = new JobSubmissionInterface();
+ _elem62.read(iprot);
+ struct.jobSubmissionInterfaces.add(_elem62);
+ }
+ }
+ struct.setJobSubmissionInterfacesIsSet(true);
+ }
+ if (incoming.get(7)) {
+ {
+ org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.dataMovemenetInterfaces = new ArrayList<DataMovementInterface>(_list63.size);
+ for (int _i64 = 0; _i64 < _list63.size; ++_i64)
+ {
+ DataMovementInterface _elem65;
+ _elem65 = new DataMovementInterface();
+ _elem65.read(iprot);
+ struct.dataMovemenetInterfaces.add(_elem65);
+ }
+ }
+ struct.setDataMovemenetInterfacesIsSet(true);
+ }
+ }
+ }
+
+}
+
[04/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
new file mode 100644
index 0000000..7c42f03
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GlobusJobSubmission.java
@@ -0,0 +1,768 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+@SuppressWarnings("all") public class GlobusJobSubmission implements org.apache.thrift.TBase<GlobusJobSubmission, GlobusJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<GlobusJobSubmission> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobusJobSubmission");
+
+ private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField GLOBUS_GATE_KEEPER_END_POINT_FIELD_DESC = new org.apache.thrift.protocol.TField("globusGateKeeperEndPoint", org.apache.thrift.protocol.TType.LIST, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GlobusJobSubmissionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GlobusJobSubmissionTupleSchemeFactory());
+ }
+
+ private String jobSubmissionInterfaceId; // required
+ private SecurityProtocol securityProtocol; // required
+ private ResourceJobManager resourceJobManager; // required
+ private List<String> globusGateKeeperEndPoint; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"),
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ SECURITY_PROTOCOL((short)2, "securityProtocol"),
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ RESOURCE_JOB_MANAGER((short)3, "resourceJobManager"),
+ GLOBUS_GATE_KEEPER_END_POINT((short)4, "globusGateKeeperEndPoint");
+
+ 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: // JOB_SUBMISSION_INTERFACE_ID
+ return JOB_SUBMISSION_INTERFACE_ID;
+ case 2: // SECURITY_PROTOCOL
+ return SECURITY_PROTOCOL;
+ case 3: // RESOURCE_JOB_MANAGER
+ return RESOURCE_JOB_MANAGER;
+ case 4: // GLOBUS_GATE_KEEPER_END_POINT
+ return GLOBUS_GATE_KEEPER_END_POINT;
+ 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 _Fields optionals[] = {_Fields.GLOBUS_GATE_KEEPER_END_POINT};
+ 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.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
+ tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
+ tmpMap.put(_Fields.GLOBUS_GATE_KEEPER_END_POINT, new org.apache.thrift.meta_data.FieldMetaData("globusGateKeeperEndPoint", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GlobusJobSubmission.class, metaDataMap);
+ }
+
+ public GlobusJobSubmission() {
+ this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public GlobusJobSubmission(
+ String jobSubmissionInterfaceId,
+ SecurityProtocol securityProtocol,
+ ResourceJobManager resourceJobManager)
+ {
+ this();
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ this.securityProtocol = securityProtocol;
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GlobusJobSubmission(GlobusJobSubmission other) {
+ if (other.isSetJobSubmissionInterfaceId()) {
+ this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
+ }
+ if (other.isSetSecurityProtocol()) {
+ this.securityProtocol = other.securityProtocol;
+ }
+ if (other.isSetResourceJobManager()) {
+ this.resourceJobManager = other.resourceJobManager;
+ }
+ if (other.isSetGlobusGateKeeperEndPoint()) {
+ List<String> __this__globusGateKeeperEndPoint = new ArrayList<String>(other.globusGateKeeperEndPoint);
+ this.globusGateKeeperEndPoint = __this__globusGateKeeperEndPoint;
+ }
+ }
+
+ public GlobusJobSubmission deepCopy() {
+ return new GlobusJobSubmission(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.securityProtocol = null;
+ this.resourceJobManager = null;
+ this.globusGateKeeperEndPoint = null;
+ }
+
+ public String getJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId;
+ }
+
+ public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ }
+
+ public void unsetJobSubmissionInterfaceId() {
+ this.jobSubmissionInterfaceId = null;
+ }
+
+ /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId != null;
+ }
+
+ public void setJobSubmissionInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.jobSubmissionInterfaceId = null;
+ }
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public SecurityProtocol getSecurityProtocol() {
+ return this.securityProtocol;
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public void setSecurityProtocol(SecurityProtocol securityProtocol) {
+ this.securityProtocol = securityProtocol;
+ }
+
+ public void unsetSecurityProtocol() {
+ this.securityProtocol = null;
+ }
+
+ /** Returns true if field securityProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetSecurityProtocol() {
+ return this.securityProtocol != null;
+ }
+
+ public void setSecurityProtocolIsSet(boolean value) {
+ if (!value) {
+ this.securityProtocol = null;
+ }
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public ResourceJobManager getResourceJobManager() {
+ return this.resourceJobManager;
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public void setResourceJobManager(ResourceJobManager resourceJobManager) {
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ public void unsetResourceJobManager() {
+ this.resourceJobManager = null;
+ }
+
+ /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
+ public boolean isSetResourceJobManager() {
+ return this.resourceJobManager != null;
+ }
+
+ public void setResourceJobManagerIsSet(boolean value) {
+ if (!value) {
+ this.resourceJobManager = null;
+ }
+ }
+
+ public int getGlobusGateKeeperEndPointSize() {
+ return (this.globusGateKeeperEndPoint == null) ? 0 : this.globusGateKeeperEndPoint.size();
+ }
+
+ public java.util.Iterator<String> getGlobusGateKeeperEndPointIterator() {
+ return (this.globusGateKeeperEndPoint == null) ? null : this.globusGateKeeperEndPoint.iterator();
+ }
+
+ public void addToGlobusGateKeeperEndPoint(String elem) {
+ if (this.globusGateKeeperEndPoint == null) {
+ this.globusGateKeeperEndPoint = new ArrayList<String>();
+ }
+ this.globusGateKeeperEndPoint.add(elem);
+ }
+
+ public List<String> getGlobusGateKeeperEndPoint() {
+ return this.globusGateKeeperEndPoint;
+ }
+
+ public void setGlobusGateKeeperEndPoint(List<String> globusGateKeeperEndPoint) {
+ this.globusGateKeeperEndPoint = globusGateKeeperEndPoint;
+ }
+
+ public void unsetGlobusGateKeeperEndPoint() {
+ this.globusGateKeeperEndPoint = null;
+ }
+
+ /** Returns true if field globusGateKeeperEndPoint is set (has been assigned a value) and false otherwise */
+ public boolean isSetGlobusGateKeeperEndPoint() {
+ return this.globusGateKeeperEndPoint != null;
+ }
+
+ public void setGlobusGateKeeperEndPointIsSet(boolean value) {
+ if (!value) {
+ this.globusGateKeeperEndPoint = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ if (value == null) {
+ unsetJobSubmissionInterfaceId();
+ } else {
+ setJobSubmissionInterfaceId((String)value);
+ }
+ break;
+
+ case SECURITY_PROTOCOL:
+ if (value == null) {
+ unsetSecurityProtocol();
+ } else {
+ setSecurityProtocol((SecurityProtocol)value);
+ }
+ break;
+
+ case RESOURCE_JOB_MANAGER:
+ if (value == null) {
+ unsetResourceJobManager();
+ } else {
+ setResourceJobManager((ResourceJobManager)value);
+ }
+ break;
+
+ case GLOBUS_GATE_KEEPER_END_POINT:
+ if (value == null) {
+ unsetGlobusGateKeeperEndPoint();
+ } else {
+ setGlobusGateKeeperEndPoint((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ return getJobSubmissionInterfaceId();
+
+ case SECURITY_PROTOCOL:
+ return getSecurityProtocol();
+
+ case RESOURCE_JOB_MANAGER:
+ return getResourceJobManager();
+
+ case GLOBUS_GATE_KEEPER_END_POINT:
+ return getGlobusGateKeeperEndPoint();
+
+ }
+ 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 JOB_SUBMISSION_INTERFACE_ID:
+ return isSetJobSubmissionInterfaceId();
+ case SECURITY_PROTOCOL:
+ return isSetSecurityProtocol();
+ case RESOURCE_JOB_MANAGER:
+ return isSetResourceJobManager();
+ case GLOBUS_GATE_KEEPER_END_POINT:
+ return isSetGlobusGateKeeperEndPoint();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GlobusJobSubmission)
+ return this.equals((GlobusJobSubmission)that);
+ return false;
+ }
+
+ public boolean equals(GlobusJobSubmission that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
+ boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
+ if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
+ if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId))
+ return false;
+ if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId))
+ return false;
+ }
+
+ boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
+ boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
+ if (this_present_securityProtocol || that_present_securityProtocol) {
+ if (!(this_present_securityProtocol && that_present_securityProtocol))
+ return false;
+ if (!this.securityProtocol.equals(that.securityProtocol))
+ return false;
+ }
+
+ boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
+ boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
+ if (this_present_resourceJobManager || that_present_resourceJobManager) {
+ if (!(this_present_resourceJobManager && that_present_resourceJobManager))
+ return false;
+ if (!this.resourceJobManager.equals(that.resourceJobManager))
+ return false;
+ }
+
+ boolean this_present_globusGateKeeperEndPoint = true && this.isSetGlobusGateKeeperEndPoint();
+ boolean that_present_globusGateKeeperEndPoint = true && that.isSetGlobusGateKeeperEndPoint();
+ if (this_present_globusGateKeeperEndPoint || that_present_globusGateKeeperEndPoint) {
+ if (!(this_present_globusGateKeeperEndPoint && that_present_globusGateKeeperEndPoint))
+ return false;
+ if (!this.globusGateKeeperEndPoint.equals(that.globusGateKeeperEndPoint))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(GlobusJobSubmission other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobSubmissionInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSecurityProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securityProtocol, other.securityProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResourceJobManager()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGlobusGateKeeperEndPoint()).compareTo(other.isSetGlobusGateKeeperEndPoint());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGlobusGateKeeperEndPoint()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.globusGateKeeperEndPoint, other.globusGateKeeperEndPoint);
+ 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("GlobusJobSubmission(");
+ boolean first = true;
+
+ sb.append("jobSubmissionInterfaceId:");
+ if (this.jobSubmissionInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobSubmissionInterfaceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("securityProtocol:");
+ if (this.securityProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.securityProtocol);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("resourceJobManager:");
+ if (this.resourceJobManager == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.resourceJobManager);
+ }
+ first = false;
+ if (isSetGlobusGateKeeperEndPoint()) {
+ if (!first) sb.append(", ");
+ sb.append("globusGateKeeperEndPoint:");
+ if (this.globusGateKeeperEndPoint == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.globusGateKeeperEndPoint);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetJobSubmissionInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetSecurityProtocol()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
+ }
+
+ if (!isSetResourceJobManager()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
+ }
+
+ // 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 GlobusJobSubmissionStandardSchemeFactory implements SchemeFactory {
+ public GlobusJobSubmissionStandardScheme getScheme() {
+ return new GlobusJobSubmissionStandardScheme();
+ }
+ }
+
+ private static class GlobusJobSubmissionStandardScheme extends StandardScheme<GlobusJobSubmission> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GlobusJobSubmission 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: // JOB_SUBMISSION_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SECURITY_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // RESOURCE_JOB_MANAGER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // GLOBUS_GATE_KEEPER_END_POINT
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+ struct.globusGateKeeperEndPoint = new ArrayList<String>(_list8.size);
+ for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+ {
+ String _elem10;
+ _elem10 = iprot.readString();
+ struct.globusGateKeeperEndPoint.add(_elem10);
+ }
+ iprot.readListEnd();
+ }
+ struct.setGlobusGateKeeperEndPointIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobSubmissionInterfaceId != null) {
+ oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.securityProtocol != null) {
+ oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.resourceJobManager != null) {
+ oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.globusGateKeeperEndPoint != null) {
+ if (struct.isSetGlobusGateKeeperEndPoint()) {
+ oprot.writeFieldBegin(GLOBUS_GATE_KEEPER_END_POINT_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.globusGateKeeperEndPoint.size()));
+ for (String _iter11 : struct.globusGateKeeperEndPoint)
+ {
+ oprot.writeString(_iter11);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GlobusJobSubmissionTupleSchemeFactory implements SchemeFactory {
+ public GlobusJobSubmissionTupleScheme getScheme() {
+ return new GlobusJobSubmissionTupleScheme();
+ }
+ }
+
+ private static class GlobusJobSubmissionTupleScheme extends TupleScheme<GlobusJobSubmission> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetGlobusGateKeeperEndPoint()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetGlobusGateKeeperEndPoint()) {
+ {
+ oprot.writeI32(struct.globusGateKeeperEndPoint.size());
+ for (String _iter12 : struct.globusGateKeeperEndPoint)
+ {
+ oprot.writeString(_iter12);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GlobusJobSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.globusGateKeeperEndPoint = new ArrayList<String>(_list13.size);
+ for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ {
+ String _elem15;
+ _elem15 = iprot.readString();
+ struct.globusGateKeeperEndPoint.add(_elem15);
+ }
+ }
+ struct.setGlobusGateKeeperEndPointIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GridFTPDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GridFTPDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GridFTPDataMovement.java
new file mode 100644
index 0000000..daff523
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GridFTPDataMovement.java
@@ -0,0 +1,660 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Data Movement through GridFTP
+ *
+ * alternativeSCPHostName:
+ * If the login to scp is different than the hostname itself, specify it here
+ *
+ * sshPort:
+ * If a non-defualt port needs to used, specify it.
+ */
+@SuppressWarnings("all") public class GridFTPDataMovement implements org.apache.thrift.TBase<GridFTPDataMovement, GridFTPDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<GridFTPDataMovement> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GridFTPDataMovement");
+
+ private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField GRID_FTPEND_POINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("gridFTPEndPoints", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GridFTPDataMovementStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GridFTPDataMovementTupleSchemeFactory());
+ }
+
+ private String dataMovementInterfaceId; // required
+ private SecurityProtocol securityProtocol; // required
+ private List<String> gridFTPEndPoints; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ DATA_MOVEMENT_INTERFACE_ID((short)1, "dataMovementInterfaceId"),
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ SECURITY_PROTOCOL((short)2, "securityProtocol"),
+ GRID_FTPEND_POINTS((short)3, "gridFTPEndPoints");
+
+ 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: // DATA_MOVEMENT_INTERFACE_ID
+ return DATA_MOVEMENT_INTERFACE_ID;
+ case 2: // SECURITY_PROTOCOL
+ return SECURITY_PROTOCOL;
+ case 3: // GRID_FTPEND_POINTS
+ return GRID_FTPEND_POINTS;
+ 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.DATA_MOVEMENT_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
+ tmpMap.put(_Fields.GRID_FTPEND_POINTS, new org.apache.thrift.meta_data.FieldMetaData("gridFTPEndPoints", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GridFTPDataMovement.class, metaDataMap);
+ }
+
+ public GridFTPDataMovement() {
+ this.dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public GridFTPDataMovement(
+ String dataMovementInterfaceId,
+ SecurityProtocol securityProtocol,
+ List<String> gridFTPEndPoints)
+ {
+ this();
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ this.securityProtocol = securityProtocol;
+ this.gridFTPEndPoints = gridFTPEndPoints;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GridFTPDataMovement(GridFTPDataMovement other) {
+ if (other.isSetDataMovementInterfaceId()) {
+ this.dataMovementInterfaceId = other.dataMovementInterfaceId;
+ }
+ if (other.isSetSecurityProtocol()) {
+ this.securityProtocol = other.securityProtocol;
+ }
+ if (other.isSetGridFTPEndPoints()) {
+ List<String> __this__gridFTPEndPoints = new ArrayList<String>(other.gridFTPEndPoints);
+ this.gridFTPEndPoints = __this__gridFTPEndPoints;
+ }
+ }
+
+ public GridFTPDataMovement deepCopy() {
+ return new GridFTPDataMovement(this);
+ }
+
+ @Override
+ public void clear() {
+ this.dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.securityProtocol = null;
+ this.gridFTPEndPoints = null;
+ }
+
+ public String getDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId;
+ }
+
+ public void setDataMovementInterfaceId(String dataMovementInterfaceId) {
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ }
+
+ public void unsetDataMovementInterfaceId() {
+ this.dataMovementInterfaceId = null;
+ }
+
+ /** Returns true if field dataMovementInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId != null;
+ }
+
+ public void setDataMovementInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.dataMovementInterfaceId = null;
+ }
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public SecurityProtocol getSecurityProtocol() {
+ return this.securityProtocol;
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public void setSecurityProtocol(SecurityProtocol securityProtocol) {
+ this.securityProtocol = securityProtocol;
+ }
+
+ public void unsetSecurityProtocol() {
+ this.securityProtocol = null;
+ }
+
+ /** Returns true if field securityProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetSecurityProtocol() {
+ return this.securityProtocol != null;
+ }
+
+ public void setSecurityProtocolIsSet(boolean value) {
+ if (!value) {
+ this.securityProtocol = null;
+ }
+ }
+
+ public int getGridFTPEndPointsSize() {
+ return (this.gridFTPEndPoints == null) ? 0 : this.gridFTPEndPoints.size();
+ }
+
+ public java.util.Iterator<String> getGridFTPEndPointsIterator() {
+ return (this.gridFTPEndPoints == null) ? null : this.gridFTPEndPoints.iterator();
+ }
+
+ public void addToGridFTPEndPoints(String elem) {
+ if (this.gridFTPEndPoints == null) {
+ this.gridFTPEndPoints = new ArrayList<String>();
+ }
+ this.gridFTPEndPoints.add(elem);
+ }
+
+ public List<String> getGridFTPEndPoints() {
+ return this.gridFTPEndPoints;
+ }
+
+ public void setGridFTPEndPoints(List<String> gridFTPEndPoints) {
+ this.gridFTPEndPoints = gridFTPEndPoints;
+ }
+
+ public void unsetGridFTPEndPoints() {
+ this.gridFTPEndPoints = null;
+ }
+
+ /** Returns true if field gridFTPEndPoints is set (has been assigned a value) and false otherwise */
+ public boolean isSetGridFTPEndPoints() {
+ return this.gridFTPEndPoints != null;
+ }
+
+ public void setGridFTPEndPointsIsSet(boolean value) {
+ if (!value) {
+ this.gridFTPEndPoints = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ if (value == null) {
+ unsetDataMovementInterfaceId();
+ } else {
+ setDataMovementInterfaceId((String)value);
+ }
+ break;
+
+ case SECURITY_PROTOCOL:
+ if (value == null) {
+ unsetSecurityProtocol();
+ } else {
+ setSecurityProtocol((SecurityProtocol)value);
+ }
+ break;
+
+ case GRID_FTPEND_POINTS:
+ if (value == null) {
+ unsetGridFTPEndPoints();
+ } else {
+ setGridFTPEndPoints((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ return getDataMovementInterfaceId();
+
+ case SECURITY_PROTOCOL:
+ return getSecurityProtocol();
+
+ case GRID_FTPEND_POINTS:
+ return getGridFTPEndPoints();
+
+ }
+ 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 DATA_MOVEMENT_INTERFACE_ID:
+ return isSetDataMovementInterfaceId();
+ case SECURITY_PROTOCOL:
+ return isSetSecurityProtocol();
+ case GRID_FTPEND_POINTS:
+ return isSetGridFTPEndPoints();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GridFTPDataMovement)
+ return this.equals((GridFTPDataMovement)that);
+ return false;
+ }
+
+ public boolean equals(GridFTPDataMovement that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_dataMovementInterfaceId = true && this.isSetDataMovementInterfaceId();
+ boolean that_present_dataMovementInterfaceId = true && that.isSetDataMovementInterfaceId();
+ if (this_present_dataMovementInterfaceId || that_present_dataMovementInterfaceId) {
+ if (!(this_present_dataMovementInterfaceId && that_present_dataMovementInterfaceId))
+ return false;
+ if (!this.dataMovementInterfaceId.equals(that.dataMovementInterfaceId))
+ return false;
+ }
+
+ boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
+ boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
+ if (this_present_securityProtocol || that_present_securityProtocol) {
+ if (!(this_present_securityProtocol && that_present_securityProtocol))
+ return false;
+ if (!this.securityProtocol.equals(that.securityProtocol))
+ return false;
+ }
+
+ boolean this_present_gridFTPEndPoints = true && this.isSetGridFTPEndPoints();
+ boolean that_present_gridFTPEndPoints = true && that.isSetGridFTPEndPoints();
+ if (this_present_gridFTPEndPoints || that_present_gridFTPEndPoints) {
+ if (!(this_present_gridFTPEndPoints && that_present_gridFTPEndPoints))
+ return false;
+ if (!this.gridFTPEndPoints.equals(that.gridFTPEndPoints))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(GridFTPDataMovement other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDataMovementInterfaceId()).compareTo(other.isSetDataMovementInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataMovementInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementInterfaceId, other.dataMovementInterfaceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSecurityProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securityProtocol, other.securityProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGridFTPEndPoints()).compareTo(other.isSetGridFTPEndPoints());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGridFTPEndPoints()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gridFTPEndPoints, other.gridFTPEndPoints);
+ 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("GridFTPDataMovement(");
+ boolean first = true;
+
+ sb.append("dataMovementInterfaceId:");
+ if (this.dataMovementInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataMovementInterfaceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("securityProtocol:");
+ if (this.securityProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.securityProtocol);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("gridFTPEndPoints:");
+ if (this.gridFTPEndPoints == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.gridFTPEndPoints);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetDataMovementInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementInterfaceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetSecurityProtocol()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
+ }
+
+ if (!isSetGridFTPEndPoints()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'gridFTPEndPoints' is unset! Struct:" + toString());
+ }
+
+ // 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 GridFTPDataMovementStandardSchemeFactory implements SchemeFactory {
+ public GridFTPDataMovementStandardScheme getScheme() {
+ return new GridFTPDataMovementStandardScheme();
+ }
+ }
+
+ private static class GridFTPDataMovementStandardScheme extends StandardScheme<GridFTPDataMovement> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GridFTPDataMovement 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: // DATA_MOVEMENT_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SECURITY_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // GRID_FTPEND_POINTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.gridFTPEndPoints = new ArrayList<String>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ String _elem2;
+ _elem2 = iprot.readString();
+ struct.gridFTPEndPoints.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setGridFTPEndPointsIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, GridFTPDataMovement struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.dataMovementInterfaceId != null) {
+ oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.dataMovementInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.securityProtocol != null) {
+ oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.gridFTPEndPoints != null) {
+ oprot.writeFieldBegin(GRID_FTPEND_POINTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.gridFTPEndPoints.size()));
+ for (String _iter3 : struct.gridFTPEndPoints)
+ {
+ oprot.writeString(_iter3);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GridFTPDataMovementTupleSchemeFactory implements SchemeFactory {
+ public GridFTPDataMovementTupleScheme getScheme() {
+ return new GridFTPDataMovementTupleScheme();
+ }
+ }
+
+ private static class GridFTPDataMovementTupleScheme extends TupleScheme<GridFTPDataMovement> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GridFTPDataMovement struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.dataMovementInterfaceId);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ {
+ oprot.writeI32(struct.gridFTPEndPoints.size());
+ for (String _iter4 : struct.gridFTPEndPoints)
+ {
+ oprot.writeString(_iter4);
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GridFTPDataMovement struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(true);
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.gridFTPEndPoints = new ArrayList<String>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ String _elem7;
+ _elem7 = iprot.readString();
+ struct.gridFTPEndPoints.add(_elem7);
+ }
+ }
+ struct.setGridFTPEndPointsIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java
new file mode 100644
index 0000000..26f7519
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionInterface.java
@@ -0,0 +1,609 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Job Submission Interfaces
+ *
+ * jobSubmissionInterfaceId: The Job Submission Interface has to be previously registered and referenced here.
+ *
+ * priorityOrder:
+ * For resources with multiple interfaces, the priority order should be selected.
+ * Lower the numerical number, higher the priority
+ *
+ */
+@SuppressWarnings("all") public class JobSubmissionInterface implements org.apache.thrift.TBase<JobSubmissionInterface, JobSubmissionInterface._Fields>, java.io.Serializable, Cloneable, Comparable<JobSubmissionInterface> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobSubmissionInterface");
+
+ private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField PRIORITY_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("priorityOrder", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new JobSubmissionInterfaceStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new JobSubmissionInterfaceTupleSchemeFactory());
+ }
+
+ private String jobSubmissionInterfaceId; // required
+ private JobSubmissionProtocol jobSubmissionProtocol; // required
+ private int priorityOrder; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"),
+ /**
+ *
+ * @see JobSubmissionProtocol
+ */
+ JOB_SUBMISSION_PROTOCOL((short)2, "jobSubmissionProtocol"),
+ PRIORITY_ORDER((short)3, "priorityOrder");
+
+ 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: // JOB_SUBMISSION_INTERFACE_ID
+ return JOB_SUBMISSION_INTERFACE_ID;
+ case 2: // JOB_SUBMISSION_PROTOCOL
+ return JOB_SUBMISSION_PROTOCOL;
+ case 3: // PRIORITY_ORDER
+ return PRIORITY_ORDER;
+ 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 __PRIORITYORDER_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.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.JOB_SUBMISSION_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobSubmissionProtocol.class)));
+ tmpMap.put(_Fields.PRIORITY_ORDER, new org.apache.thrift.meta_data.FieldMetaData("priorityOrder", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobSubmissionInterface.class, metaDataMap);
+ }
+
+ public JobSubmissionInterface() {
+ this.priorityOrder = 0;
+
+ }
+
+ public JobSubmissionInterface(
+ String jobSubmissionInterfaceId,
+ JobSubmissionProtocol jobSubmissionProtocol,
+ int priorityOrder)
+ {
+ this();
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ this.jobSubmissionProtocol = jobSubmissionProtocol;
+ this.priorityOrder = priorityOrder;
+ setPriorityOrderIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public JobSubmissionInterface(JobSubmissionInterface other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobSubmissionInterfaceId()) {
+ this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
+ }
+ if (other.isSetJobSubmissionProtocol()) {
+ this.jobSubmissionProtocol = other.jobSubmissionProtocol;
+ }
+ this.priorityOrder = other.priorityOrder;
+ }
+
+ public JobSubmissionInterface deepCopy() {
+ return new JobSubmissionInterface(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobSubmissionInterfaceId = null;
+ this.jobSubmissionProtocol = null;
+ this.priorityOrder = 0;
+
+ }
+
+ public String getJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId;
+ }
+
+ public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ }
+
+ public void unsetJobSubmissionInterfaceId() {
+ this.jobSubmissionInterfaceId = null;
+ }
+
+ /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId != null;
+ }
+
+ public void setJobSubmissionInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.jobSubmissionInterfaceId = null;
+ }
+ }
+
+ /**
+ *
+ * @see JobSubmissionProtocol
+ */
+ public JobSubmissionProtocol getJobSubmissionProtocol() {
+ return this.jobSubmissionProtocol;
+ }
+
+ /**
+ *
+ * @see JobSubmissionProtocol
+ */
+ public void setJobSubmissionProtocol(JobSubmissionProtocol jobSubmissionProtocol) {
+ this.jobSubmissionProtocol = jobSubmissionProtocol;
+ }
+
+ public void unsetJobSubmissionProtocol() {
+ this.jobSubmissionProtocol = null;
+ }
+
+ /** Returns true if field jobSubmissionProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobSubmissionProtocol() {
+ return this.jobSubmissionProtocol != null;
+ }
+
+ public void setJobSubmissionProtocolIsSet(boolean value) {
+ if (!value) {
+ this.jobSubmissionProtocol = null;
+ }
+ }
+
+ public int getPriorityOrder() {
+ return this.priorityOrder;
+ }
+
+ public void setPriorityOrder(int priorityOrder) {
+ this.priorityOrder = priorityOrder;
+ setPriorityOrderIsSet(true);
+ }
+
+ public void unsetPriorityOrder() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIORITYORDER_ISSET_ID);
+ }
+
+ /** Returns true if field priorityOrder is set (has been assigned a value) and false otherwise */
+ public boolean isSetPriorityOrder() {
+ return EncodingUtils.testBit(__isset_bitfield, __PRIORITYORDER_ISSET_ID);
+ }
+
+ public void setPriorityOrderIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIORITYORDER_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ if (value == null) {
+ unsetJobSubmissionInterfaceId();
+ } else {
+ setJobSubmissionInterfaceId((String)value);
+ }
+ break;
+
+ case JOB_SUBMISSION_PROTOCOL:
+ if (value == null) {
+ unsetJobSubmissionProtocol();
+ } else {
+ setJobSubmissionProtocol((JobSubmissionProtocol)value);
+ }
+ break;
+
+ case PRIORITY_ORDER:
+ if (value == null) {
+ unsetPriorityOrder();
+ } else {
+ setPriorityOrder((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ return getJobSubmissionInterfaceId();
+
+ case JOB_SUBMISSION_PROTOCOL:
+ return getJobSubmissionProtocol();
+
+ case PRIORITY_ORDER:
+ return Integer.valueOf(getPriorityOrder());
+
+ }
+ 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 JOB_SUBMISSION_INTERFACE_ID:
+ return isSetJobSubmissionInterfaceId();
+ case JOB_SUBMISSION_PROTOCOL:
+ return isSetJobSubmissionProtocol();
+ case PRIORITY_ORDER:
+ return isSetPriorityOrder();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof JobSubmissionInterface)
+ return this.equals((JobSubmissionInterface)that);
+ return false;
+ }
+
+ public boolean equals(JobSubmissionInterface that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
+ boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
+ if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
+ if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId))
+ return false;
+ if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId))
+ return false;
+ }
+
+ boolean this_present_jobSubmissionProtocol = true && this.isSetJobSubmissionProtocol();
+ boolean that_present_jobSubmissionProtocol = true && that.isSetJobSubmissionProtocol();
+ if (this_present_jobSubmissionProtocol || that_present_jobSubmissionProtocol) {
+ if (!(this_present_jobSubmissionProtocol && that_present_jobSubmissionProtocol))
+ return false;
+ if (!this.jobSubmissionProtocol.equals(that.jobSubmissionProtocol))
+ return false;
+ }
+
+ boolean this_present_priorityOrder = true;
+ boolean that_present_priorityOrder = true;
+ if (this_present_priorityOrder || that_present_priorityOrder) {
+ if (!(this_present_priorityOrder && that_present_priorityOrder))
+ return false;
+ if (this.priorityOrder != that.priorityOrder)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(JobSubmissionInterface other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobSubmissionInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetJobSubmissionProtocol()).compareTo(other.isSetJobSubmissionProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobSubmissionProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionProtocol, other.jobSubmissionProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPriorityOrder()).compareTo(other.isSetPriorityOrder());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPriorityOrder()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priorityOrder, other.priorityOrder);
+ 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("JobSubmissionInterface(");
+ boolean first = true;
+
+ sb.append("jobSubmissionInterfaceId:");
+ if (this.jobSubmissionInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobSubmissionInterfaceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("jobSubmissionProtocol:");
+ if (this.jobSubmissionProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobSubmissionProtocol);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("priorityOrder:");
+ sb.append(this.priorityOrder);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetJobSubmissionInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetJobSubmissionProtocol()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionProtocol' is unset! Struct:" + toString());
+ }
+
+ if (!isSetPriorityOrder()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'priorityOrder' is unset! Struct:" + toString());
+ }
+
+ // 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 JobSubmissionInterfaceStandardSchemeFactory implements SchemeFactory {
+ public JobSubmissionInterfaceStandardScheme getScheme() {
+ return new JobSubmissionInterfaceStandardScheme();
+ }
+ }
+
+ private static class JobSubmissionInterfaceStandardScheme extends StandardScheme<JobSubmissionInterface> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, JobSubmissionInterface 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: // JOB_SUBMISSION_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // JOB_SUBMISSION_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.jobSubmissionProtocol = JobSubmissionProtocol.findByValue(iprot.readI32());
+ struct.setJobSubmissionProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PRIORITY_ORDER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.priorityOrder = iprot.readI32();
+ struct.setPriorityOrderIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, JobSubmissionInterface struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobSubmissionInterfaceId != null) {
+ oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.jobSubmissionProtocol != null) {
+ oprot.writeFieldBegin(JOB_SUBMISSION_PROTOCOL_FIELD_DESC);
+ oprot.writeI32(struct.jobSubmissionProtocol.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(PRIORITY_ORDER_FIELD_DESC);
+ oprot.writeI32(struct.priorityOrder);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class JobSubmissionInterfaceTupleSchemeFactory implements SchemeFactory {
+ public JobSubmissionInterfaceTupleScheme getScheme() {
+ return new JobSubmissionInterfaceTupleScheme();
+ }
+ }
+
+ private static class JobSubmissionInterfaceTupleScheme extends TupleScheme<JobSubmissionInterface> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, JobSubmissionInterface struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeI32(struct.jobSubmissionProtocol.getValue());
+ oprot.writeI32(struct.priorityOrder);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, JobSubmissionInterface struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ struct.jobSubmissionProtocol = JobSubmissionProtocol.findByValue(iprot.readI32());
+ struct.setJobSubmissionProtocolIsSet(true);
+ struct.priorityOrder = iprot.readI32();
+ struct.setPriorityOrderIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java
new file mode 100644
index 0000000..3cf0d6a
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/JobSubmissionProtocol.java
@@ -0,0 +1,83 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * Enumeration of Airavata supported Job Submission Mechanisms for High Perforamance Computing Clusters.
+ *
+ * SSH:
+ * Execute remote job submission commands using via secure shell protocol.
+ *
+ * GRAM:
+ * Execute remote jobs via Globus GRAM service.
+ *
+ * UNICORE:
+ * Execute remote jobs via Unicore services
+ *
+ */
+@SuppressWarnings("all") public enum JobSubmissionProtocol implements org.apache.thrift.TEnum {
+ LOCAL(0),
+ SSH(1),
+ GSISSH(2),
+ GRAM(3),
+ UNICORE(4);
+
+ private final int value;
+
+ private JobSubmissionProtocol(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static JobSubmissionProtocol findByValue(int value) {
+ switch (value) {
+ case 0:
+ return LOCAL;
+ case 1:
+ return SSH;
+ case 2:
+ return GSISSH;
+ case 3:
+ return GRAM;
+ case 4:
+ return UNICORE;
+ default:
+ return null;
+ }
+ }
+}
[09/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.h
index 15e893f..9dff04c 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/computeResourceModel_types.h
@@ -28,27 +28,17 @@ struct ResourceJobManager {
extern const std::map<int, const char*> _ResourceJobManager_VALUES_TO_NAMES;
-struct JobSubmissionProtocol {
+struct FileSystems {
enum type {
- SSH = 0,
- GSISSH = 1,
- GRAM = 2,
- UNICORE = 3
+ HOME = 0,
+ WORK = 1,
+ LOCALTMP = 2,
+ SCRATCH = 3,
+ ARCHIVE = 4
};
};
-extern const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES;
-
-struct DataMovementProtocol {
- enum type {
- SCP = 0,
- SFTP = 1,
- GridFTP = 2,
- UNICORE_STORAGE_SERVICE = 3
- };
-};
-
-extern const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES;
+extern const std::map<int, const char*> _FileSystems_VALUES_TO_NAMES;
struct SecurityProtocol {
enum type {
@@ -62,36 +52,164 @@ struct SecurityProtocol {
extern const std::map<int, const char*> _SecurityProtocol_VALUES_TO_NAMES;
+struct JobSubmissionProtocol {
+ enum type {
+ LOCAL = 0,
+ SSH = 1,
+ GSISSH = 2,
+ GRAM = 3,
+ UNICORE = 4
+ };
+};
+
+extern const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES;
+
+struct DataMovementProtocol {
+ enum type {
+ LOCAL = 0,
+ SCP = 1,
+ SFTP = 2,
+ GridFTP = 3,
+ UNICORE_STORAGE_SERVICE = 4
+ };
+};
+
+extern const std::map<int, const char*> _DataMovementProtocol_VALUES_TO_NAMES;
+
+typedef struct _BatchQueue__isset {
+ _BatchQueue__isset() : queueDescription(false), maxRunTime(false), maxNodes(false), maxProcessors(false), maxJobsInQueue(false) {}
+ bool queueDescription;
+ bool maxRunTime;
+ bool maxNodes;
+ bool maxProcessors;
+ bool maxJobsInQueue;
+} _BatchQueue__isset;
+
+class BatchQueue {
+ public:
+
+ static const char* ascii_fingerprint; // = "DA59FF8EE453E1822971C1CE1471EEA1";
+ static const uint8_t binary_fingerprint[16]; // = {0xDA,0x59,0xFF,0x8E,0xE4,0x53,0xE1,0x82,0x29,0x71,0xC1,0xCE,0x14,0x71,0xEE,0xA1};
+
+ BatchQueue() : queueName(), queueDescription(), maxRunTime(0), maxNodes(0), maxProcessors(0), maxJobsInQueue(0) {
+ }
+
+ virtual ~BatchQueue() throw() {}
+
+ std::string queueName;
+ std::string queueDescription;
+ int32_t maxRunTime;
+ int32_t maxNodes;
+ int32_t maxProcessors;
+ int32_t maxJobsInQueue;
+
+ _BatchQueue__isset __isset;
+
+ void __set_queueName(const std::string& val) {
+ queueName = val;
+ }
+
+ void __set_queueDescription(const std::string& val) {
+ queueDescription = val;
+ __isset.queueDescription = true;
+ }
+
+ void __set_maxRunTime(const int32_t val) {
+ maxRunTime = val;
+ __isset.maxRunTime = true;
+ }
+
+ void __set_maxNodes(const int32_t val) {
+ maxNodes = val;
+ __isset.maxNodes = true;
+ }
+
+ void __set_maxProcessors(const int32_t val) {
+ maxProcessors = val;
+ __isset.maxProcessors = true;
+ }
+
+ void __set_maxJobsInQueue(const int32_t val) {
+ maxJobsInQueue = val;
+ __isset.maxJobsInQueue = true;
+ }
+
+ bool operator == (const BatchQueue & rhs) const
+ {
+ if (!(queueName == rhs.queueName))
+ return false;
+ if (__isset.queueDescription != rhs.__isset.queueDescription)
+ return false;
+ else if (__isset.queueDescription && !(queueDescription == rhs.queueDescription))
+ return false;
+ if (__isset.maxRunTime != rhs.__isset.maxRunTime)
+ return false;
+ else if (__isset.maxRunTime && !(maxRunTime == rhs.maxRunTime))
+ return false;
+ if (__isset.maxNodes != rhs.__isset.maxNodes)
+ return false;
+ else if (__isset.maxNodes && !(maxNodes == rhs.maxNodes))
+ return false;
+ if (__isset.maxProcessors != rhs.__isset.maxProcessors)
+ return false;
+ else if (__isset.maxProcessors && !(maxProcessors == rhs.maxProcessors))
+ return false;
+ if (__isset.maxJobsInQueue != rhs.__isset.maxJobsInQueue)
+ return false;
+ else if (__isset.maxJobsInQueue && !(maxJobsInQueue == rhs.maxJobsInQueue))
+ return false;
+ return true;
+ }
+ bool operator != (const BatchQueue &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const BatchQueue & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(BatchQueue &a, BatchQueue &b);
+
typedef struct _SCPDataMovement__isset {
- _SCPDataMovement__isset() : sshPort(true) {}
+ _SCPDataMovement__isset() : alternativeSCPHostName(false), sshPort(true) {}
+ bool alternativeSCPHostName;
bool sshPort;
} _SCPDataMovement__isset;
class SCPDataMovement {
public:
- static const char* ascii_fingerprint; // = "FEB6B2CD28861B4EED855CACA1FEF2CB";
- static const uint8_t binary_fingerprint[16]; // = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
+ static const char* ascii_fingerprint; // = "63CAE6EE336A7DBD91CCCD6E22628F4A";
+ static const uint8_t binary_fingerprint[16]; // = {0x63,0xCA,0xE6,0xEE,0x33,0x6A,0x7D,0xBD,0x91,0xCC,0xCD,0x6E,0x22,0x62,0x8F,0x4A};
- SCPDataMovement() : dataMovementDataID("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), sshPort(22) {
+ SCPDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSCPHostName(), sshPort(22) {
}
virtual ~SCPDataMovement() throw() {}
- std::string dataMovementDataID;
+ std::string dataMovementInterfaceId;
SecurityProtocol::type securityProtocol;
+ std::string alternativeSCPHostName;
int32_t sshPort;
_SCPDataMovement__isset __isset;
- void __set_dataMovementDataID(const std::string& val) {
- dataMovementDataID = val;
+ void __set_dataMovementInterfaceId(const std::string& val) {
+ dataMovementInterfaceId = val;
}
void __set_securityProtocol(const SecurityProtocol::type val) {
securityProtocol = val;
}
+ void __set_alternativeSCPHostName(const std::string& val) {
+ alternativeSCPHostName = val;
+ __isset.alternativeSCPHostName = true;
+ }
+
void __set_sshPort(const int32_t val) {
sshPort = val;
__isset.sshPort = true;
@@ -99,10 +217,14 @@ class SCPDataMovement {
bool operator == (const SCPDataMovement & rhs) const
{
- if (!(dataMovementDataID == rhs.dataMovementDataID))
+ if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
return false;
if (!(securityProtocol == rhs.securityProtocol))
return false;
+ if (__isset.alternativeSCPHostName != rhs.__isset.alternativeSCPHostName)
+ return false;
+ else if (__isset.alternativeSCPHostName && !(alternativeSCPHostName == rhs.alternativeSCPHostName))
+ return false;
if (__isset.sshPort != rhs.__isset.sshPort)
return false;
else if (__isset.sshPort && !(sshPort == rhs.sshPort))
@@ -129,34 +251,34 @@ class GridFTPDataMovement {
static const char* ascii_fingerprint; // = "790EE8B1D56A3B9B76C41DD063726E75";
static const uint8_t binary_fingerprint[16]; // = {0x79,0x0E,0xE8,0xB1,0xD5,0x6A,0x3B,0x9B,0x76,0xC4,0x1D,0xD0,0x63,0x72,0x6E,0x75};
- GridFTPDataMovement() : dataMovementDataID("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0) {
+ GridFTPDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0) {
}
virtual ~GridFTPDataMovement() throw() {}
- std::string dataMovementDataID;
+ std::string dataMovementInterfaceId;
SecurityProtocol::type securityProtocol;
- std::vector<std::string> gridFTPEndPoint;
+ std::vector<std::string> gridFTPEndPoints;
- void __set_dataMovementDataID(const std::string& val) {
- dataMovementDataID = val;
+ void __set_dataMovementInterfaceId(const std::string& val) {
+ dataMovementInterfaceId = val;
}
void __set_securityProtocol(const SecurityProtocol::type val) {
securityProtocol = val;
}
- void __set_gridFTPEndPoint(const std::vector<std::string> & val) {
- gridFTPEndPoint = val;
+ void __set_gridFTPEndPoints(const std::vector<std::string> & val) {
+ gridFTPEndPoints = val;
}
bool operator == (const GridFTPDataMovement & rhs) const
{
- if (!(dataMovementDataID == rhs.dataMovementDataID))
+ if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
return false;
if (!(securityProtocol == rhs.securityProtocol))
return false;
- if (!(gridFTPEndPoint == rhs.gridFTPEndPoint))
+ if (!(gridFTPEndPoints == rhs.gridFTPEndPoints))
return false;
return true;
}
@@ -173,51 +295,177 @@ class GridFTPDataMovement {
void swap(GridFTPDataMovement &a, GridFTPDataMovement &b);
+typedef struct _LOCALSubmission__isset {
+ _LOCALSubmission__isset() : monitoringMechanism(false) {}
+ bool monitoringMechanism;
+} _LOCALSubmission__isset;
+
+class LOCALSubmission {
+ public:
+
+ static const char* ascii_fingerprint; // = "C9C13E23D75AC7D7DB268099D53EE995";
+ static const uint8_t binary_fingerprint[16]; // = {0xC9,0xC1,0x3E,0x23,0xD7,0x5A,0xC7,0xD7,0xDB,0x26,0x80,0x99,0xD5,0x3E,0xE9,0x95};
+
+ LOCALSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), resourceJobManager((ResourceJobManager::type)0), monitoringMechanism() {
+ }
+
+ virtual ~LOCALSubmission() throw() {}
+
+ std::string jobSubmissionInterfaceId;
+ ResourceJobManager::type resourceJobManager;
+ std::string monitoringMechanism;
+
+ _LOCALSubmission__isset __isset;
+
+ void __set_jobSubmissionInterfaceId(const std::string& val) {
+ jobSubmissionInterfaceId = val;
+ }
+
+ void __set_resourceJobManager(const ResourceJobManager::type val) {
+ resourceJobManager = val;
+ }
+
+ void __set_monitoringMechanism(const std::string& val) {
+ monitoringMechanism = val;
+ __isset.monitoringMechanism = true;
+ }
+
+ bool operator == (const LOCALSubmission & rhs) const
+ {
+ if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
+ return false;
+ if (!(resourceJobManager == rhs.resourceJobManager))
+ return false;
+ if (__isset.monitoringMechanism != rhs.__isset.monitoringMechanism)
+ return false;
+ else if (__isset.monitoringMechanism && !(monitoringMechanism == rhs.monitoringMechanism))
+ return false;
+ return true;
+ }
+ bool operator != (const LOCALSubmission &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const LOCALSubmission & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(LOCALSubmission &a, LOCALSubmission &b);
+
+
+class LOCALDataMovement {
+ public:
+
+ static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1";
+ static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1};
+
+ LOCALDataMovement() : dataMovementInterfaceId("DO_NOT_SET_AT_CLIENTS") {
+ }
+
+ virtual ~LOCALDataMovement() throw() {}
+
+ std::string dataMovementInterfaceId;
+
+ void __set_dataMovementInterfaceId(const std::string& val) {
+ dataMovementInterfaceId = val;
+ }
+
+ bool operator == (const LOCALDataMovement & rhs) const
+ {
+ if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
+ return false;
+ return true;
+ }
+ bool operator != (const LOCALDataMovement &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const LOCALDataMovement & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(LOCALDataMovement &a, LOCALDataMovement &b);
+
typedef struct _SSHJobSubmission__isset {
- _SSHJobSubmission__isset() : sshPort(true) {}
+ _SSHJobSubmission__isset() : alternativeSSHHostName(false), sshPort(true), monitoringMechanism(false) {}
+ bool alternativeSSHHostName;
bool sshPort;
+ bool monitoringMechanism;
} _SSHJobSubmission__isset;
class SSHJobSubmission {
public:
- static const char* ascii_fingerprint; // = "FEB6B2CD28861B4EED855CACA1FEF2CB";
- static const uint8_t binary_fingerprint[16]; // = {0xFE,0xB6,0xB2,0xCD,0x28,0x86,0x1B,0x4E,0xED,0x85,0x5C,0xAC,0xA1,0xFE,0xF2,0xCB};
+ static const char* ascii_fingerprint; // = "7AD7C2665ACC6606EC984DACFC74881E";
+ static const uint8_t binary_fingerprint[16]; // = {0x7A,0xD7,0xC2,0x66,0x5A,0xCC,0x66,0x06,0xEC,0x98,0x4D,0xAC,0xFC,0x74,0x88,0x1E};
- SSHJobSubmission() : jobSubmissionDataID("DO_NOT_SET_AT_CLIENTS"), resourceJobManager((ResourceJobManager::type)0), sshPort(22) {
+ SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), resourceJobManager((ResourceJobManager::type)0), alternativeSSHHostName(), sshPort(22), monitoringMechanism() {
}
virtual ~SSHJobSubmission() throw() {}
- std::string jobSubmissionDataID;
+ std::string jobSubmissionInterfaceId;
+ SecurityProtocol::type securityProtocol;
ResourceJobManager::type resourceJobManager;
+ std::string alternativeSSHHostName;
int32_t sshPort;
+ std::string monitoringMechanism;
_SSHJobSubmission__isset __isset;
- void __set_jobSubmissionDataID(const std::string& val) {
- jobSubmissionDataID = val;
+ void __set_jobSubmissionInterfaceId(const std::string& val) {
+ jobSubmissionInterfaceId = val;
+ }
+
+ void __set_securityProtocol(const SecurityProtocol::type val) {
+ securityProtocol = val;
}
void __set_resourceJobManager(const ResourceJobManager::type val) {
resourceJobManager = val;
}
+ void __set_alternativeSSHHostName(const std::string& val) {
+ alternativeSSHHostName = val;
+ __isset.alternativeSSHHostName = true;
+ }
+
void __set_sshPort(const int32_t val) {
sshPort = val;
__isset.sshPort = true;
}
+ void __set_monitoringMechanism(const std::string& val) {
+ monitoringMechanism = val;
+ __isset.monitoringMechanism = true;
+ }
+
bool operator == (const SSHJobSubmission & rhs) const
{
- if (!(jobSubmissionDataID == rhs.jobSubmissionDataID))
+ if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
+ return false;
+ if (!(securityProtocol == rhs.securityProtocol))
return false;
if (!(resourceJobManager == rhs.resourceJobManager))
return false;
+ if (__isset.alternativeSSHHostName != rhs.__isset.alternativeSSHHostName)
+ return false;
+ else if (__isset.alternativeSSHHostName && !(alternativeSSHHostName == rhs.alternativeSSHHostName))
+ return false;
if (__isset.sshPort != rhs.__isset.sshPort)
return false;
else if (__isset.sshPort && !(sshPort == rhs.sshPort))
return false;
+ if (__isset.monitoringMechanism != rhs.__isset.monitoringMechanism)
+ return false;
+ else if (__isset.monitoringMechanism && !(monitoringMechanism == rhs.monitoringMechanism))
+ return false;
return true;
}
bool operator != (const SSHJobSubmission &rhs) const {
@@ -244,20 +492,20 @@ class GlobusJobSubmission {
static const char* ascii_fingerprint; // = "DF4253F78D7B543C16FA461660D38A03";
static const uint8_t binary_fingerprint[16]; // = {0xDF,0x42,0x53,0xF7,0x8D,0x7B,0x54,0x3C,0x16,0xFA,0x46,0x16,0x60,0xD3,0x8A,0x03};
- GlobusJobSubmission() : jobSubmissionDataID("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), resourceJobManager((ResourceJobManager::type)0) {
+ GlobusJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), resourceJobManager((ResourceJobManager::type)0) {
}
virtual ~GlobusJobSubmission() throw() {}
- std::string jobSubmissionDataID;
+ std::string jobSubmissionInterfaceId;
SecurityProtocol::type securityProtocol;
ResourceJobManager::type resourceJobManager;
std::vector<std::string> globusGateKeeperEndPoint;
_GlobusJobSubmission__isset __isset;
- void __set_jobSubmissionDataID(const std::string& val) {
- jobSubmissionDataID = val;
+ void __set_jobSubmissionInterfaceId(const std::string& val) {
+ jobSubmissionInterfaceId = val;
}
void __set_securityProtocol(const SecurityProtocol::type val) {
@@ -275,7 +523,7 @@ class GlobusJobSubmission {
bool operator == (const GlobusJobSubmission & rhs) const
{
- if (!(jobSubmissionDataID == rhs.jobSubmissionDataID))
+ if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
return false;
if (!(securityProtocol == rhs.securityProtocol))
return false;
@@ -300,149 +548,142 @@ class GlobusJobSubmission {
void swap(GlobusJobSubmission &a, GlobusJobSubmission &b);
-typedef struct _GSISSHJobSubmission__isset {
- _GSISSHJobSubmission__isset() : sshPort(true), exports(false), preJobCommands(false), postJobCommands(false), installedPath(false), monitorMode(false) {}
- bool sshPort;
- bool exports;
- bool preJobCommands;
- bool postJobCommands;
- bool installedPath;
- bool monitorMode;
-} _GSISSHJobSubmission__isset;
-
-class GSISSHJobSubmission {
+
+class JobSubmissionInterface {
public:
- static const char* ascii_fingerprint; // = "6969A7F145C4403B2F9081A498E933FD";
- static const uint8_t binary_fingerprint[16]; // = {0x69,0x69,0xA7,0xF1,0x45,0xC4,0x40,0x3B,0x2F,0x90,0x81,0xA4,0x98,0xE9,0x33,0xFD};
+ static const char* ascii_fingerprint; // = "A0A4DD7B8243FB842E64EAC6E5DA6C7B";
+ static const uint8_t binary_fingerprint[16]; // = {0xA0,0xA4,0xDD,0x7B,0x82,0x43,0xFB,0x84,0x2E,0x64,0xEA,0xC6,0xE5,0xDA,0x6C,0x7B};
- GSISSHJobSubmission() : jobSubmissionDataID("DO_NOT_SET_AT_CLIENTS"), resourceJobManager((ResourceJobManager::type)0), sshPort(22), installedPath(), monitorMode() {
+ JobSubmissionInterface() : jobSubmissionInterfaceId(), jobSubmissionProtocol((JobSubmissionProtocol::type)0), priorityOrder(0) {
}
- virtual ~GSISSHJobSubmission() throw() {}
-
- std::string jobSubmissionDataID;
- ResourceJobManager::type resourceJobManager;
- int32_t sshPort;
- std::set<std::string> exports;
- std::vector<std::string> preJobCommands;
- std::vector<std::string> postJobCommands;
- std::string installedPath;
- std::string monitorMode;
+ virtual ~JobSubmissionInterface() throw() {}
- _GSISSHJobSubmission__isset __isset;
+ std::string jobSubmissionInterfaceId;
+ JobSubmissionProtocol::type jobSubmissionProtocol;
+ int32_t priorityOrder;
- void __set_jobSubmissionDataID(const std::string& val) {
- jobSubmissionDataID = val;
+ void __set_jobSubmissionInterfaceId(const std::string& val) {
+ jobSubmissionInterfaceId = val;
}
- void __set_resourceJobManager(const ResourceJobManager::type val) {
- resourceJobManager = val;
+ void __set_jobSubmissionProtocol(const JobSubmissionProtocol::type val) {
+ jobSubmissionProtocol = val;
}
- void __set_sshPort(const int32_t val) {
- sshPort = val;
- __isset.sshPort = true;
+ void __set_priorityOrder(const int32_t val) {
+ priorityOrder = val;
}
- void __set_exports(const std::set<std::string> & val) {
- exports = val;
- __isset.exports = true;
+ bool operator == (const JobSubmissionInterface & rhs) const
+ {
+ if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
+ return false;
+ if (!(jobSubmissionProtocol == rhs.jobSubmissionProtocol))
+ return false;
+ if (!(priorityOrder == rhs.priorityOrder))
+ return false;
+ return true;
+ }
+ bool operator != (const JobSubmissionInterface &rhs) const {
+ return !(*this == rhs);
}
- void __set_preJobCommands(const std::vector<std::string> & val) {
- preJobCommands = val;
- __isset.preJobCommands = true;
+ bool operator < (const JobSubmissionInterface & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(JobSubmissionInterface &a, JobSubmissionInterface &b);
+
+
+class DataMovementInterface {
+ public:
+
+ static const char* ascii_fingerprint; // = "A0A4DD7B8243FB842E64EAC6E5DA6C7B";
+ static const uint8_t binary_fingerprint[16]; // = {0xA0,0xA4,0xDD,0x7B,0x82,0x43,0xFB,0x84,0x2E,0x64,0xEA,0xC6,0xE5,0xDA,0x6C,0x7B};
+
+ DataMovementInterface() : dataMovementInterfaceId(), dataMovementProtocol((DataMovementProtocol::type)0), priorityOrder(0) {
}
- void __set_postJobCommands(const std::vector<std::string> & val) {
- postJobCommands = val;
- __isset.postJobCommands = true;
+ virtual ~DataMovementInterface() throw() {}
+
+ std::string dataMovementInterfaceId;
+ DataMovementProtocol::type dataMovementProtocol;
+ int32_t priorityOrder;
+
+ void __set_dataMovementInterfaceId(const std::string& val) {
+ dataMovementInterfaceId = val;
}
- void __set_installedPath(const std::string& val) {
- installedPath = val;
- __isset.installedPath = true;
+ void __set_dataMovementProtocol(const DataMovementProtocol::type val) {
+ dataMovementProtocol = val;
}
- void __set_monitorMode(const std::string& val) {
- monitorMode = val;
- __isset.monitorMode = true;
+ void __set_priorityOrder(const int32_t val) {
+ priorityOrder = val;
}
- bool operator == (const GSISSHJobSubmission & rhs) const
+ bool operator == (const DataMovementInterface & rhs) const
{
- if (!(jobSubmissionDataID == rhs.jobSubmissionDataID))
+ if (!(dataMovementInterfaceId == rhs.dataMovementInterfaceId))
return false;
- if (!(resourceJobManager == rhs.resourceJobManager))
+ if (!(dataMovementProtocol == rhs.dataMovementProtocol))
return false;
- if (__isset.sshPort != rhs.__isset.sshPort)
- return false;
- else if (__isset.sshPort && !(sshPort == rhs.sshPort))
- return false;
- if (__isset.exports != rhs.__isset.exports)
- return false;
- else if (__isset.exports && !(exports == rhs.exports))
- return false;
- if (__isset.preJobCommands != rhs.__isset.preJobCommands)
- return false;
- else if (__isset.preJobCommands && !(preJobCommands == rhs.preJobCommands))
- return false;
- if (__isset.postJobCommands != rhs.__isset.postJobCommands)
- return false;
- else if (__isset.postJobCommands && !(postJobCommands == rhs.postJobCommands))
- return false;
- if (__isset.installedPath != rhs.__isset.installedPath)
- return false;
- else if (__isset.installedPath && !(installedPath == rhs.installedPath))
- return false;
- if (__isset.monitorMode != rhs.__isset.monitorMode)
- return false;
- else if (__isset.monitorMode && !(monitorMode == rhs.monitorMode))
+ if (!(priorityOrder == rhs.priorityOrder))
return false;
return true;
}
- bool operator != (const GSISSHJobSubmission &rhs) const {
+ bool operator != (const DataMovementInterface &rhs) const {
return !(*this == rhs);
}
- bool operator < (const GSISSHJobSubmission & ) const;
+ bool operator < (const DataMovementInterface & ) const;
uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
};
-void swap(GSISSHJobSubmission &a, GSISSHJobSubmission &b);
+void swap(DataMovementInterface &a, DataMovementInterface &b);
typedef struct _ComputeResourceDescription__isset {
- _ComputeResourceDescription__isset() : hostAliases(false), ipAddresses(false), resourceDescription(false), preferredJobSubmissionProtocol(false) {}
+ _ComputeResourceDescription__isset() : hostAliases(false), ipAddresses(false), computeResourceDescription(false), resourceJobManager(false), batchQueues(false), fileSystems(false), jobSubmissionInterfaces(false), dataMovemenetInterfaces(false) {}
bool hostAliases;
bool ipAddresses;
- bool resourceDescription;
- bool preferredJobSubmissionProtocol;
+ bool computeResourceDescription;
+ bool resourceJobManager;
+ bool batchQueues;
+ bool fileSystems;
+ bool jobSubmissionInterfaces;
+ bool dataMovemenetInterfaces;
} _ComputeResourceDescription__isset;
class ComputeResourceDescription {
public:
- static const char* ascii_fingerprint; // = "A31E9EF4FF0C9ADE9027FD5C59A96555";
- static const uint8_t binary_fingerprint[16]; // = {0xA3,0x1E,0x9E,0xF4,0xFF,0x0C,0x9A,0xDE,0x90,0x27,0xFD,0x5C,0x59,0xA9,0x65,0x55};
+ static const char* ascii_fingerprint; // = "ADC1452A60F79D933D0EE4B9893AD048";
+ static const uint8_t binary_fingerprint[16]; // = {0xAD,0xC1,0x45,0x2A,0x60,0xF7,0x9D,0x93,0x3D,0x0E,0xE4,0xB9,0x89,0x3A,0xD0,0x48};
- ComputeResourceDescription() : isEmpty(false), resourceId("DO_NOT_SET_AT_CLIENTS"), hostName(), resourceDescription(), preferredJobSubmissionProtocol() {
+ ComputeResourceDescription() : isEmpty(false), computeResourceId("DO_NOT_SET_AT_CLIENTS"), hostName(), computeResourceDescription(), resourceJobManager((ResourceJobManager::type)0) {
}
virtual ~ComputeResourceDescription() throw() {}
bool isEmpty;
- std::string resourceId;
+ std::string computeResourceId;
std::string hostName;
std::set<std::string> hostAliases;
std::set<std::string> ipAddresses;
- std::string resourceDescription;
- std::string preferredJobSubmissionProtocol;
- std::map<std::string, JobSubmissionProtocol::type> jobSubmissionProtocols;
- std::map<std::string, DataMovementProtocol::type> dataMovementProtocols;
+ std::string computeResourceDescription;
+ ResourceJobManager::type resourceJobManager;
+ std::vector<BatchQueue> batchQueues;
+ std::map<FileSystems::type, std::string> fileSystems;
+ std::vector<JobSubmissionInterface> jobSubmissionInterfaces;
+ std::vector<DataMovementInterface> dataMovemenetInterfaces;
_ComputeResourceDescription__isset __isset;
@@ -450,8 +691,8 @@ class ComputeResourceDescription {
isEmpty = val;
}
- void __set_resourceId(const std::string& val) {
- resourceId = val;
+ void __set_computeResourceId(const std::string& val) {
+ computeResourceId = val;
}
void __set_hostName(const std::string& val) {
@@ -468,29 +709,41 @@ class ComputeResourceDescription {
__isset.ipAddresses = true;
}
- void __set_resourceDescription(const std::string& val) {
- resourceDescription = val;
- __isset.resourceDescription = true;
+ void __set_computeResourceDescription(const std::string& val) {
+ computeResourceDescription = val;
+ __isset.computeResourceDescription = true;
}
- void __set_preferredJobSubmissionProtocol(const std::string& val) {
- preferredJobSubmissionProtocol = val;
- __isset.preferredJobSubmissionProtocol = true;
+ void __set_resourceJobManager(const ResourceJobManager::type val) {
+ resourceJobManager = val;
+ __isset.resourceJobManager = true;
+ }
+
+ void __set_batchQueues(const std::vector<BatchQueue> & val) {
+ batchQueues = val;
+ __isset.batchQueues = true;
+ }
+
+ void __set_fileSystems(const std::map<FileSystems::type, std::string> & val) {
+ fileSystems = val;
+ __isset.fileSystems = true;
}
- void __set_jobSubmissionProtocols(const std::map<std::string, JobSubmissionProtocol::type> & val) {
- jobSubmissionProtocols = val;
+ void __set_jobSubmissionInterfaces(const std::vector<JobSubmissionInterface> & val) {
+ jobSubmissionInterfaces = val;
+ __isset.jobSubmissionInterfaces = true;
}
- void __set_dataMovementProtocols(const std::map<std::string, DataMovementProtocol::type> & val) {
- dataMovementProtocols = val;
+ void __set_dataMovemenetInterfaces(const std::vector<DataMovementInterface> & val) {
+ dataMovemenetInterfaces = val;
+ __isset.dataMovemenetInterfaces = true;
}
bool operator == (const ComputeResourceDescription & rhs) const
{
if (!(isEmpty == rhs.isEmpty))
return false;
- if (!(resourceId == rhs.resourceId))
+ if (!(computeResourceId == rhs.computeResourceId))
return false;
if (!(hostName == rhs.hostName))
return false;
@@ -502,17 +755,29 @@ class ComputeResourceDescription {
return false;
else if (__isset.ipAddresses && !(ipAddresses == rhs.ipAddresses))
return false;
- if (__isset.resourceDescription != rhs.__isset.resourceDescription)
+ if (__isset.computeResourceDescription != rhs.__isset.computeResourceDescription)
+ return false;
+ else if (__isset.computeResourceDescription && !(computeResourceDescription == rhs.computeResourceDescription))
+ return false;
+ if (__isset.resourceJobManager != rhs.__isset.resourceJobManager)
+ return false;
+ else if (__isset.resourceJobManager && !(resourceJobManager == rhs.resourceJobManager))
+ return false;
+ if (__isset.batchQueues != rhs.__isset.batchQueues)
+ return false;
+ else if (__isset.batchQueues && !(batchQueues == rhs.batchQueues))
+ return false;
+ if (__isset.fileSystems != rhs.__isset.fileSystems)
return false;
- else if (__isset.resourceDescription && !(resourceDescription == rhs.resourceDescription))
+ else if (__isset.fileSystems && !(fileSystems == rhs.fileSystems))
return false;
- if (__isset.preferredJobSubmissionProtocol != rhs.__isset.preferredJobSubmissionProtocol)
+ if (__isset.jobSubmissionInterfaces != rhs.__isset.jobSubmissionInterfaces)
return false;
- else if (__isset.preferredJobSubmissionProtocol && !(preferredJobSubmissionProtocol == rhs.preferredJobSubmissionProtocol))
+ else if (__isset.jobSubmissionInterfaces && !(jobSubmissionInterfaces == rhs.jobSubmissionInterfaces))
return false;
- if (!(jobSubmissionProtocols == rhs.jobSubmissionProtocols))
+ if (__isset.dataMovemenetInterfaces != rhs.__isset.dataMovemenetInterfaces)
return false;
- if (!(dataMovementProtocols == rhs.dataMovementProtocols))
+ else if (__isset.dataMovemenetInterfaces && !(dataMovemenetInterfaces == rhs.dataMovemenetInterfaces))
return false;
return true;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.cpp
index 62264d4..896a770 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.cpp
@@ -10,8 +10,159 @@
-const char* GatewayProfile::ascii_fingerprint = "FED0FBEAA0C90D1589E8B650561B7675";
-const uint8_t GatewayProfile::binary_fingerprint[16] = {0xFE,0xD0,0xFB,0xEA,0xA0,0xC9,0x0D,0x15,0x89,0xE8,0xB6,0x50,0x56,0x1B,0x76,0x75};
+const char* ComputeResourcePreference::ascii_fingerprint = "9C98338B7E052CD4DEECB22F243D6DAE";
+const uint8_t ComputeResourcePreference::binary_fingerprint[16] = {0x9C,0x98,0x33,0x8B,0x7E,0x05,0x2C,0xD4,0xDE,0xEC,0xB2,0x2F,0x24,0x3D,0x6D,0xAE};
+
+uint32_t ComputeResourcePreference::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+ bool isset_computeResourceId = false;
+ bool isset_overridebyAiravata = false;
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->computeResourceId);
+ isset_computeResourceId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->overridebyAiravata);
+ isset_overridebyAiravata = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->preferredJobSubmissionProtocol);
+ this->__isset.preferredJobSubmissionProtocol = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->preferredDataMovementProtocol);
+ this->__isset.preferredDataMovementProtocol = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->preferredBatchQueue);
+ this->__isset.preferredBatchQueue = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->scratchLocation);
+ this->__isset.scratchLocation = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->allocationProjectNumber);
+ this->__isset.allocationProjectNumber = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_computeResourceId)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_overridebyAiravata)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t ComputeResourcePreference::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ComputeResourcePreference");
+
+ xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->computeResourceId);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("overridebyAiravata", ::apache::thrift::protocol::T_BOOL, 2);
+ xfer += oprot->writeBool(this->overridebyAiravata);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.preferredJobSubmissionProtocol) {
+ xfer += oprot->writeFieldBegin("preferredJobSubmissionProtocol", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->preferredJobSubmissionProtocol);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.preferredDataMovementProtocol) {
+ xfer += oprot->writeFieldBegin("preferredDataMovementProtocol", ::apache::thrift::protocol::T_STRING, 4);
+ xfer += oprot->writeString(this->preferredDataMovementProtocol);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.preferredBatchQueue) {
+ xfer += oprot->writeFieldBegin("preferredBatchQueue", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeString(this->preferredBatchQueue);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.scratchLocation) {
+ xfer += oprot->writeFieldBegin("scratchLocation", ::apache::thrift::protocol::T_STRING, 6);
+ xfer += oprot->writeString(this->scratchLocation);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.allocationProjectNumber) {
+ xfer += oprot->writeFieldBegin("allocationProjectNumber", ::apache::thrift::protocol::T_STRING, 7);
+ xfer += oprot->writeString(this->allocationProjectNumber);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(ComputeResourcePreference &a, ComputeResourcePreference &b) {
+ using ::std::swap;
+ swap(a.computeResourceId, b.computeResourceId);
+ swap(a.overridebyAiravata, b.overridebyAiravata);
+ swap(a.preferredJobSubmissionProtocol, b.preferredJobSubmissionProtocol);
+ swap(a.preferredDataMovementProtocol, b.preferredDataMovementProtocol);
+ swap(a.preferredBatchQueue, b.preferredBatchQueue);
+ swap(a.scratchLocation, b.scratchLocation);
+ swap(a.allocationProjectNumber, b.allocationProjectNumber);
+ swap(a.__isset, b.__isset);
+}
+
+const char* GatewayProfile::ascii_fingerprint = "D6477904C48AAB4DC8F09369D670B400";
+const uint8_t GatewayProfile::binary_fingerprint[16] = {0xD6,0x47,0x79,0x04,0xC4,0x8A,0xAB,0x4D,0xC8,0xF0,0x93,0x69,0xD6,0x70,0xB4,0x00};
uint32_t GatewayProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -60,9 +211,21 @@ uint32_t GatewayProfile::read(::apache::thrift::protocol::TProtocol* iprot) {
}
break;
case 4:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->preferedResource);
- this->__isset.preferedResource = true;
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->computeResourcePreferences.clear();
+ uint32_t _size0;
+ ::apache::thrift::protocol::TType _etype3;
+ xfer += iprot->readListBegin(_etype3, _size0);
+ this->computeResourcePreferences.resize(_size0);
+ uint32_t _i4;
+ for (_i4 = 0; _i4 < _size0; ++_i4)
+ {
+ xfer += this->computeResourcePreferences[_i4].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.computeResourcePreferences = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -100,9 +263,17 @@ uint32_t GatewayProfile::write(::apache::thrift::protocol::TProtocol* oprot) con
xfer += oprot->writeString(this->gatewayDescription);
xfer += oprot->writeFieldEnd();
}
- if (this->__isset.preferedResource) {
- xfer += oprot->writeFieldBegin("preferedResource", ::apache::thrift::protocol::T_STRING, 4);
- xfer += oprot->writeString(this->preferedResource);
+ if (this->__isset.computeResourcePreferences) {
+ xfer += oprot->writeFieldBegin("computeResourcePreferences", ::apache::thrift::protocol::T_LIST, 4);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->computeResourcePreferences.size()));
+ std::vector<ComputeResourcePreference> ::const_iterator _iter5;
+ for (_iter5 = this->computeResourcePreferences.begin(); _iter5 != this->computeResourcePreferences.end(); ++_iter5)
+ {
+ xfer += (*_iter5).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
@@ -115,7 +286,7 @@ void swap(GatewayProfile &a, GatewayProfile &b) {
swap(a.gatewayID, b.gatewayID);
swap(a.gatewayName, b.gatewayName);
swap(a.gatewayDescription, b.gatewayDescription);
- swap(a.preferedResource, b.preferedResource);
+ swap(a.computeResourcePreferences, b.computeResourcePreferences);
swap(a.__isset, b.__isset);
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.h
index 38a3338..6bab76c 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/gatewayProfileModel_types.h
@@ -17,19 +17,123 @@
+typedef struct _ComputeResourcePreference__isset {
+ _ComputeResourcePreference__isset() : preferredJobSubmissionProtocol(false), preferredDataMovementProtocol(false), preferredBatchQueue(false), scratchLocation(false), allocationProjectNumber(false) {}
+ bool preferredJobSubmissionProtocol;
+ bool preferredDataMovementProtocol;
+ bool preferredBatchQueue;
+ bool scratchLocation;
+ bool allocationProjectNumber;
+} _ComputeResourcePreference__isset;
+
+class ComputeResourcePreference {
+ public:
+
+ static const char* ascii_fingerprint; // = "9C98338B7E052CD4DEECB22F243D6DAE";
+ static const uint8_t binary_fingerprint[16]; // = {0x9C,0x98,0x33,0x8B,0x7E,0x05,0x2C,0xD4,0xDE,0xEC,0xB2,0x2F,0x24,0x3D,0x6D,0xAE};
+
+ ComputeResourcePreference() : computeResourceId(), overridebyAiravata(true), preferredJobSubmissionProtocol(), preferredDataMovementProtocol(), preferredBatchQueue(), scratchLocation(), allocationProjectNumber() {
+ }
+
+ virtual ~ComputeResourcePreference() throw() {}
+
+ std::string computeResourceId;
+ bool overridebyAiravata;
+ std::string preferredJobSubmissionProtocol;
+ std::string preferredDataMovementProtocol;
+ std::string preferredBatchQueue;
+ std::string scratchLocation;
+ std::string allocationProjectNumber;
+
+ _ComputeResourcePreference__isset __isset;
+
+ void __set_computeResourceId(const std::string& val) {
+ computeResourceId = val;
+ }
+
+ void __set_overridebyAiravata(const bool val) {
+ overridebyAiravata = val;
+ }
+
+ void __set_preferredJobSubmissionProtocol(const std::string& val) {
+ preferredJobSubmissionProtocol = val;
+ __isset.preferredJobSubmissionProtocol = true;
+ }
+
+ void __set_preferredDataMovementProtocol(const std::string& val) {
+ preferredDataMovementProtocol = val;
+ __isset.preferredDataMovementProtocol = true;
+ }
+
+ void __set_preferredBatchQueue(const std::string& val) {
+ preferredBatchQueue = val;
+ __isset.preferredBatchQueue = true;
+ }
+
+ void __set_scratchLocation(const std::string& val) {
+ scratchLocation = val;
+ __isset.scratchLocation = true;
+ }
+
+ void __set_allocationProjectNumber(const std::string& val) {
+ allocationProjectNumber = val;
+ __isset.allocationProjectNumber = true;
+ }
+
+ bool operator == (const ComputeResourcePreference & rhs) const
+ {
+ if (!(computeResourceId == rhs.computeResourceId))
+ return false;
+ if (!(overridebyAiravata == rhs.overridebyAiravata))
+ return false;
+ if (__isset.preferredJobSubmissionProtocol != rhs.__isset.preferredJobSubmissionProtocol)
+ return false;
+ else if (__isset.preferredJobSubmissionProtocol && !(preferredJobSubmissionProtocol == rhs.preferredJobSubmissionProtocol))
+ return false;
+ if (__isset.preferredDataMovementProtocol != rhs.__isset.preferredDataMovementProtocol)
+ return false;
+ else if (__isset.preferredDataMovementProtocol && !(preferredDataMovementProtocol == rhs.preferredDataMovementProtocol))
+ return false;
+ if (__isset.preferredBatchQueue != rhs.__isset.preferredBatchQueue)
+ return false;
+ else if (__isset.preferredBatchQueue && !(preferredBatchQueue == rhs.preferredBatchQueue))
+ return false;
+ if (__isset.scratchLocation != rhs.__isset.scratchLocation)
+ return false;
+ else if (__isset.scratchLocation && !(scratchLocation == rhs.scratchLocation))
+ return false;
+ if (__isset.allocationProjectNumber != rhs.__isset.allocationProjectNumber)
+ return false;
+ else if (__isset.allocationProjectNumber && !(allocationProjectNumber == rhs.allocationProjectNumber))
+ return false;
+ return true;
+ }
+ bool operator != (const ComputeResourcePreference &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ComputeResourcePreference & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(ComputeResourcePreference &a, ComputeResourcePreference &b);
+
typedef struct _GatewayProfile__isset {
- _GatewayProfile__isset() : gatewayDescription(false), preferedResource(false) {}
+ _GatewayProfile__isset() : gatewayDescription(false), computeResourcePreferences(false) {}
bool gatewayDescription;
- bool preferedResource;
+ bool computeResourcePreferences;
} _GatewayProfile__isset;
class GatewayProfile {
public:
- static const char* ascii_fingerprint; // = "FED0FBEAA0C90D1589E8B650561B7675";
- static const uint8_t binary_fingerprint[16]; // = {0xFE,0xD0,0xFB,0xEA,0xA0,0xC9,0x0D,0x15,0x89,0xE8,0xB6,0x50,0x56,0x1B,0x76,0x75};
+ static const char* ascii_fingerprint; // = "D6477904C48AAB4DC8F09369D670B400";
+ static const uint8_t binary_fingerprint[16]; // = {0xD6,0x47,0x79,0x04,0xC4,0x8A,0xAB,0x4D,0xC8,0xF0,0x93,0x69,0xD6,0x70,0xB4,0x00};
- GatewayProfile() : gatewayID("DO_NOT_SET_AT_CLIENTS"), gatewayName(), gatewayDescription(), preferedResource() {
+ GatewayProfile() : gatewayID("DO_NOT_SET_AT_CLIENTS"), gatewayName(), gatewayDescription() {
}
virtual ~GatewayProfile() throw() {}
@@ -37,7 +141,7 @@ class GatewayProfile {
std::string gatewayID;
std::string gatewayName;
std::string gatewayDescription;
- std::string preferedResource;
+ std::vector<ComputeResourcePreference> computeResourcePreferences;
_GatewayProfile__isset __isset;
@@ -54,9 +158,9 @@ class GatewayProfile {
__isset.gatewayDescription = true;
}
- void __set_preferedResource(const std::string& val) {
- preferedResource = val;
- __isset.preferedResource = true;
+ void __set_computeResourcePreferences(const std::vector<ComputeResourcePreference> & val) {
+ computeResourcePreferences = val;
+ __isset.computeResourcePreferences = true;
}
bool operator == (const GatewayProfile & rhs) const
@@ -69,9 +173,9 @@ class GatewayProfile {
return false;
else if (__isset.gatewayDescription && !(gatewayDescription == rhs.gatewayDescription))
return false;
- if (__isset.preferedResource != rhs.__isset.preferedResource)
+ if (__isset.computeResourcePreferences != rhs.__isset.computeResourcePreferences)
return false;
- else if (__isset.preferedResource && !(preferedResource == rhs.preferedResource))
+ else if (__isset.computeResourcePreferences && !(computeResourcePreferences == rhs.computeResourcePreferences))
return false;
return true;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
index 2c56b50..0098016 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
@@ -270,7 +270,7 @@ class ApplicationDeploymentDescription {
public $computeHostId = null;
public $executablePath = null;
public $appDeploymentDescription = null;
- public $moduleLoadCmd = null;
+ public $moduleLoadCmds = null;
public $libPrependPaths = null;
public $libAppendPaths = null;
public $setEnvironment = null;
@@ -303,8 +303,12 @@ class ApplicationDeploymentDescription {
'type' => TType::STRING,
),
7 => array(
- 'var' => 'moduleLoadCmd',
- 'type' => TType::STRING,
+ 'var' => 'moduleLoadCmds',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
),
8 => array(
'var' => 'libPrependPaths',
@@ -354,8 +358,8 @@ class ApplicationDeploymentDescription {
if (isset($vals['appDeploymentDescription'])) {
$this->appDeploymentDescription = $vals['appDeploymentDescription'];
}
- if (isset($vals['moduleLoadCmd'])) {
- $this->moduleLoadCmd = $vals['moduleLoadCmd'];
+ if (isset($vals['moduleLoadCmds'])) {
+ $this->moduleLoadCmds = $vals['moduleLoadCmds'];
}
if (isset($vals['libPrependPaths'])) {
$this->libPrependPaths = $vals['libPrependPaths'];
@@ -431,33 +435,25 @@ class ApplicationDeploymentDescription {
}
break;
case 7:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->moduleLoadCmd);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 8:
if ($ftype == TType::LST) {
- $this->libPrependPaths = array();
+ $this->moduleLoadCmds = array();
$_size0 = 0;
$_etype3 = 0;
$xfer += $input->readListBegin($_etype3, $_size0);
for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
{
$elem5 = null;
- $elem5 = new \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths();
- $xfer += $elem5->read($input);
- $this->libPrependPaths []= $elem5;
+ $xfer += $input->readString($elem5);
+ $this->moduleLoadCmds []= $elem5;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
- case 9:
+ case 8:
if ($ftype == TType::LST) {
- $this->libAppendPaths = array();
+ $this->libPrependPaths = array();
$_size6 = 0;
$_etype9 = 0;
$xfer += $input->readListBegin($_etype9, $_size6);
@@ -466,16 +462,16 @@ class ApplicationDeploymentDescription {
$elem11 = null;
$elem11 = new \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths();
$xfer += $elem11->read($input);
- $this->libAppendPaths []= $elem11;
+ $this->libPrependPaths []= $elem11;
}
$xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
- case 10:
+ case 9:
if ($ftype == TType::LST) {
- $this->setEnvironment = array();
+ $this->libAppendPaths = array();
$_size12 = 0;
$_etype15 = 0;
$xfer += $input->readListBegin($_etype15, $_size12);
@@ -484,7 +480,25 @@ class ApplicationDeploymentDescription {
$elem17 = null;
$elem17 = new \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths();
$xfer += $elem17->read($input);
- $this->setEnvironment []= $elem17;
+ $this->libAppendPaths []= $elem17;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::LST) {
+ $this->setEnvironment = array();
+ $_size18 = 0;
+ $_etype21 = 0;
+ $xfer += $input->readListBegin($_etype21, $_size18);
+ for ($_i22 = 0; $_i22 < $_size18; ++$_i22)
+ {
+ $elem23 = null;
+ $elem23 = new \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths();
+ $xfer += $elem23->read($input);
+ $this->setEnvironment []= $elem23;
}
$xfer += $input->readListEnd();
} else {
@@ -534,9 +548,21 @@ class ApplicationDeploymentDescription {
$xfer += $output->writeString($this->appDeploymentDescription);
$xfer += $output->writeFieldEnd();
}
- if ($this->moduleLoadCmd !== null) {
- $xfer += $output->writeFieldBegin('moduleLoadCmd', TType::STRING, 7);
- $xfer += $output->writeString($this->moduleLoadCmd);
+ if ($this->moduleLoadCmds !== null) {
+ if (!is_array($this->moduleLoadCmds)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('moduleLoadCmds', TType::LST, 7);
+ {
+ $output->writeListBegin(TType::STRING, count($this->moduleLoadCmds));
+ {
+ foreach ($this->moduleLoadCmds as $iter24)
+ {
+ $xfer += $output->writeString($iter24);
+ }
+ }
+ $output->writeListEnd();
+ }
$xfer += $output->writeFieldEnd();
}
if ($this->libPrependPaths !== null) {
@@ -547,9 +573,9 @@ class ApplicationDeploymentDescription {
{
$output->writeListBegin(TType::STRUCT, count($this->libPrependPaths));
{
- foreach ($this->libPrependPaths as $iter18)
+ foreach ($this->libPrependPaths as $iter25)
{
- $xfer += $iter18->write($output);
+ $xfer += $iter25->write($output);
}
}
$output->writeListEnd();
@@ -564,9 +590,9 @@ class ApplicationDeploymentDescription {
{
$output->writeListBegin(TType::STRUCT, count($this->libAppendPaths));
{
- foreach ($this->libAppendPaths as $iter19)
+ foreach ($this->libAppendPaths as $iter26)
{
- $xfer += $iter19->write($output);
+ $xfer += $iter26->write($output);
}
}
$output->writeListEnd();
@@ -581,9 +607,9 @@ class ApplicationDeploymentDescription {
{
$output->writeListBegin(TType::STRUCT, count($this->setEnvironment));
{
- foreach ($this->setEnvironment as $iter20)
+ foreach ($this->setEnvironment as $iter27)
{
- $xfer += $iter20->write($output);
+ $xfer += $iter27->write($output);
}
}
$output->writeListEnd();
[07/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java
new file mode 100644
index 0000000..2054b87
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java
@@ -0,0 +1,886 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Batch Queue Information on SuperComputers
+ *
+ * maxRunTime:
+ * Maximum allowed run time in hours.
+ */
+@SuppressWarnings("all") public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueue._Fields>, java.io.Serializable, Cloneable, Comparable<BatchQueue> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchQueue");
+
+ private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField QUEUE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("queueDescription", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField MAX_RUN_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("maxRunTime", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField MAX_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("maxNodes", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField MAX_PROCESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxProcessors", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField MAX_JOBS_IN_QUEUE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxJobsInQueue", org.apache.thrift.protocol.TType.I32, (short)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new BatchQueueStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new BatchQueueTupleSchemeFactory());
+ }
+
+ private String queueName; // required
+ private String queueDescription; // optional
+ private int maxRunTime; // optional
+ private int maxNodes; // optional
+ private int maxProcessors; // optional
+ private int maxJobsInQueue; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ QUEUE_NAME((short)1, "queueName"),
+ QUEUE_DESCRIPTION((short)2, "queueDescription"),
+ MAX_RUN_TIME((short)3, "maxRunTime"),
+ MAX_NODES((short)4, "maxNodes"),
+ MAX_PROCESSORS((short)5, "maxProcessors"),
+ MAX_JOBS_IN_QUEUE((short)6, "maxJobsInQueue");
+
+ 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: // QUEUE_NAME
+ return QUEUE_NAME;
+ case 2: // QUEUE_DESCRIPTION
+ return QUEUE_DESCRIPTION;
+ case 3: // MAX_RUN_TIME
+ return MAX_RUN_TIME;
+ case 4: // MAX_NODES
+ return MAX_NODES;
+ case 5: // MAX_PROCESSORS
+ return MAX_PROCESSORS;
+ case 6: // MAX_JOBS_IN_QUEUE
+ return MAX_JOBS_IN_QUEUE;
+ 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 __MAXRUNTIME_ISSET_ID = 0;
+ private static final int __MAXNODES_ISSET_ID = 1;
+ private static final int __MAXPROCESSORS_ISSET_ID = 2;
+ private static final int __MAXJOBSINQUEUE_ISSET_ID = 3;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.QUEUE_DESCRIPTION,_Fields.MAX_RUN_TIME,_Fields.MAX_NODES,_Fields.MAX_PROCESSORS,_Fields.MAX_JOBS_IN_QUEUE};
+ 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.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.QUEUE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("queueDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MAX_RUN_TIME, new org.apache.thrift.meta_data.FieldMetaData("maxRunTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MAX_NODES, new org.apache.thrift.meta_data.FieldMetaData("maxNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MAX_PROCESSORS, new org.apache.thrift.meta_data.FieldMetaData("maxProcessors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MAX_JOBS_IN_QUEUE, new org.apache.thrift.meta_data.FieldMetaData("maxJobsInQueue", 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(BatchQueue.class, metaDataMap);
+ }
+
+ public BatchQueue() {
+ }
+
+ public BatchQueue(
+ String queueName)
+ {
+ this();
+ this.queueName = queueName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public BatchQueue(BatchQueue other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetQueueName()) {
+ this.queueName = other.queueName;
+ }
+ if (other.isSetQueueDescription()) {
+ this.queueDescription = other.queueDescription;
+ }
+ this.maxRunTime = other.maxRunTime;
+ this.maxNodes = other.maxNodes;
+ this.maxProcessors = other.maxProcessors;
+ this.maxJobsInQueue = other.maxJobsInQueue;
+ }
+
+ public BatchQueue deepCopy() {
+ return new BatchQueue(this);
+ }
+
+ @Override
+ public void clear() {
+ this.queueName = null;
+ this.queueDescription = null;
+ setMaxRunTimeIsSet(false);
+ this.maxRunTime = 0;
+ setMaxNodesIsSet(false);
+ this.maxNodes = 0;
+ setMaxProcessorsIsSet(false);
+ this.maxProcessors = 0;
+ setMaxJobsInQueueIsSet(false);
+ this.maxJobsInQueue = 0;
+ }
+
+ public String getQueueName() {
+ return this.queueName;
+ }
+
+ public void setQueueName(String queueName) {
+ this.queueName = queueName;
+ }
+
+ public void unsetQueueName() {
+ this.queueName = null;
+ }
+
+ /** Returns true if field queueName is set (has been assigned a value) and false otherwise */
+ public boolean isSetQueueName() {
+ return this.queueName != null;
+ }
+
+ public void setQueueNameIsSet(boolean value) {
+ if (!value) {
+ this.queueName = null;
+ }
+ }
+
+ public String getQueueDescription() {
+ return this.queueDescription;
+ }
+
+ public void setQueueDescription(String queueDescription) {
+ this.queueDescription = queueDescription;
+ }
+
+ public void unsetQueueDescription() {
+ this.queueDescription = null;
+ }
+
+ /** Returns true if field queueDescription is set (has been assigned a value) and false otherwise */
+ public boolean isSetQueueDescription() {
+ return this.queueDescription != null;
+ }
+
+ public void setQueueDescriptionIsSet(boolean value) {
+ if (!value) {
+ this.queueDescription = null;
+ }
+ }
+
+ public int getMaxRunTime() {
+ return this.maxRunTime;
+ }
+
+ public void setMaxRunTime(int maxRunTime) {
+ this.maxRunTime = maxRunTime;
+ setMaxRunTimeIsSet(true);
+ }
+
+ public void unsetMaxRunTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID);
+ }
+
+ /** Returns true if field maxRunTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetMaxRunTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID);
+ }
+
+ public void setMaxRunTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID, value);
+ }
+
+ public int getMaxNodes() {
+ return this.maxNodes;
+ }
+
+ public void setMaxNodes(int maxNodes) {
+ this.maxNodes = maxNodes;
+ setMaxNodesIsSet(true);
+ }
+
+ public void unsetMaxNodes() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXNODES_ISSET_ID);
+ }
+
+ /** Returns true if field maxNodes is set (has been assigned a value) and false otherwise */
+ public boolean isSetMaxNodes() {
+ return EncodingUtils.testBit(__isset_bitfield, __MAXNODES_ISSET_ID);
+ }
+
+ public void setMaxNodesIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXNODES_ISSET_ID, value);
+ }
+
+ public int getMaxProcessors() {
+ return this.maxProcessors;
+ }
+
+ public void setMaxProcessors(int maxProcessors) {
+ this.maxProcessors = maxProcessors;
+ setMaxProcessorsIsSet(true);
+ }
+
+ public void unsetMaxProcessors() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID);
+ }
+
+ /** Returns true if field maxProcessors is set (has been assigned a value) and false otherwise */
+ public boolean isSetMaxProcessors() {
+ return EncodingUtils.testBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID);
+ }
+
+ public void setMaxProcessorsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID, value);
+ }
+
+ public int getMaxJobsInQueue() {
+ return this.maxJobsInQueue;
+ }
+
+ public void setMaxJobsInQueue(int maxJobsInQueue) {
+ this.maxJobsInQueue = maxJobsInQueue;
+ setMaxJobsInQueueIsSet(true);
+ }
+
+ public void unsetMaxJobsInQueue() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID);
+ }
+
+ /** Returns true if field maxJobsInQueue is set (has been assigned a value) and false otherwise */
+ public boolean isSetMaxJobsInQueue() {
+ return EncodingUtils.testBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID);
+ }
+
+ public void setMaxJobsInQueueIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case QUEUE_NAME:
+ if (value == null) {
+ unsetQueueName();
+ } else {
+ setQueueName((String)value);
+ }
+ break;
+
+ case QUEUE_DESCRIPTION:
+ if (value == null) {
+ unsetQueueDescription();
+ } else {
+ setQueueDescription((String)value);
+ }
+ break;
+
+ case MAX_RUN_TIME:
+ if (value == null) {
+ unsetMaxRunTime();
+ } else {
+ setMaxRunTime((Integer)value);
+ }
+ break;
+
+ case MAX_NODES:
+ if (value == null) {
+ unsetMaxNodes();
+ } else {
+ setMaxNodes((Integer)value);
+ }
+ break;
+
+ case MAX_PROCESSORS:
+ if (value == null) {
+ unsetMaxProcessors();
+ } else {
+ setMaxProcessors((Integer)value);
+ }
+ break;
+
+ case MAX_JOBS_IN_QUEUE:
+ if (value == null) {
+ unsetMaxJobsInQueue();
+ } else {
+ setMaxJobsInQueue((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case QUEUE_NAME:
+ return getQueueName();
+
+ case QUEUE_DESCRIPTION:
+ return getQueueDescription();
+
+ case MAX_RUN_TIME:
+ return Integer.valueOf(getMaxRunTime());
+
+ case MAX_NODES:
+ return Integer.valueOf(getMaxNodes());
+
+ case MAX_PROCESSORS:
+ return Integer.valueOf(getMaxProcessors());
+
+ case MAX_JOBS_IN_QUEUE:
+ return Integer.valueOf(getMaxJobsInQueue());
+
+ }
+ 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 QUEUE_NAME:
+ return isSetQueueName();
+ case QUEUE_DESCRIPTION:
+ return isSetQueueDescription();
+ case MAX_RUN_TIME:
+ return isSetMaxRunTime();
+ case MAX_NODES:
+ return isSetMaxNodes();
+ case MAX_PROCESSORS:
+ return isSetMaxProcessors();
+ case MAX_JOBS_IN_QUEUE:
+ return isSetMaxJobsInQueue();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof BatchQueue)
+ return this.equals((BatchQueue)that);
+ return false;
+ }
+
+ public boolean equals(BatchQueue that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_queueName = true && this.isSetQueueName();
+ boolean that_present_queueName = true && that.isSetQueueName();
+ if (this_present_queueName || that_present_queueName) {
+ if (!(this_present_queueName && that_present_queueName))
+ return false;
+ if (!this.queueName.equals(that.queueName))
+ return false;
+ }
+
+ boolean this_present_queueDescription = true && this.isSetQueueDescription();
+ boolean that_present_queueDescription = true && that.isSetQueueDescription();
+ if (this_present_queueDescription || that_present_queueDescription) {
+ if (!(this_present_queueDescription && that_present_queueDescription))
+ return false;
+ if (!this.queueDescription.equals(that.queueDescription))
+ return false;
+ }
+
+ boolean this_present_maxRunTime = true && this.isSetMaxRunTime();
+ boolean that_present_maxRunTime = true && that.isSetMaxRunTime();
+ if (this_present_maxRunTime || that_present_maxRunTime) {
+ if (!(this_present_maxRunTime && that_present_maxRunTime))
+ return false;
+ if (this.maxRunTime != that.maxRunTime)
+ return false;
+ }
+
+ boolean this_present_maxNodes = true && this.isSetMaxNodes();
+ boolean that_present_maxNodes = true && that.isSetMaxNodes();
+ if (this_present_maxNodes || that_present_maxNodes) {
+ if (!(this_present_maxNodes && that_present_maxNodes))
+ return false;
+ if (this.maxNodes != that.maxNodes)
+ return false;
+ }
+
+ boolean this_present_maxProcessors = true && this.isSetMaxProcessors();
+ boolean that_present_maxProcessors = true && that.isSetMaxProcessors();
+ if (this_present_maxProcessors || that_present_maxProcessors) {
+ if (!(this_present_maxProcessors && that_present_maxProcessors))
+ return false;
+ if (this.maxProcessors != that.maxProcessors)
+ return false;
+ }
+
+ boolean this_present_maxJobsInQueue = true && this.isSetMaxJobsInQueue();
+ boolean that_present_maxJobsInQueue = true && that.isSetMaxJobsInQueue();
+ if (this_present_maxJobsInQueue || that_present_maxJobsInQueue) {
+ if (!(this_present_maxJobsInQueue && that_present_maxJobsInQueue))
+ return false;
+ if (this.maxJobsInQueue != that.maxJobsInQueue)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(BatchQueue other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQueueName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQueueDescription()).compareTo(other.isSetQueueDescription());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQueueDescription()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueDescription, other.queueDescription);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxRunTime()).compareTo(other.isSetMaxRunTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxRunTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRunTime, other.maxRunTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxNodes()).compareTo(other.isSetMaxNodes());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxNodes()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxNodes, other.maxNodes);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxProcessors()).compareTo(other.isSetMaxProcessors());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxProcessors()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxProcessors, other.maxProcessors);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMaxJobsInQueue()).compareTo(other.isSetMaxJobsInQueue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMaxJobsInQueue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxJobsInQueue, other.maxJobsInQueue);
+ 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("BatchQueue(");
+ boolean first = true;
+
+ sb.append("queueName:");
+ if (this.queueName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.queueName);
+ }
+ first = false;
+ if (isSetQueueDescription()) {
+ if (!first) sb.append(", ");
+ sb.append("queueDescription:");
+ if (this.queueDescription == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.queueDescription);
+ }
+ first = false;
+ }
+ if (isSetMaxRunTime()) {
+ if (!first) sb.append(", ");
+ sb.append("maxRunTime:");
+ sb.append(this.maxRunTime);
+ first = false;
+ }
+ if (isSetMaxNodes()) {
+ if (!first) sb.append(", ");
+ sb.append("maxNodes:");
+ sb.append(this.maxNodes);
+ first = false;
+ }
+ if (isSetMaxProcessors()) {
+ if (!first) sb.append(", ");
+ sb.append("maxProcessors:");
+ sb.append(this.maxProcessors);
+ first = false;
+ }
+ if (isSetMaxJobsInQueue()) {
+ if (!first) sb.append(", ");
+ sb.append("maxJobsInQueue:");
+ sb.append(this.maxJobsInQueue);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetQueueName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'queueName' is unset! Struct:" + toString());
+ }
+
+ // 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 BatchQueueStandardSchemeFactory implements SchemeFactory {
+ public BatchQueueStandardScheme getScheme() {
+ return new BatchQueueStandardScheme();
+ }
+ }
+
+ private static class BatchQueueStandardScheme extends StandardScheme<BatchQueue> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BatchQueue 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: // QUEUE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // QUEUE_DESCRIPTION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.queueDescription = iprot.readString();
+ struct.setQueueDescriptionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // MAX_RUN_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.maxRunTime = iprot.readI32();
+ struct.setMaxRunTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // MAX_NODES
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.maxNodes = iprot.readI32();
+ struct.setMaxNodesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // MAX_PROCESSORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.maxProcessors = iprot.readI32();
+ struct.setMaxProcessorsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // MAX_JOBS_IN_QUEUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.maxJobsInQueue = iprot.readI32();
+ struct.setMaxJobsInQueueIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, BatchQueue struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.queueName != null) {
+ oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
+ oprot.writeString(struct.queueName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.queueDescription != null) {
+ if (struct.isSetQueueDescription()) {
+ oprot.writeFieldBegin(QUEUE_DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.queueDescription);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetMaxRunTime()) {
+ oprot.writeFieldBegin(MAX_RUN_TIME_FIELD_DESC);
+ oprot.writeI32(struct.maxRunTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetMaxNodes()) {
+ oprot.writeFieldBegin(MAX_NODES_FIELD_DESC);
+ oprot.writeI32(struct.maxNodes);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetMaxProcessors()) {
+ oprot.writeFieldBegin(MAX_PROCESSORS_FIELD_DESC);
+ oprot.writeI32(struct.maxProcessors);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetMaxJobsInQueue()) {
+ oprot.writeFieldBegin(MAX_JOBS_IN_QUEUE_FIELD_DESC);
+ oprot.writeI32(struct.maxJobsInQueue);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class BatchQueueTupleSchemeFactory implements SchemeFactory {
+ public BatchQueueTupleScheme getScheme() {
+ return new BatchQueueTupleScheme();
+ }
+ }
+
+ private static class BatchQueueTupleScheme extends TupleScheme<BatchQueue> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, BatchQueue struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.queueName);
+ BitSet optionals = new BitSet();
+ if (struct.isSetQueueDescription()) {
+ optionals.set(0);
+ }
+ if (struct.isSetMaxRunTime()) {
+ optionals.set(1);
+ }
+ if (struct.isSetMaxNodes()) {
+ optionals.set(2);
+ }
+ if (struct.isSetMaxProcessors()) {
+ optionals.set(3);
+ }
+ if (struct.isSetMaxJobsInQueue()) {
+ optionals.set(4);
+ }
+ oprot.writeBitSet(optionals, 5);
+ if (struct.isSetQueueDescription()) {
+ oprot.writeString(struct.queueDescription);
+ }
+ if (struct.isSetMaxRunTime()) {
+ oprot.writeI32(struct.maxRunTime);
+ }
+ if (struct.isSetMaxNodes()) {
+ oprot.writeI32(struct.maxNodes);
+ }
+ if (struct.isSetMaxProcessors()) {
+ oprot.writeI32(struct.maxProcessors);
+ }
+ if (struct.isSetMaxJobsInQueue()) {
+ oprot.writeI32(struct.maxJobsInQueue);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, BatchQueue struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.queueName = iprot.readString();
+ struct.setQueueNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(5);
+ if (incoming.get(0)) {
+ struct.queueDescription = iprot.readString();
+ struct.setQueueDescriptionIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.maxRunTime = iprot.readI32();
+ struct.setMaxRunTimeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.maxNodes = iprot.readI32();
+ struct.setMaxNodesIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.maxProcessors = iprot.readI32();
+ struct.setMaxProcessorsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.maxJobsInQueue = iprot.readI32();
+ struct.setMaxJobsInQueueIsSet(true);
+ }
+ }
+ }
+
+}
+
[05/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementInterface.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementInterface.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementInterface.java
new file mode 100644
index 0000000..f36c113
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementInterface.java
@@ -0,0 +1,609 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Data Movement Interfaces
+ *
+ * dataMovementInterfaceId: The Data Movement Interface has to be previously registered and referenced here.
+ *
+ * priorityOrder:
+ * For resources with multiple interfaces, the priority order should be selected.
+ * Lower the numerical number, higher the priority
+ *
+ */
+@SuppressWarnings("all") public class DataMovementInterface implements org.apache.thrift.TBase<DataMovementInterface, DataMovementInterface._Fields>, java.io.Serializable, Cloneable, Comparable<DataMovementInterface> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataMovementInterface");
+
+ private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField PRIORITY_ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("priorityOrder", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new DataMovementInterfaceStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new DataMovementInterfaceTupleSchemeFactory());
+ }
+
+ private String dataMovementInterfaceId; // required
+ private DataMovementProtocol dataMovementProtocol; // required
+ private int priorityOrder; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ DATA_MOVEMENT_INTERFACE_ID((short)1, "dataMovementInterfaceId"),
+ /**
+ *
+ * @see DataMovementProtocol
+ */
+ DATA_MOVEMENT_PROTOCOL((short)2, "dataMovementProtocol"),
+ PRIORITY_ORDER((short)3, "priorityOrder");
+
+ 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: // DATA_MOVEMENT_INTERFACE_ID
+ return DATA_MOVEMENT_INTERFACE_ID;
+ case 2: // DATA_MOVEMENT_PROTOCOL
+ return DATA_MOVEMENT_PROTOCOL;
+ case 3: // PRIORITY_ORDER
+ return PRIORITY_ORDER;
+ 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 __PRIORITYORDER_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.DATA_MOVEMENT_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DATA_MOVEMENT_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("dataMovementProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataMovementProtocol.class)));
+ tmpMap.put(_Fields.PRIORITY_ORDER, new org.apache.thrift.meta_data.FieldMetaData("priorityOrder", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataMovementInterface.class, metaDataMap);
+ }
+
+ public DataMovementInterface() {
+ this.priorityOrder = 0;
+
+ }
+
+ public DataMovementInterface(
+ String dataMovementInterfaceId,
+ DataMovementProtocol dataMovementProtocol,
+ int priorityOrder)
+ {
+ this();
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ this.dataMovementProtocol = dataMovementProtocol;
+ this.priorityOrder = priorityOrder;
+ setPriorityOrderIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public DataMovementInterface(DataMovementInterface other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetDataMovementInterfaceId()) {
+ this.dataMovementInterfaceId = other.dataMovementInterfaceId;
+ }
+ if (other.isSetDataMovementProtocol()) {
+ this.dataMovementProtocol = other.dataMovementProtocol;
+ }
+ this.priorityOrder = other.priorityOrder;
+ }
+
+ public DataMovementInterface deepCopy() {
+ return new DataMovementInterface(this);
+ }
+
+ @Override
+ public void clear() {
+ this.dataMovementInterfaceId = null;
+ this.dataMovementProtocol = null;
+ this.priorityOrder = 0;
+
+ }
+
+ public String getDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId;
+ }
+
+ public void setDataMovementInterfaceId(String dataMovementInterfaceId) {
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ }
+
+ public void unsetDataMovementInterfaceId() {
+ this.dataMovementInterfaceId = null;
+ }
+
+ /** Returns true if field dataMovementInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId != null;
+ }
+
+ public void setDataMovementInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.dataMovementInterfaceId = null;
+ }
+ }
+
+ /**
+ *
+ * @see DataMovementProtocol
+ */
+ public DataMovementProtocol getDataMovementProtocol() {
+ return this.dataMovementProtocol;
+ }
+
+ /**
+ *
+ * @see DataMovementProtocol
+ */
+ public void setDataMovementProtocol(DataMovementProtocol dataMovementProtocol) {
+ this.dataMovementProtocol = dataMovementProtocol;
+ }
+
+ public void unsetDataMovementProtocol() {
+ this.dataMovementProtocol = null;
+ }
+
+ /** Returns true if field dataMovementProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataMovementProtocol() {
+ return this.dataMovementProtocol != null;
+ }
+
+ public void setDataMovementProtocolIsSet(boolean value) {
+ if (!value) {
+ this.dataMovementProtocol = null;
+ }
+ }
+
+ public int getPriorityOrder() {
+ return this.priorityOrder;
+ }
+
+ public void setPriorityOrder(int priorityOrder) {
+ this.priorityOrder = priorityOrder;
+ setPriorityOrderIsSet(true);
+ }
+
+ public void unsetPriorityOrder() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIORITYORDER_ISSET_ID);
+ }
+
+ /** Returns true if field priorityOrder is set (has been assigned a value) and false otherwise */
+ public boolean isSetPriorityOrder() {
+ return EncodingUtils.testBit(__isset_bitfield, __PRIORITYORDER_ISSET_ID);
+ }
+
+ public void setPriorityOrderIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIORITYORDER_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ if (value == null) {
+ unsetDataMovementInterfaceId();
+ } else {
+ setDataMovementInterfaceId((String)value);
+ }
+ break;
+
+ case DATA_MOVEMENT_PROTOCOL:
+ if (value == null) {
+ unsetDataMovementProtocol();
+ } else {
+ setDataMovementProtocol((DataMovementProtocol)value);
+ }
+ break;
+
+ case PRIORITY_ORDER:
+ if (value == null) {
+ unsetPriorityOrder();
+ } else {
+ setPriorityOrder((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ return getDataMovementInterfaceId();
+
+ case DATA_MOVEMENT_PROTOCOL:
+ return getDataMovementProtocol();
+
+ case PRIORITY_ORDER:
+ return Integer.valueOf(getPriorityOrder());
+
+ }
+ 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 DATA_MOVEMENT_INTERFACE_ID:
+ return isSetDataMovementInterfaceId();
+ case DATA_MOVEMENT_PROTOCOL:
+ return isSetDataMovementProtocol();
+ case PRIORITY_ORDER:
+ return isSetPriorityOrder();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof DataMovementInterface)
+ return this.equals((DataMovementInterface)that);
+ return false;
+ }
+
+ public boolean equals(DataMovementInterface that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_dataMovementInterfaceId = true && this.isSetDataMovementInterfaceId();
+ boolean that_present_dataMovementInterfaceId = true && that.isSetDataMovementInterfaceId();
+ if (this_present_dataMovementInterfaceId || that_present_dataMovementInterfaceId) {
+ if (!(this_present_dataMovementInterfaceId && that_present_dataMovementInterfaceId))
+ return false;
+ if (!this.dataMovementInterfaceId.equals(that.dataMovementInterfaceId))
+ return false;
+ }
+
+ boolean this_present_dataMovementProtocol = true && this.isSetDataMovementProtocol();
+ boolean that_present_dataMovementProtocol = true && that.isSetDataMovementProtocol();
+ if (this_present_dataMovementProtocol || that_present_dataMovementProtocol) {
+ if (!(this_present_dataMovementProtocol && that_present_dataMovementProtocol))
+ return false;
+ if (!this.dataMovementProtocol.equals(that.dataMovementProtocol))
+ return false;
+ }
+
+ boolean this_present_priorityOrder = true;
+ boolean that_present_priorityOrder = true;
+ if (this_present_priorityOrder || that_present_priorityOrder) {
+ if (!(this_present_priorityOrder && that_present_priorityOrder))
+ return false;
+ if (this.priorityOrder != that.priorityOrder)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(DataMovementInterface other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDataMovementInterfaceId()).compareTo(other.isSetDataMovementInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataMovementInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementInterfaceId, other.dataMovementInterfaceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDataMovementProtocol()).compareTo(other.isSetDataMovementProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataMovementProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementProtocol, other.dataMovementProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPriorityOrder()).compareTo(other.isSetPriorityOrder());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPriorityOrder()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priorityOrder, other.priorityOrder);
+ 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("DataMovementInterface(");
+ boolean first = true;
+
+ sb.append("dataMovementInterfaceId:");
+ if (this.dataMovementInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataMovementInterfaceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("dataMovementProtocol:");
+ if (this.dataMovementProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataMovementProtocol);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("priorityOrder:");
+ sb.append(this.priorityOrder);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetDataMovementInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementInterfaceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetDataMovementProtocol()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementProtocol' is unset! Struct:" + toString());
+ }
+
+ if (!isSetPriorityOrder()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'priorityOrder' is unset! Struct:" + toString());
+ }
+
+ // 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 DataMovementInterfaceStandardSchemeFactory implements SchemeFactory {
+ public DataMovementInterfaceStandardScheme getScheme() {
+ return new DataMovementInterfaceStandardScheme();
+ }
+ }
+
+ private static class DataMovementInterfaceStandardScheme extends StandardScheme<DataMovementInterface> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, DataMovementInterface 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: // DATA_MOVEMENT_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DATA_MOVEMENT_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.dataMovementProtocol = DataMovementProtocol.findByValue(iprot.readI32());
+ struct.setDataMovementProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PRIORITY_ORDER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.priorityOrder = iprot.readI32();
+ struct.setPriorityOrderIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, DataMovementInterface struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.dataMovementInterfaceId != null) {
+ oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.dataMovementInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.dataMovementProtocol != null) {
+ oprot.writeFieldBegin(DATA_MOVEMENT_PROTOCOL_FIELD_DESC);
+ oprot.writeI32(struct.dataMovementProtocol.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(PRIORITY_ORDER_FIELD_DESC);
+ oprot.writeI32(struct.priorityOrder);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class DataMovementInterfaceTupleSchemeFactory implements SchemeFactory {
+ public DataMovementInterfaceTupleScheme getScheme() {
+ return new DataMovementInterfaceTupleScheme();
+ }
+ }
+
+ private static class DataMovementInterfaceTupleScheme extends TupleScheme<DataMovementInterface> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, DataMovementInterface struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.dataMovementInterfaceId);
+ oprot.writeI32(struct.dataMovementProtocol.getValue());
+ oprot.writeI32(struct.priorityOrder);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, DataMovementInterface struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(true);
+ struct.dataMovementProtocol = DataMovementProtocol.findByValue(iprot.readI32());
+ struct.setDataMovementProtocolIsSet(true);
+ struct.priorityOrder = iprot.readI32();
+ struct.setPriorityOrderIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java
new file mode 100644
index 0000000..031a5bf
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/DataMovementProtocol.java
@@ -0,0 +1,86 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * Enumeration of data movement supported by Airavata
+ *
+ * SCP:
+ * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine.
+ *
+ * SFTP:
+ * The Simple Linux Utility for Resource Management is a open source workload manager.
+ *
+ * GridFTP:
+ * Globus File Transfer Protocol
+ *
+ * UNICORE_STORAGE_SERVICE:
+ * Storage Service Provided by Unicore
+ *
+ */
+@SuppressWarnings("all") public enum DataMovementProtocol implements org.apache.thrift.TEnum {
+ LOCAL(0),
+ SCP(1),
+ SFTP(2),
+ GridFTP(3),
+ UNICORE_STORAGE_SERVICE(4);
+
+ private final int value;
+
+ private DataMovementProtocol(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static DataMovementProtocol findByValue(int value) {
+ switch (value) {
+ case 0:
+ return LOCAL;
+ case 1:
+ return SCP;
+ case 2:
+ return SFTP;
+ case 3:
+ return GridFTP;
+ case 4:
+ return UNICORE_STORAGE_SERVICE;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/FileSystems.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/FileSystems.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/FileSystems.java
new file mode 100644
index 0000000..30ec33d
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/FileSystems.java
@@ -0,0 +1,86 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * Enumeration of File Systems on the resource
+ *
+ * FORK:
+ * Forking of commands without any job manager
+ *
+ * PBS:
+ * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine.
+ *
+ * UGE:
+ * Univa Grid Engine, a variation of PBS implementation.
+ *
+ * SLURM:
+ * The Simple Linux Utility for Resource Management is a open source workload manager.
+ *
+ */
+@SuppressWarnings("all") public enum FileSystems implements org.apache.thrift.TEnum {
+ HOME(0),
+ WORK(1),
+ LOCALTMP(2),
+ SCRATCH(3),
+ ARCHIVE(4);
+
+ private final int value;
+
+ private FileSystems(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static FileSystems findByValue(int value) {
+ switch (value) {
+ case 0:
+ return HOME;
+ case 1:
+ return WORK;
+ case 2:
+ return LOCALTMP;
+ case 3:
+ return SCRATCH;
+ case 4:
+ return ARCHIVE;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java
new file mode 100644
index 0000000..363f95c
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/GSISSHJobSubmission.java
@@ -0,0 +1,1262 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+@SuppressWarnings("all") public class GSISSHJobSubmission implements org.apache.thrift.TBase<GSISSHJobSubmission, GSISSHJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<GSISSHJobSubmission> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GSISSHJobSubmission");
+
+ private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_DATA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionDataID", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField EXPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("exports", org.apache.thrift.protocol.TType.SET, (short)4);
+ private static final org.apache.thrift.protocol.TField PRE_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("preJobCommands", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField POST_JOB_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("postJobCommands", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField INSTALLED_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("installedPath", org.apache.thrift.protocol.TType.STRING, (short)7);
+ private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.STRING, (short)8);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GSISSHJobSubmissionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GSISSHJobSubmissionTupleSchemeFactory());
+ }
+
+ private String jobSubmissionDataID; // required
+ private ResourceJobManager resourceJobManager; // required
+ private int sshPort; // optional
+ private Set<String> exports; // optional
+ private List<String> preJobCommands; // optional
+ private List<String> postJobCommands; // optional
+ private String installedPath; // optional
+ private String monitorMode; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ JOB_SUBMISSION_DATA_ID((short)1, "jobSubmissionDataID"),
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ RESOURCE_JOB_MANAGER((short)2, "resourceJobManager"),
+ SSH_PORT((short)3, "sshPort"),
+ EXPORTS((short)4, "exports"),
+ PRE_JOB_COMMANDS((short)5, "preJobCommands"),
+ POST_JOB_COMMANDS((short)6, "postJobCommands"),
+ INSTALLED_PATH((short)7, "installedPath"),
+ MONITOR_MODE((short)8, "monitorMode");
+
+ 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: // JOB_SUBMISSION_DATA_ID
+ return JOB_SUBMISSION_DATA_ID;
+ case 2: // RESOURCE_JOB_MANAGER
+ return RESOURCE_JOB_MANAGER;
+ case 3: // SSH_PORT
+ return SSH_PORT;
+ case 4: // EXPORTS
+ return EXPORTS;
+ case 5: // PRE_JOB_COMMANDS
+ return PRE_JOB_COMMANDS;
+ case 6: // POST_JOB_COMMANDS
+ return POST_JOB_COMMANDS;
+ case 7: // INSTALLED_PATH
+ return INSTALLED_PATH;
+ case 8: // MONITOR_MODE
+ return MONITOR_MODE;
+ 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 __SSHPORT_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.SSH_PORT,_Fields.EXPORTS,_Fields.PRE_JOB_COMMANDS,_Fields.POST_JOB_COMMANDS,_Fields.INSTALLED_PATH,_Fields.MONITOR_MODE};
+ 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.JOB_SUBMISSION_DATA_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionDataID", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
+ tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.EXPORTS, new org.apache.thrift.meta_data.FieldMetaData("exports", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.PRE_JOB_COMMANDS, new org.apache.thrift.meta_data.FieldMetaData("preJobCommands", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.POST_JOB_COMMANDS, new org.apache.thrift.meta_data.FieldMetaData("postJobCommands", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.INSTALLED_PATH, new org.apache.thrift.meta_data.FieldMetaData("installedPath", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GSISSHJobSubmission.class, metaDataMap);
+ }
+
+ public GSISSHJobSubmission() {
+ this.jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
+
+ this.sshPort = 22;
+
+ }
+
+ public GSISSHJobSubmission(
+ String jobSubmissionDataID,
+ ResourceJobManager resourceJobManager)
+ {
+ this();
+ this.jobSubmissionDataID = jobSubmissionDataID;
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GSISSHJobSubmission(GSISSHJobSubmission other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetJobSubmissionDataID()) {
+ this.jobSubmissionDataID = other.jobSubmissionDataID;
+ }
+ if (other.isSetResourceJobManager()) {
+ this.resourceJobManager = other.resourceJobManager;
+ }
+ this.sshPort = other.sshPort;
+ if (other.isSetExports()) {
+ Set<String> __this__exports = new HashSet<String>(other.exports);
+ this.exports = __this__exports;
+ }
+ if (other.isSetPreJobCommands()) {
+ List<String> __this__preJobCommands = new ArrayList<String>(other.preJobCommands);
+ this.preJobCommands = __this__preJobCommands;
+ }
+ if (other.isSetPostJobCommands()) {
+ List<String> __this__postJobCommands = new ArrayList<String>(other.postJobCommands);
+ this.postJobCommands = __this__postJobCommands;
+ }
+ if (other.isSetInstalledPath()) {
+ this.installedPath = other.installedPath;
+ }
+ if (other.isSetMonitorMode()) {
+ this.monitorMode = other.monitorMode;
+ }
+ }
+
+ public GSISSHJobSubmission deepCopy() {
+ return new GSISSHJobSubmission(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
+
+ this.resourceJobManager = null;
+ this.sshPort = 22;
+
+ this.exports = null;
+ this.preJobCommands = null;
+ this.postJobCommands = null;
+ this.installedPath = null;
+ this.monitorMode = null;
+ }
+
+ public String getJobSubmissionDataID() {
+ return this.jobSubmissionDataID;
+ }
+
+ public void setJobSubmissionDataID(String jobSubmissionDataID) {
+ this.jobSubmissionDataID = jobSubmissionDataID;
+ }
+
+ public void unsetJobSubmissionDataID() {
+ this.jobSubmissionDataID = null;
+ }
+
+ /** Returns true if field jobSubmissionDataID is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobSubmissionDataID() {
+ return this.jobSubmissionDataID != null;
+ }
+
+ public void setJobSubmissionDataIDIsSet(boolean value) {
+ if (!value) {
+ this.jobSubmissionDataID = null;
+ }
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public ResourceJobManager getResourceJobManager() {
+ return this.resourceJobManager;
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public void setResourceJobManager(ResourceJobManager resourceJobManager) {
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ public void unsetResourceJobManager() {
+ this.resourceJobManager = null;
+ }
+
+ /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
+ public boolean isSetResourceJobManager() {
+ return this.resourceJobManager != null;
+ }
+
+ public void setResourceJobManagerIsSet(boolean value) {
+ if (!value) {
+ this.resourceJobManager = null;
+ }
+ }
+
+ public int getSshPort() {
+ return this.sshPort;
+ }
+
+ public void setSshPort(int sshPort) {
+ this.sshPort = sshPort;
+ setSshPortIsSet(true);
+ }
+
+ public void unsetSshPort() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSHPORT_ISSET_ID);
+ }
+
+ /** Returns true if field sshPort is set (has been assigned a value) and false otherwise */
+ public boolean isSetSshPort() {
+ return EncodingUtils.testBit(__isset_bitfield, __SSHPORT_ISSET_ID);
+ }
+
+ public void setSshPortIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
+ }
+
+ public int getExportsSize() {
+ return (this.exports == null) ? 0 : this.exports.size();
+ }
+
+ public java.util.Iterator<String> getExportsIterator() {
+ return (this.exports == null) ? null : this.exports.iterator();
+ }
+
+ public void addToExports(String elem) {
+ if (this.exports == null) {
+ this.exports = new HashSet<String>();
+ }
+ this.exports.add(elem);
+ }
+
+ public Set<String> getExports() {
+ return this.exports;
+ }
+
+ public void setExports(Set<String> exports) {
+ this.exports = exports;
+ }
+
+ public void unsetExports() {
+ this.exports = null;
+ }
+
+ /** Returns true if field exports is set (has been assigned a value) and false otherwise */
+ public boolean isSetExports() {
+ return this.exports != null;
+ }
+
+ public void setExportsIsSet(boolean value) {
+ if (!value) {
+ this.exports = null;
+ }
+ }
+
+ public int getPreJobCommandsSize() {
+ return (this.preJobCommands == null) ? 0 : this.preJobCommands.size();
+ }
+
+ public java.util.Iterator<String> getPreJobCommandsIterator() {
+ return (this.preJobCommands == null) ? null : this.preJobCommands.iterator();
+ }
+
+ public void addToPreJobCommands(String elem) {
+ if (this.preJobCommands == null) {
+ this.preJobCommands = new ArrayList<String>();
+ }
+ this.preJobCommands.add(elem);
+ }
+
+ public List<String> getPreJobCommands() {
+ return this.preJobCommands;
+ }
+
+ public void setPreJobCommands(List<String> preJobCommands) {
+ this.preJobCommands = preJobCommands;
+ }
+
+ public void unsetPreJobCommands() {
+ this.preJobCommands = null;
+ }
+
+ /** Returns true if field preJobCommands is set (has been assigned a value) and false otherwise */
+ public boolean isSetPreJobCommands() {
+ return this.preJobCommands != null;
+ }
+
+ public void setPreJobCommandsIsSet(boolean value) {
+ if (!value) {
+ this.preJobCommands = null;
+ }
+ }
+
+ public int getPostJobCommandsSize() {
+ return (this.postJobCommands == null) ? 0 : this.postJobCommands.size();
+ }
+
+ public java.util.Iterator<String> getPostJobCommandsIterator() {
+ return (this.postJobCommands == null) ? null : this.postJobCommands.iterator();
+ }
+
+ public void addToPostJobCommands(String elem) {
+ if (this.postJobCommands == null) {
+ this.postJobCommands = new ArrayList<String>();
+ }
+ this.postJobCommands.add(elem);
+ }
+
+ public List<String> getPostJobCommands() {
+ return this.postJobCommands;
+ }
+
+ public void setPostJobCommands(List<String> postJobCommands) {
+ this.postJobCommands = postJobCommands;
+ }
+
+ public void unsetPostJobCommands() {
+ this.postJobCommands = null;
+ }
+
+ /** Returns true if field postJobCommands is set (has been assigned a value) and false otherwise */
+ public boolean isSetPostJobCommands() {
+ return this.postJobCommands != null;
+ }
+
+ public void setPostJobCommandsIsSet(boolean value) {
+ if (!value) {
+ this.postJobCommands = null;
+ }
+ }
+
+ public String getInstalledPath() {
+ return this.installedPath;
+ }
+
+ public void setInstalledPath(String installedPath) {
+ this.installedPath = installedPath;
+ }
+
+ public void unsetInstalledPath() {
+ this.installedPath = null;
+ }
+
+ /** Returns true if field installedPath is set (has been assigned a value) and false otherwise */
+ public boolean isSetInstalledPath() {
+ return this.installedPath != null;
+ }
+
+ public void setInstalledPathIsSet(boolean value) {
+ if (!value) {
+ this.installedPath = null;
+ }
+ }
+
+ public String getMonitorMode() {
+ return this.monitorMode;
+ }
+
+ public void setMonitorMode(String monitorMode) {
+ this.monitorMode = monitorMode;
+ }
+
+ public void unsetMonitorMode() {
+ this.monitorMode = null;
+ }
+
+ /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */
+ public boolean isSetMonitorMode() {
+ return this.monitorMode != null;
+ }
+
+ public void setMonitorModeIsSet(boolean value) {
+ if (!value) {
+ this.monitorMode = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_SUBMISSION_DATA_ID:
+ if (value == null) {
+ unsetJobSubmissionDataID();
+ } else {
+ setJobSubmissionDataID((String)value);
+ }
+ break;
+
+ case RESOURCE_JOB_MANAGER:
+ if (value == null) {
+ unsetResourceJobManager();
+ } else {
+ setResourceJobManager((ResourceJobManager)value);
+ }
+ break;
+
+ case SSH_PORT:
+ if (value == null) {
+ unsetSshPort();
+ } else {
+ setSshPort((Integer)value);
+ }
+ break;
+
+ case EXPORTS:
+ if (value == null) {
+ unsetExports();
+ } else {
+ setExports((Set<String>)value);
+ }
+ break;
+
+ case PRE_JOB_COMMANDS:
+ if (value == null) {
+ unsetPreJobCommands();
+ } else {
+ setPreJobCommands((List<String>)value);
+ }
+ break;
+
+ case POST_JOB_COMMANDS:
+ if (value == null) {
+ unsetPostJobCommands();
+ } else {
+ setPostJobCommands((List<String>)value);
+ }
+ break;
+
+ case INSTALLED_PATH:
+ if (value == null) {
+ unsetInstalledPath();
+ } else {
+ setInstalledPath((String)value);
+ }
+ break;
+
+ case MONITOR_MODE:
+ if (value == null) {
+ unsetMonitorMode();
+ } else {
+ setMonitorMode((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_SUBMISSION_DATA_ID:
+ return getJobSubmissionDataID();
+
+ case RESOURCE_JOB_MANAGER:
+ return getResourceJobManager();
+
+ case SSH_PORT:
+ return Integer.valueOf(getSshPort());
+
+ case EXPORTS:
+ return getExports();
+
+ case PRE_JOB_COMMANDS:
+ return getPreJobCommands();
+
+ case POST_JOB_COMMANDS:
+ return getPostJobCommands();
+
+ case INSTALLED_PATH:
+ return getInstalledPath();
+
+ case MONITOR_MODE:
+ return getMonitorMode();
+
+ }
+ 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 JOB_SUBMISSION_DATA_ID:
+ return isSetJobSubmissionDataID();
+ case RESOURCE_JOB_MANAGER:
+ return isSetResourceJobManager();
+ case SSH_PORT:
+ return isSetSshPort();
+ case EXPORTS:
+ return isSetExports();
+ case PRE_JOB_COMMANDS:
+ return isSetPreJobCommands();
+ case POST_JOB_COMMANDS:
+ return isSetPostJobCommands();
+ case INSTALLED_PATH:
+ return isSetInstalledPath();
+ case MONITOR_MODE:
+ return isSetMonitorMode();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GSISSHJobSubmission)
+ return this.equals((GSISSHJobSubmission)that);
+ return false;
+ }
+
+ public boolean equals(GSISSHJobSubmission that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobSubmissionDataID = true && this.isSetJobSubmissionDataID();
+ boolean that_present_jobSubmissionDataID = true && that.isSetJobSubmissionDataID();
+ if (this_present_jobSubmissionDataID || that_present_jobSubmissionDataID) {
+ if (!(this_present_jobSubmissionDataID && that_present_jobSubmissionDataID))
+ return false;
+ if (!this.jobSubmissionDataID.equals(that.jobSubmissionDataID))
+ return false;
+ }
+
+ boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
+ boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
+ if (this_present_resourceJobManager || that_present_resourceJobManager) {
+ if (!(this_present_resourceJobManager && that_present_resourceJobManager))
+ return false;
+ if (!this.resourceJobManager.equals(that.resourceJobManager))
+ return false;
+ }
+
+ boolean this_present_sshPort = true && this.isSetSshPort();
+ boolean that_present_sshPort = true && that.isSetSshPort();
+ if (this_present_sshPort || that_present_sshPort) {
+ if (!(this_present_sshPort && that_present_sshPort))
+ return false;
+ if (this.sshPort != that.sshPort)
+ return false;
+ }
+
+ boolean this_present_exports = true && this.isSetExports();
+ boolean that_present_exports = true && that.isSetExports();
+ if (this_present_exports || that_present_exports) {
+ if (!(this_present_exports && that_present_exports))
+ return false;
+ if (!this.exports.equals(that.exports))
+ return false;
+ }
+
+ boolean this_present_preJobCommands = true && this.isSetPreJobCommands();
+ boolean that_present_preJobCommands = true && that.isSetPreJobCommands();
+ if (this_present_preJobCommands || that_present_preJobCommands) {
+ if (!(this_present_preJobCommands && that_present_preJobCommands))
+ return false;
+ if (!this.preJobCommands.equals(that.preJobCommands))
+ return false;
+ }
+
+ boolean this_present_postJobCommands = true && this.isSetPostJobCommands();
+ boolean that_present_postJobCommands = true && that.isSetPostJobCommands();
+ if (this_present_postJobCommands || that_present_postJobCommands) {
+ if (!(this_present_postJobCommands && that_present_postJobCommands))
+ return false;
+ if (!this.postJobCommands.equals(that.postJobCommands))
+ return false;
+ }
+
+ boolean this_present_installedPath = true && this.isSetInstalledPath();
+ boolean that_present_installedPath = true && that.isSetInstalledPath();
+ if (this_present_installedPath || that_present_installedPath) {
+ if (!(this_present_installedPath && that_present_installedPath))
+ return false;
+ if (!this.installedPath.equals(that.installedPath))
+ return false;
+ }
+
+ boolean this_present_monitorMode = true && this.isSetMonitorMode();
+ boolean that_present_monitorMode = true && that.isSetMonitorMode();
+ if (this_present_monitorMode || that_present_monitorMode) {
+ if (!(this_present_monitorMode && that_present_monitorMode))
+ return false;
+ if (!this.monitorMode.equals(that.monitorMode))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(GSISSHJobSubmission other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobSubmissionDataID()).compareTo(other.isSetJobSubmissionDataID());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobSubmissionDataID()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionDataID, other.jobSubmissionDataID);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResourceJobManager()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSshPort()).compareTo(other.isSetSshPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSshPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshPort, other.sshPort);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExports()).compareTo(other.isSetExports());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExports()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exports, other.exports);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPreJobCommands()).compareTo(other.isSetPreJobCommands());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPreJobCommands()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.preJobCommands, other.preJobCommands);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPostJobCommands()).compareTo(other.isSetPostJobCommands());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPostJobCommands()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.postJobCommands, other.postJobCommands);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetInstalledPath()).compareTo(other.isSetInstalledPath());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetInstalledPath()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.installedPath, other.installedPath);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMonitorMode()).compareTo(other.isSetMonitorMode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMonitorMode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode);
+ 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("GSISSHJobSubmission(");
+ boolean first = true;
+
+ sb.append("jobSubmissionDataID:");
+ if (this.jobSubmissionDataID == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobSubmissionDataID);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("resourceJobManager:");
+ if (this.resourceJobManager == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.resourceJobManager);
+ }
+ first = false;
+ if (isSetSshPort()) {
+ if (!first) sb.append(", ");
+ sb.append("sshPort:");
+ sb.append(this.sshPort);
+ first = false;
+ }
+ if (isSetExports()) {
+ if (!first) sb.append(", ");
+ sb.append("exports:");
+ if (this.exports == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.exports);
+ }
+ first = false;
+ }
+ if (isSetPreJobCommands()) {
+ if (!first) sb.append(", ");
+ sb.append("preJobCommands:");
+ if (this.preJobCommands == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.preJobCommands);
+ }
+ first = false;
+ }
+ if (isSetPostJobCommands()) {
+ if (!first) sb.append(", ");
+ sb.append("postJobCommands:");
+ if (this.postJobCommands == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.postJobCommands);
+ }
+ first = false;
+ }
+ if (isSetInstalledPath()) {
+ if (!first) sb.append(", ");
+ sb.append("installedPath:");
+ if (this.installedPath == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.installedPath);
+ }
+ first = false;
+ }
+ if (isSetMonitorMode()) {
+ if (!first) sb.append(", ");
+ sb.append("monitorMode:");
+ if (this.monitorMode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.monitorMode);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetJobSubmissionDataID()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionDataID' is unset! Struct:" + toString());
+ }
+
+ if (!isSetResourceJobManager()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
+ }
+
+ // 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 GSISSHJobSubmissionStandardSchemeFactory implements SchemeFactory {
+ public GSISSHJobSubmissionStandardScheme getScheme() {
+ return new GSISSHJobSubmissionStandardScheme();
+ }
+ }
+
+ private static class GSISSHJobSubmissionStandardScheme extends StandardScheme<GSISSHJobSubmission> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GSISSHJobSubmission 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: // JOB_SUBMISSION_DATA_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobSubmissionDataID = iprot.readString();
+ struct.setJobSubmissionDataIDIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // RESOURCE_JOB_MANAGER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SSH_PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.sshPort = iprot.readI32();
+ struct.setSshPortIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // EXPORTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+ {
+ org.apache.thrift.protocol.TSet _set16 = iprot.readSetBegin();
+ struct.exports = new HashSet<String>(2*_set16.size);
+ for (int _i17 = 0; _i17 < _set16.size; ++_i17)
+ {
+ String _elem18;
+ _elem18 = iprot.readString();
+ struct.exports.add(_elem18);
+ }
+ iprot.readSetEnd();
+ }
+ struct.setExportsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // PRE_JOB_COMMANDS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list19 = iprot.readListBegin();
+ struct.preJobCommands = new ArrayList<String>(_list19.size);
+ for (int _i20 = 0; _i20 < _list19.size; ++_i20)
+ {
+ String _elem21;
+ _elem21 = iprot.readString();
+ struct.preJobCommands.add(_elem21);
+ }
+ iprot.readListEnd();
+ }
+ struct.setPreJobCommandsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // POST_JOB_COMMANDS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
+ struct.postJobCommands = new ArrayList<String>(_list22.size);
+ for (int _i23 = 0; _i23 < _list22.size; ++_i23)
+ {
+ String _elem24;
+ _elem24 = iprot.readString();
+ struct.postJobCommands.add(_elem24);
+ }
+ iprot.readListEnd();
+ }
+ struct.setPostJobCommandsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // INSTALLED_PATH
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.installedPath = iprot.readString();
+ struct.setInstalledPathIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // MONITOR_MODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.monitorMode = iprot.readString();
+ struct.setMonitorModeIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobSubmissionDataID != null) {
+ oprot.writeFieldBegin(JOB_SUBMISSION_DATA_ID_FIELD_DESC);
+ oprot.writeString(struct.jobSubmissionDataID);
+ oprot.writeFieldEnd();
+ }
+ if (struct.resourceJobManager != null) {
+ oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetSshPort()) {
+ oprot.writeFieldBegin(SSH_PORT_FIELD_DESC);
+ oprot.writeI32(struct.sshPort);
+ oprot.writeFieldEnd();
+ }
+ if (struct.exports != null) {
+ if (struct.isSetExports()) {
+ oprot.writeFieldBegin(EXPORTS_FIELD_DESC);
+ {
+ oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.exports.size()));
+ for (String _iter25 : struct.exports)
+ {
+ oprot.writeString(_iter25);
+ }
+ oprot.writeSetEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.preJobCommands != null) {
+ if (struct.isSetPreJobCommands()) {
+ oprot.writeFieldBegin(PRE_JOB_COMMANDS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.preJobCommands.size()));
+ for (String _iter26 : struct.preJobCommands)
+ {
+ oprot.writeString(_iter26);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.postJobCommands != null) {
+ if (struct.isSetPostJobCommands()) {
+ oprot.writeFieldBegin(POST_JOB_COMMANDS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.postJobCommands.size()));
+ for (String _iter27 : struct.postJobCommands)
+ {
+ oprot.writeString(_iter27);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.installedPath != null) {
+ if (struct.isSetInstalledPath()) {
+ oprot.writeFieldBegin(INSTALLED_PATH_FIELD_DESC);
+ oprot.writeString(struct.installedPath);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.monitorMode != null) {
+ if (struct.isSetMonitorMode()) {
+ oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC);
+ oprot.writeString(struct.monitorMode);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GSISSHJobSubmissionTupleSchemeFactory implements SchemeFactory {
+ public GSISSHJobSubmissionTupleScheme getScheme() {
+ return new GSISSHJobSubmissionTupleScheme();
+ }
+ }
+
+ private static class GSISSHJobSubmissionTupleScheme extends TupleScheme<GSISSHJobSubmission> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.jobSubmissionDataID);
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetSshPort()) {
+ optionals.set(0);
+ }
+ if (struct.isSetExports()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPreJobCommands()) {
+ optionals.set(2);
+ }
+ if (struct.isSetPostJobCommands()) {
+ optionals.set(3);
+ }
+ if (struct.isSetInstalledPath()) {
+ optionals.set(4);
+ }
+ if (struct.isSetMonitorMode()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
+ if (struct.isSetSshPort()) {
+ oprot.writeI32(struct.sshPort);
+ }
+ if (struct.isSetExports()) {
+ {
+ oprot.writeI32(struct.exports.size());
+ for (String _iter28 : struct.exports)
+ {
+ oprot.writeString(_iter28);
+ }
+ }
+ }
+ if (struct.isSetPreJobCommands()) {
+ {
+ oprot.writeI32(struct.preJobCommands.size());
+ for (String _iter29 : struct.preJobCommands)
+ {
+ oprot.writeString(_iter29);
+ }
+ }
+ }
+ if (struct.isSetPostJobCommands()) {
+ {
+ oprot.writeI32(struct.postJobCommands.size());
+ for (String _iter30 : struct.postJobCommands)
+ {
+ oprot.writeString(_iter30);
+ }
+ }
+ }
+ if (struct.isSetInstalledPath()) {
+ oprot.writeString(struct.installedPath);
+ }
+ if (struct.isSetMonitorMode()) {
+ oprot.writeString(struct.monitorMode);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GSISSHJobSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobSubmissionDataID = iprot.readString();
+ struct.setJobSubmissionDataIDIsSet(true);
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ BitSet incoming = iprot.readBitSet(6);
+ if (incoming.get(0)) {
+ struct.sshPort = iprot.readI32();
+ struct.setSshPortIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TSet _set31 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.exports = new HashSet<String>(2*_set31.size);
+ for (int _i32 = 0; _i32 < _set31.size; ++_i32)
+ {
+ String _elem33;
+ _elem33 = iprot.readString();
+ struct.exports.add(_elem33);
+ }
+ }
+ struct.setExportsIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TList _list34 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.preJobCommands = new ArrayList<String>(_list34.size);
+ for (int _i35 = 0; _i35 < _list34.size; ++_i35)
+ {
+ String _elem36;
+ _elem36 = iprot.readString();
+ struct.preJobCommands.add(_elem36);
+ }
+ }
+ struct.setPreJobCommandsIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.postJobCommands = new ArrayList<String>(_list37.size);
+ for (int _i38 = 0; _i38 < _list37.size; ++_i38)
+ {
+ String _elem39;
+ _elem39 = iprot.readString();
+ struct.postJobCommands.add(_elem39);
+ }
+ }
+ struct.setPostJobCommandsIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.installedPath = iprot.readString();
+ struct.setInstalledPathIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.monitorMode = iprot.readString();
+ struct.setMonitorModeIsSet(true);
+ }
+ }
+ }
+
+}
+
[03/10] Committed generated classes for thrift models - AIRAVATA-1203
Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALDataMovement.java
new file mode 100644
index 0000000..3a9e65d
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALDataMovement.java
@@ -0,0 +1,407 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * LOCAL
+ *
+ * alternativeSCPHostName:
+ * If the login to scp is different than the hostname itself, specify it here
+ *
+ * sshPort:
+ * If a non-defualt port needs to used, specify it.
+ */
+@SuppressWarnings("all") public class LOCALDataMovement implements org.apache.thrift.TBase<LOCALDataMovement, LOCALDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<LOCALDataMovement> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LOCALDataMovement");
+
+ private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LOCALDataMovementStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LOCALDataMovementTupleSchemeFactory());
+ }
+
+ private String dataMovementInterfaceId; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ DATA_MOVEMENT_INTERFACE_ID((short)1, "dataMovementInterfaceId");
+
+ 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: // DATA_MOVEMENT_INTERFACE_ID
+ return DATA_MOVEMENT_INTERFACE_ID;
+ 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.DATA_MOVEMENT_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LOCALDataMovement.class, metaDataMap);
+ }
+
+ public LOCALDataMovement() {
+ this.dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public LOCALDataMovement(
+ String dataMovementInterfaceId)
+ {
+ this();
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public LOCALDataMovement(LOCALDataMovement other) {
+ if (other.isSetDataMovementInterfaceId()) {
+ this.dataMovementInterfaceId = other.dataMovementInterfaceId;
+ }
+ }
+
+ public LOCALDataMovement deepCopy() {
+ return new LOCALDataMovement(this);
+ }
+
+ @Override
+ public void clear() {
+ this.dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public String getDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId;
+ }
+
+ public void setDataMovementInterfaceId(String dataMovementInterfaceId) {
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ }
+
+ public void unsetDataMovementInterfaceId() {
+ this.dataMovementInterfaceId = null;
+ }
+
+ /** Returns true if field dataMovementInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId != null;
+ }
+
+ public void setDataMovementInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.dataMovementInterfaceId = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ if (value == null) {
+ unsetDataMovementInterfaceId();
+ } else {
+ setDataMovementInterfaceId((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ return getDataMovementInterfaceId();
+
+ }
+ 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 DATA_MOVEMENT_INTERFACE_ID:
+ return isSetDataMovementInterfaceId();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof LOCALDataMovement)
+ return this.equals((LOCALDataMovement)that);
+ return false;
+ }
+
+ public boolean equals(LOCALDataMovement that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_dataMovementInterfaceId = true && this.isSetDataMovementInterfaceId();
+ boolean that_present_dataMovementInterfaceId = true && that.isSetDataMovementInterfaceId();
+ if (this_present_dataMovementInterfaceId || that_present_dataMovementInterfaceId) {
+ if (!(this_present_dataMovementInterfaceId && that_present_dataMovementInterfaceId))
+ return false;
+ if (!this.dataMovementInterfaceId.equals(that.dataMovementInterfaceId))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(LOCALDataMovement other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDataMovementInterfaceId()).compareTo(other.isSetDataMovementInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataMovementInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementInterfaceId, other.dataMovementInterfaceId);
+ 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("LOCALDataMovement(");
+ boolean first = true;
+
+ sb.append("dataMovementInterfaceId:");
+ if (this.dataMovementInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataMovementInterfaceId);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetDataMovementInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementInterfaceId' is unset! Struct:" + toString());
+ }
+
+ // 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 LOCALDataMovementStandardSchemeFactory implements SchemeFactory {
+ public LOCALDataMovementStandardScheme getScheme() {
+ return new LOCALDataMovementStandardScheme();
+ }
+ }
+
+ private static class LOCALDataMovementStandardScheme extends StandardScheme<LOCALDataMovement> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LOCALDataMovement 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: // DATA_MOVEMENT_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, LOCALDataMovement struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.dataMovementInterfaceId != null) {
+ oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.dataMovementInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LOCALDataMovementTupleSchemeFactory implements SchemeFactory {
+ public LOCALDataMovementTupleScheme getScheme() {
+ return new LOCALDataMovementTupleScheme();
+ }
+ }
+
+ private static class LOCALDataMovementTupleScheme extends TupleScheme<LOCALDataMovement> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LOCALDataMovement struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.dataMovementInterfaceId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LOCALDataMovement struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
new file mode 100644
index 0000000..992dc00
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/LOCALSubmission.java
@@ -0,0 +1,620 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Locally Fork Jobs as OS processes
+ *
+ * alternativeSSHHostName:
+ * If the login to ssh is different than the hostname itself, specify it here
+ *
+ * sshPort:
+ * If a non-defualt port needs to used, specify it.
+ */
+@SuppressWarnings("all") public class LOCALSubmission implements org.apache.thrift.TBase<LOCALSubmission, LOCALSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<LOCALSubmission> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LOCALSubmission");
+
+ private static final org.apache.thrift.protocol.TField JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobSubmissionInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField MONITORING_MECHANISM_FIELD_DESC = new org.apache.thrift.protocol.TField("monitoringMechanism", org.apache.thrift.protocol.TType.STRING, (short)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LOCALSubmissionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LOCALSubmissionTupleSchemeFactory());
+ }
+
+ private String jobSubmissionInterfaceId; // required
+ private ResourceJobManager resourceJobManager; // required
+ private String monitoringMechanism; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ JOB_SUBMISSION_INTERFACE_ID((short)1, "jobSubmissionInterfaceId"),
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ RESOURCE_JOB_MANAGER((short)3, "resourceJobManager"),
+ MONITORING_MECHANISM((short)6, "monitoringMechanism");
+
+ 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: // JOB_SUBMISSION_INTERFACE_ID
+ return JOB_SUBMISSION_INTERFACE_ID;
+ case 3: // RESOURCE_JOB_MANAGER
+ return RESOURCE_JOB_MANAGER;
+ case 6: // MONITORING_MECHANISM
+ return MONITORING_MECHANISM;
+ 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 _Fields optionals[] = {_Fields.MONITORING_MECHANISM};
+ 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.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RESOURCE_JOB_MANAGER, new org.apache.thrift.meta_data.FieldMetaData("resourceJobManager", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ResourceJobManager.class)));
+ tmpMap.put(_Fields.MONITORING_MECHANISM, new org.apache.thrift.meta_data.FieldMetaData("monitoringMechanism", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LOCALSubmission.class, metaDataMap);
+ }
+
+ public LOCALSubmission() {
+ this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ }
+
+ public LOCALSubmission(
+ String jobSubmissionInterfaceId,
+ ResourceJobManager resourceJobManager)
+ {
+ this();
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public LOCALSubmission(LOCALSubmission other) {
+ if (other.isSetJobSubmissionInterfaceId()) {
+ this.jobSubmissionInterfaceId = other.jobSubmissionInterfaceId;
+ }
+ if (other.isSetResourceJobManager()) {
+ this.resourceJobManager = other.resourceJobManager;
+ }
+ if (other.isSetMonitoringMechanism()) {
+ this.monitoringMechanism = other.monitoringMechanism;
+ }
+ }
+
+ public LOCALSubmission deepCopy() {
+ return new LOCALSubmission(this);
+ }
+
+ @Override
+ public void clear() {
+ this.jobSubmissionInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.resourceJobManager = null;
+ this.monitoringMechanism = null;
+ }
+
+ public String getJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId;
+ }
+
+ public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) {
+ this.jobSubmissionInterfaceId = jobSubmissionInterfaceId;
+ }
+
+ public void unsetJobSubmissionInterfaceId() {
+ this.jobSubmissionInterfaceId = null;
+ }
+
+ /** Returns true if field jobSubmissionInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetJobSubmissionInterfaceId() {
+ return this.jobSubmissionInterfaceId != null;
+ }
+
+ public void setJobSubmissionInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.jobSubmissionInterfaceId = null;
+ }
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public ResourceJobManager getResourceJobManager() {
+ return this.resourceJobManager;
+ }
+
+ /**
+ *
+ * @see ResourceJobManager
+ */
+ public void setResourceJobManager(ResourceJobManager resourceJobManager) {
+ this.resourceJobManager = resourceJobManager;
+ }
+
+ public void unsetResourceJobManager() {
+ this.resourceJobManager = null;
+ }
+
+ /** Returns true if field resourceJobManager is set (has been assigned a value) and false otherwise */
+ public boolean isSetResourceJobManager() {
+ return this.resourceJobManager != null;
+ }
+
+ public void setResourceJobManagerIsSet(boolean value) {
+ if (!value) {
+ this.resourceJobManager = null;
+ }
+ }
+
+ public String getMonitoringMechanism() {
+ return this.monitoringMechanism;
+ }
+
+ public void setMonitoringMechanism(String monitoringMechanism) {
+ this.monitoringMechanism = monitoringMechanism;
+ }
+
+ public void unsetMonitoringMechanism() {
+ this.monitoringMechanism = null;
+ }
+
+ /** Returns true if field monitoringMechanism is set (has been assigned a value) and false otherwise */
+ public boolean isSetMonitoringMechanism() {
+ return this.monitoringMechanism != null;
+ }
+
+ public void setMonitoringMechanismIsSet(boolean value) {
+ if (!value) {
+ this.monitoringMechanism = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ if (value == null) {
+ unsetJobSubmissionInterfaceId();
+ } else {
+ setJobSubmissionInterfaceId((String)value);
+ }
+ break;
+
+ case RESOURCE_JOB_MANAGER:
+ if (value == null) {
+ unsetResourceJobManager();
+ } else {
+ setResourceJobManager((ResourceJobManager)value);
+ }
+ break;
+
+ case MONITORING_MECHANISM:
+ if (value == null) {
+ unsetMonitoringMechanism();
+ } else {
+ setMonitoringMechanism((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case JOB_SUBMISSION_INTERFACE_ID:
+ return getJobSubmissionInterfaceId();
+
+ case RESOURCE_JOB_MANAGER:
+ return getResourceJobManager();
+
+ case MONITORING_MECHANISM:
+ return getMonitoringMechanism();
+
+ }
+ 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 JOB_SUBMISSION_INTERFACE_ID:
+ return isSetJobSubmissionInterfaceId();
+ case RESOURCE_JOB_MANAGER:
+ return isSetResourceJobManager();
+ case MONITORING_MECHANISM:
+ return isSetMonitoringMechanism();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof LOCALSubmission)
+ return this.equals((LOCALSubmission)that);
+ return false;
+ }
+
+ public boolean equals(LOCALSubmission that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId();
+ boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId();
+ if (this_present_jobSubmissionInterfaceId || that_present_jobSubmissionInterfaceId) {
+ if (!(this_present_jobSubmissionInterfaceId && that_present_jobSubmissionInterfaceId))
+ return false;
+ if (!this.jobSubmissionInterfaceId.equals(that.jobSubmissionInterfaceId))
+ return false;
+ }
+
+ boolean this_present_resourceJobManager = true && this.isSetResourceJobManager();
+ boolean that_present_resourceJobManager = true && that.isSetResourceJobManager();
+ if (this_present_resourceJobManager || that_present_resourceJobManager) {
+ if (!(this_present_resourceJobManager && that_present_resourceJobManager))
+ return false;
+ if (!this.resourceJobManager.equals(that.resourceJobManager))
+ return false;
+ }
+
+ boolean this_present_monitoringMechanism = true && this.isSetMonitoringMechanism();
+ boolean that_present_monitoringMechanism = true && that.isSetMonitoringMechanism();
+ if (this_present_monitoringMechanism || that_present_monitoringMechanism) {
+ if (!(this_present_monitoringMechanism && that_present_monitoringMechanism))
+ return false;
+ if (!this.monitoringMechanism.equals(that.monitoringMechanism))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(LOCALSubmission other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetJobSubmissionInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobSubmissionInterfaceId, other.jobSubmissionInterfaceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResourceJobManager()).compareTo(other.isSetResourceJobManager());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResourceJobManager()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceJobManager, other.resourceJobManager);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMonitoringMechanism()).compareTo(other.isSetMonitoringMechanism());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMonitoringMechanism()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitoringMechanism, other.monitoringMechanism);
+ 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("LOCALSubmission(");
+ boolean first = true;
+
+ sb.append("jobSubmissionInterfaceId:");
+ if (this.jobSubmissionInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.jobSubmissionInterfaceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("resourceJobManager:");
+ if (this.resourceJobManager == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.resourceJobManager);
+ }
+ first = false;
+ if (isSetMonitoringMechanism()) {
+ if (!first) sb.append(", ");
+ sb.append("monitoringMechanism:");
+ if (this.monitoringMechanism == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.monitoringMechanism);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetJobSubmissionInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobSubmissionInterfaceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetResourceJobManager()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'resourceJobManager' is unset! Struct:" + toString());
+ }
+
+ // 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 LOCALSubmissionStandardSchemeFactory implements SchemeFactory {
+ public LOCALSubmissionStandardScheme getScheme() {
+ return new LOCALSubmissionStandardScheme();
+ }
+ }
+
+ private static class LOCALSubmissionStandardScheme extends StandardScheme<LOCALSubmission> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LOCALSubmission 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: // JOB_SUBMISSION_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // RESOURCE_JOB_MANAGER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // MONITORING_MECHANISM
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.monitoringMechanism = iprot.readString();
+ struct.setMonitoringMechanismIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, LOCALSubmission struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.jobSubmissionInterfaceId != null) {
+ oprot.writeFieldBegin(JOB_SUBMISSION_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.resourceJobManager != null) {
+ oprot.writeFieldBegin(RESOURCE_JOB_MANAGER_FIELD_DESC);
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.monitoringMechanism != null) {
+ if (struct.isSetMonitoringMechanism()) {
+ oprot.writeFieldBegin(MONITORING_MECHANISM_FIELD_DESC);
+ oprot.writeString(struct.monitoringMechanism);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LOCALSubmissionTupleSchemeFactory implements SchemeFactory {
+ public LOCALSubmissionTupleScheme getScheme() {
+ return new LOCALSubmissionTupleScheme();
+ }
+ }
+
+ private static class LOCALSubmissionTupleScheme extends TupleScheme<LOCALSubmission> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LOCALSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.jobSubmissionInterfaceId);
+ oprot.writeI32(struct.resourceJobManager.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetMonitoringMechanism()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetMonitoringMechanism()) {
+ oprot.writeString(struct.monitoringMechanism);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LOCALSubmission struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.jobSubmissionInterfaceId = iprot.readString();
+ struct.setJobSubmissionInterfaceIdIsSet(true);
+ struct.resourceJobManager = ResourceJobManager.findByValue(iprot.readI32());
+ struct.setResourceJobManagerIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.monitoringMechanism = iprot.readString();
+ struct.setMonitoringMechanismIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
new file mode 100644
index 0000000..ff4b707
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
@@ -0,0 +1,83 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * Enumeration of local resource job managers supported by Airavata
+ *
+ * FORK:
+ * Forking of commands without any job manager
+ *
+ * PBS:
+ * Job manager supporting the Portal Batch System (PBS) protocol. Some examples include TORQUE, PBSPro, Grid Engine.
+ *
+ * UGE:
+ * Univa Grid Engine, a variation of PBS implementation.
+ *
+ * SLURM:
+ * The Simple Linux Utility for Resource Management is a open source workload manager.
+ *
+ */
+@SuppressWarnings("all") public enum ResourceJobManager implements org.apache.thrift.TEnum {
+ FORK(0),
+ PBS(1),
+ UGE(2),
+ SLURM(3);
+
+ private final int value;
+
+ private ResourceJobManager(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static ResourceJobManager findByValue(int value) {
+ switch (value) {
+ case 0:
+ return FORK;
+ case 1:
+ return PBS;
+ case 2:
+ return UGE;
+ case 3:
+ return SLURM;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/airavata/blob/59a7443a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java
new file mode 100644
index 0000000..1ee0418
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SCPDataMovement.java
@@ -0,0 +1,720 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 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.model.appcatalog.computeresource;
+
+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;
+
+/**
+ * Data Movement through Secured Copy
+ *
+ * alternativeSCPHostName:
+ * If the login to scp is different than the hostname itself, specify it here
+ *
+ * sshPort:
+ * If a non-defualt port needs to used, specify it.
+ */
+@SuppressWarnings("all") public class SCPDataMovement implements org.apache.thrift.TBase<SCPDataMovement, SCPDataMovement._Fields>, java.io.Serializable, Cloneable, Comparable<SCPDataMovement> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SCPDataMovement");
+
+ private static final org.apache.thrift.protocol.TField DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("dataMovementInterfaceId", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SECURITY_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("securityProtocol", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField ALTERNATIVE_SCPHOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("alternativeSCPHostName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", 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 SCPDataMovementStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SCPDataMovementTupleSchemeFactory());
+ }
+
+ private String dataMovementInterfaceId; // required
+ private SecurityProtocol securityProtocol; // required
+ private String alternativeSCPHostName; // optional
+ private int sshPort; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ DATA_MOVEMENT_INTERFACE_ID((short)1, "dataMovementInterfaceId"),
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ SECURITY_PROTOCOL((short)2, "securityProtocol"),
+ ALTERNATIVE_SCPHOST_NAME((short)3, "alternativeSCPHostName"),
+ SSH_PORT((short)4, "sshPort");
+
+ 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: // DATA_MOVEMENT_INTERFACE_ID
+ return DATA_MOVEMENT_INTERFACE_ID;
+ case 2: // SECURITY_PROTOCOL
+ return SECURITY_PROTOCOL;
+ case 3: // ALTERNATIVE_SCPHOST_NAME
+ return ALTERNATIVE_SCPHOST_NAME;
+ case 4: // SSH_PORT
+ return SSH_PORT;
+ 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 __SSHPORT_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.ALTERNATIVE_SCPHOST_NAME,_Fields.SSH_PORT};
+ 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.DATA_MOVEMENT_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("dataMovementInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityProtocol.class)));
+ tmpMap.put(_Fields.ALTERNATIVE_SCPHOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("alternativeSCPHostName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", 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(SCPDataMovement.class, metaDataMap);
+ }
+
+ public SCPDataMovement() {
+ this.dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.sshPort = 22;
+
+ }
+
+ public SCPDataMovement(
+ String dataMovementInterfaceId,
+ SecurityProtocol securityProtocol)
+ {
+ this();
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ this.securityProtocol = securityProtocol;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public SCPDataMovement(SCPDataMovement other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetDataMovementInterfaceId()) {
+ this.dataMovementInterfaceId = other.dataMovementInterfaceId;
+ }
+ if (other.isSetSecurityProtocol()) {
+ this.securityProtocol = other.securityProtocol;
+ }
+ if (other.isSetAlternativeSCPHostName()) {
+ this.alternativeSCPHostName = other.alternativeSCPHostName;
+ }
+ this.sshPort = other.sshPort;
+ }
+
+ public SCPDataMovement deepCopy() {
+ return new SCPDataMovement(this);
+ }
+
+ @Override
+ public void clear() {
+ this.dataMovementInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+
+ this.securityProtocol = null;
+ this.alternativeSCPHostName = null;
+ this.sshPort = 22;
+
+ }
+
+ public String getDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId;
+ }
+
+ public void setDataMovementInterfaceId(String dataMovementInterfaceId) {
+ this.dataMovementInterfaceId = dataMovementInterfaceId;
+ }
+
+ public void unsetDataMovementInterfaceId() {
+ this.dataMovementInterfaceId = null;
+ }
+
+ /** Returns true if field dataMovementInterfaceId is set (has been assigned a value) and false otherwise */
+ public boolean isSetDataMovementInterfaceId() {
+ return this.dataMovementInterfaceId != null;
+ }
+
+ public void setDataMovementInterfaceIdIsSet(boolean value) {
+ if (!value) {
+ this.dataMovementInterfaceId = null;
+ }
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public SecurityProtocol getSecurityProtocol() {
+ return this.securityProtocol;
+ }
+
+ /**
+ *
+ * @see SecurityProtocol
+ */
+ public void setSecurityProtocol(SecurityProtocol securityProtocol) {
+ this.securityProtocol = securityProtocol;
+ }
+
+ public void unsetSecurityProtocol() {
+ this.securityProtocol = null;
+ }
+
+ /** Returns true if field securityProtocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetSecurityProtocol() {
+ return this.securityProtocol != null;
+ }
+
+ public void setSecurityProtocolIsSet(boolean value) {
+ if (!value) {
+ this.securityProtocol = null;
+ }
+ }
+
+ public String getAlternativeSCPHostName() {
+ return this.alternativeSCPHostName;
+ }
+
+ public void setAlternativeSCPHostName(String alternativeSCPHostName) {
+ this.alternativeSCPHostName = alternativeSCPHostName;
+ }
+
+ public void unsetAlternativeSCPHostName() {
+ this.alternativeSCPHostName = null;
+ }
+
+ /** Returns true if field alternativeSCPHostName is set (has been assigned a value) and false otherwise */
+ public boolean isSetAlternativeSCPHostName() {
+ return this.alternativeSCPHostName != null;
+ }
+
+ public void setAlternativeSCPHostNameIsSet(boolean value) {
+ if (!value) {
+ this.alternativeSCPHostName = null;
+ }
+ }
+
+ public int getSshPort() {
+ return this.sshPort;
+ }
+
+ public void setSshPort(int sshPort) {
+ this.sshPort = sshPort;
+ setSshPortIsSet(true);
+ }
+
+ public void unsetSshPort() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSHPORT_ISSET_ID);
+ }
+
+ /** Returns true if field sshPort is set (has been assigned a value) and false otherwise */
+ public boolean isSetSshPort() {
+ return EncodingUtils.testBit(__isset_bitfield, __SSHPORT_ISSET_ID);
+ }
+
+ public void setSshPortIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ if (value == null) {
+ unsetDataMovementInterfaceId();
+ } else {
+ setDataMovementInterfaceId((String)value);
+ }
+ break;
+
+ case SECURITY_PROTOCOL:
+ if (value == null) {
+ unsetSecurityProtocol();
+ } else {
+ setSecurityProtocol((SecurityProtocol)value);
+ }
+ break;
+
+ case ALTERNATIVE_SCPHOST_NAME:
+ if (value == null) {
+ unsetAlternativeSCPHostName();
+ } else {
+ setAlternativeSCPHostName((String)value);
+ }
+ break;
+
+ case SSH_PORT:
+ if (value == null) {
+ unsetSshPort();
+ } else {
+ setSshPort((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DATA_MOVEMENT_INTERFACE_ID:
+ return getDataMovementInterfaceId();
+
+ case SECURITY_PROTOCOL:
+ return getSecurityProtocol();
+
+ case ALTERNATIVE_SCPHOST_NAME:
+ return getAlternativeSCPHostName();
+
+ case SSH_PORT:
+ return Integer.valueOf(getSshPort());
+
+ }
+ 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 DATA_MOVEMENT_INTERFACE_ID:
+ return isSetDataMovementInterfaceId();
+ case SECURITY_PROTOCOL:
+ return isSetSecurityProtocol();
+ case ALTERNATIVE_SCPHOST_NAME:
+ return isSetAlternativeSCPHostName();
+ case SSH_PORT:
+ return isSetSshPort();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof SCPDataMovement)
+ return this.equals((SCPDataMovement)that);
+ return false;
+ }
+
+ public boolean equals(SCPDataMovement that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_dataMovementInterfaceId = true && this.isSetDataMovementInterfaceId();
+ boolean that_present_dataMovementInterfaceId = true && that.isSetDataMovementInterfaceId();
+ if (this_present_dataMovementInterfaceId || that_present_dataMovementInterfaceId) {
+ if (!(this_present_dataMovementInterfaceId && that_present_dataMovementInterfaceId))
+ return false;
+ if (!this.dataMovementInterfaceId.equals(that.dataMovementInterfaceId))
+ return false;
+ }
+
+ boolean this_present_securityProtocol = true && this.isSetSecurityProtocol();
+ boolean that_present_securityProtocol = true && that.isSetSecurityProtocol();
+ if (this_present_securityProtocol || that_present_securityProtocol) {
+ if (!(this_present_securityProtocol && that_present_securityProtocol))
+ return false;
+ if (!this.securityProtocol.equals(that.securityProtocol))
+ return false;
+ }
+
+ boolean this_present_alternativeSCPHostName = true && this.isSetAlternativeSCPHostName();
+ boolean that_present_alternativeSCPHostName = true && that.isSetAlternativeSCPHostName();
+ if (this_present_alternativeSCPHostName || that_present_alternativeSCPHostName) {
+ if (!(this_present_alternativeSCPHostName && that_present_alternativeSCPHostName))
+ return false;
+ if (!this.alternativeSCPHostName.equals(that.alternativeSCPHostName))
+ return false;
+ }
+
+ boolean this_present_sshPort = true && this.isSetSshPort();
+ boolean that_present_sshPort = true && that.isSetSshPort();
+ if (this_present_sshPort || that_present_sshPort) {
+ if (!(this_present_sshPort && that_present_sshPort))
+ return false;
+ if (this.sshPort != that.sshPort)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(SCPDataMovement other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetDataMovementInterfaceId()).compareTo(other.isSetDataMovementInterfaceId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDataMovementInterfaceId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataMovementInterfaceId, other.dataMovementInterfaceId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSecurityProtocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.securityProtocol, other.securityProtocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAlternativeSCPHostName()).compareTo(other.isSetAlternativeSCPHostName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAlternativeSCPHostName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alternativeSCPHostName, other.alternativeSCPHostName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSshPort()).compareTo(other.isSetSshPort());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSshPort()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshPort, other.sshPort);
+ 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("SCPDataMovement(");
+ boolean first = true;
+
+ sb.append("dataMovementInterfaceId:");
+ if (this.dataMovementInterfaceId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dataMovementInterfaceId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("securityProtocol:");
+ if (this.securityProtocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.securityProtocol);
+ }
+ first = false;
+ if (isSetAlternativeSCPHostName()) {
+ if (!first) sb.append(", ");
+ sb.append("alternativeSCPHostName:");
+ if (this.alternativeSCPHostName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.alternativeSCPHostName);
+ }
+ first = false;
+ }
+ if (isSetSshPort()) {
+ if (!first) sb.append(", ");
+ sb.append("sshPort:");
+ sb.append(this.sshPort);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetDataMovementInterfaceId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataMovementInterfaceId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetSecurityProtocol()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'securityProtocol' is unset! Struct:" + toString());
+ }
+
+ // 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 SCPDataMovementStandardSchemeFactory implements SchemeFactory {
+ public SCPDataMovementStandardScheme getScheme() {
+ return new SCPDataMovementStandardScheme();
+ }
+ }
+
+ private static class SCPDataMovementStandardScheme extends StandardScheme<SCPDataMovement> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SCPDataMovement 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: // DATA_MOVEMENT_INTERFACE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // SECURITY_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ALTERNATIVE_SCPHOST_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.alternativeSCPHostName = iprot.readString();
+ struct.setAlternativeSCPHostNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // SSH_PORT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.sshPort = iprot.readI32();
+ struct.setSshPortIsSet(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();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, SCPDataMovement struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.dataMovementInterfaceId != null) {
+ oprot.writeFieldBegin(DATA_MOVEMENT_INTERFACE_ID_FIELD_DESC);
+ oprot.writeString(struct.dataMovementInterfaceId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.securityProtocol != null) {
+ oprot.writeFieldBegin(SECURITY_PROTOCOL_FIELD_DESC);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.alternativeSCPHostName != null) {
+ if (struct.isSetAlternativeSCPHostName()) {
+ oprot.writeFieldBegin(ALTERNATIVE_SCPHOST_NAME_FIELD_DESC);
+ oprot.writeString(struct.alternativeSCPHostName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetSshPort()) {
+ oprot.writeFieldBegin(SSH_PORT_FIELD_DESC);
+ oprot.writeI32(struct.sshPort);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SCPDataMovementTupleSchemeFactory implements SchemeFactory {
+ public SCPDataMovementTupleScheme getScheme() {
+ return new SCPDataMovementTupleScheme();
+ }
+ }
+
+ private static class SCPDataMovementTupleScheme extends TupleScheme<SCPDataMovement> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, SCPDataMovement struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.dataMovementInterfaceId);
+ oprot.writeI32(struct.securityProtocol.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetAlternativeSCPHostName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetSshPort()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetAlternativeSCPHostName()) {
+ oprot.writeString(struct.alternativeSCPHostName);
+ }
+ if (struct.isSetSshPort()) {
+ oprot.writeI32(struct.sshPort);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, SCPDataMovement struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.dataMovementInterfaceId = iprot.readString();
+ struct.setDataMovementInterfaceIdIsSet(true);
+ struct.securityProtocol = SecurityProtocol.findByValue(iprot.readI32());
+ struct.setSecurityProtocolIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.alternativeSCPHostName = iprot.readString();
+ struct.setAlternativeSCPHostNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.sshPort = iprot.readI32();
+ struct.setSshPortIsSet(true);
+ }
+ }
+ }
+
+}
+