You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/10/20 21:03:24 UTC
[17/17] airavata git commit: merge with master
merge with master
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/4d9973e2
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/4d9973e2
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/4d9973e2
Branch: refs/heads/orchestratorTaskBreakdown
Commit: 4d9973e2e2723ac21cbf5beca63fa6df99dea2d1
Parents: 3398ec1
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Tue Oct 20 15:02:20 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Tue Oct 20 15:02:20 2015 -0400
----------------------------------------------------------------------
.../resources/lib/airavata/task_model_types.cpp | 317 +++++++++++++++++--
.../resources/lib/airavata/task_model_types.h | 116 ++++++-
.../resources/lib/Airavata/Model/Task/Types.php | 256 ++++++++++++++-
.../lib/apache/airavata/model/task/ttypes.py | 222 ++++++++++++-
4 files changed, 855 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/4d9973e2/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp
index e0b1a79..8e3842a 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.cpp
@@ -46,6 +46,16 @@ const char* _kTaskTypesNames[] = {
};
const std::map<int, const char*> _TaskTypes_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kTaskTypesValues, _kTaskTypesNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+int _kDataStageTypeValues[] = {
+ DataStageType::INPUT,
+ DataStageType::OUPUT
+};
+const char* _kDataStageTypeNames[] = {
+ "INPUT",
+ "OUPUT"
+};
+const std::map<int, const char*> _DataStageType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kDataStageTypeValues, _kDataStageTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
TaskModel::~TaskModel() throw() {
}
@@ -335,6 +345,10 @@ void DataStagingTaskModel::__set_destination(const std::string& val) {
this->destination = val;
}
+void DataStagingTaskModel::__set_type(const DataStageType::type val) {
+ this->type = val;
+}
+
void DataStagingTaskModel::__set_transferStartTime(const int64_t val) {
this->transferStartTime = val;
__isset.transferStartTime = true;
@@ -350,8 +364,8 @@ void DataStagingTaskModel::__set_transferRate(const std::string& val) {
__isset.transferRate = true;
}
-const char* DataStagingTaskModel::ascii_fingerprint = "3224DD8D1EC3134AB6350703A4B92D60";
-const uint8_t DataStagingTaskModel::binary_fingerprint[16] = {0x32,0x24,0xDD,0x8D,0x1E,0xC3,0x13,0x4A,0xB6,0x35,0x07,0x03,0xA4,0xB9,0x2D,0x60};
+const char* DataStagingTaskModel::ascii_fingerprint = "68560D7ABF8515154C93E0A04DD9CF55";
+const uint8_t DataStagingTaskModel::binary_fingerprint[16] = {0x68,0x56,0x0D,0x7A,0xBF,0x85,0x15,0x15,0x4C,0x93,0xE0,0xA0,0x4D,0xD9,0xCF,0x55};
uint32_t DataStagingTaskModel::read(::apache::thrift::protocol::TProtocol* iprot) {
@@ -366,6 +380,7 @@ uint32_t DataStagingTaskModel::read(::apache::thrift::protocol::TProtocol* iprot
bool isset_source = false;
bool isset_destination = false;
+ bool isset_type = false;
while (true)
{
@@ -392,6 +407,16 @@ uint32_t DataStagingTaskModel::read(::apache::thrift::protocol::TProtocol* iprot
}
break;
case 3:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast3;
+ xfer += iprot->readI32(ecast3);
+ this->type = (DataStageType::type)ecast3;
+ isset_type = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->transferStartTime);
this->__isset.transferStartTime = true;
@@ -399,7 +424,7 @@ uint32_t DataStagingTaskModel::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
- case 4:
+ case 5:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->transferEndTime);
this->__isset.transferEndTime = true;
@@ -407,7 +432,7 @@ uint32_t DataStagingTaskModel::read(::apache::thrift::protocol::TProtocol* iprot
xfer += iprot->skip(ftype);
}
break;
- case 5:
+ case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->transferRate);
this->__isset.transferRate = true;
@@ -428,6 +453,8 @@ uint32_t DataStagingTaskModel::read(::apache::thrift::protocol::TProtocol* iprot
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_destination)
throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_type)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
@@ -444,18 +471,22 @@ uint32_t DataStagingTaskModel::write(::apache::thrift::protocol::TProtocol* opro
xfer += oprot->writeString(this->destination);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32((int32_t)this->type);
+ xfer += oprot->writeFieldEnd();
+
if (this->__isset.transferStartTime) {
- xfer += oprot->writeFieldBegin("transferStartTime", ::apache::thrift::protocol::T_I64, 3);
+ xfer += oprot->writeFieldBegin("transferStartTime", ::apache::thrift::protocol::T_I64, 4);
xfer += oprot->writeI64(this->transferStartTime);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.transferEndTime) {
- xfer += oprot->writeFieldBegin("transferEndTime", ::apache::thrift::protocol::T_I64, 4);
+ xfer += oprot->writeFieldBegin("transferEndTime", ::apache::thrift::protocol::T_I64, 5);
xfer += oprot->writeI64(this->transferEndTime);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.transferRate) {
- xfer += oprot->writeFieldBegin("transferRate", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeFieldBegin("transferRate", ::apache::thrift::protocol::T_STRING, 6);
xfer += oprot->writeString(this->transferRate);
xfer += oprot->writeFieldEnd();
}
@@ -469,27 +500,30 @@ void swap(DataStagingTaskModel &a, DataStagingTaskModel &b) {
using ::std::swap;
swap(a.source, b.source);
swap(a.destination, b.destination);
+ swap(a.type, b.type);
swap(a.transferStartTime, b.transferStartTime);
swap(a.transferEndTime, b.transferEndTime);
swap(a.transferRate, b.transferRate);
swap(a.__isset, b.__isset);
}
-DataStagingTaskModel::DataStagingTaskModel(const DataStagingTaskModel& other3) {
- source = other3.source;
- destination = other3.destination;
- transferStartTime = other3.transferStartTime;
- transferEndTime = other3.transferEndTime;
- transferRate = other3.transferRate;
- __isset = other3.__isset;
-}
-DataStagingTaskModel& DataStagingTaskModel::operator=(const DataStagingTaskModel& other4) {
+DataStagingTaskModel::DataStagingTaskModel(const DataStagingTaskModel& other4) {
source = other4.source;
destination = other4.destination;
+ type = other4.type;
transferStartTime = other4.transferStartTime;
transferEndTime = other4.transferEndTime;
transferRate = other4.transferRate;
__isset = other4.__isset;
+}
+DataStagingTaskModel& DataStagingTaskModel::operator=(const DataStagingTaskModel& other5) {
+ source = other5.source;
+ destination = other5.destination;
+ type = other5.type;
+ transferStartTime = other5.transferStartTime;
+ transferEndTime = other5.transferEndTime;
+ transferRate = other5.transferRate;
+ __isset = other5.__isset;
return *this;
}
std::ostream& operator<<(std::ostream& out, const DataStagingTaskModel& obj) {
@@ -497,6 +531,7 @@ std::ostream& operator<<(std::ostream& out, const DataStagingTaskModel& obj) {
out << "DataStagingTaskModel(";
out << "source=" << to_string(obj.source);
out << ", " << "destination=" << to_string(obj.destination);
+ out << ", " << "type=" << to_string(obj.type);
out << ", " << "transferStartTime="; (obj.__isset.transferStartTime ? (out << to_string(obj.transferStartTime)) : (out << "<null>"));
out << ", " << "transferEndTime="; (obj.__isset.transferEndTime ? (out << to_string(obj.transferEndTime)) : (out << "<null>"));
out << ", " << "transferRate="; (obj.__isset.transferRate ? (out << to_string(obj.transferRate)) : (out << "<null>"));
@@ -552,9 +587,9 @@ uint32_t EnvironmentSetupTaskModel::read(::apache::thrift::protocol::TProtocol*
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast5;
- xfer += iprot->readI32(ecast5);
- this->protocol = ( ::apache::airavata::model::appcatalog::computeresource::SecurityProtocol::type)ecast5;
+ int32_t ecast6;
+ xfer += iprot->readI32(ecast6);
+ this->protocol = ( ::apache::airavata::model::appcatalog::computeresource::SecurityProtocol::type)ecast6;
isset_protocol = true;
} else {
xfer += iprot->skip(ftype);
@@ -601,13 +636,13 @@ void swap(EnvironmentSetupTaskModel &a, EnvironmentSetupTaskModel &b) {
swap(a.protocol, b.protocol);
}
-EnvironmentSetupTaskModel::EnvironmentSetupTaskModel(const EnvironmentSetupTaskModel& other6) {
- location = other6.location;
- protocol = other6.protocol;
-}
-EnvironmentSetupTaskModel& EnvironmentSetupTaskModel::operator=(const EnvironmentSetupTaskModel& other7) {
+EnvironmentSetupTaskModel::EnvironmentSetupTaskModel(const EnvironmentSetupTaskModel& other7) {
location = other7.location;
protocol = other7.protocol;
+}
+EnvironmentSetupTaskModel& EnvironmentSetupTaskModel::operator=(const EnvironmentSetupTaskModel& other8) {
+ location = other8.location;
+ protocol = other8.protocol;
return *this;
}
std::ostream& operator<<(std::ostream& out, const EnvironmentSetupTaskModel& obj) {
@@ -619,4 +654,238 @@ std::ostream& operator<<(std::ostream& out, const EnvironmentSetupTaskModel& obj
return out;
}
+
+JobSubmissionTaskModel::~JobSubmissionTaskModel() throw() {
+}
+
+
+void JobSubmissionTaskModel::__set_jobSubmissionProtocol(const ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type val) {
+ this->jobSubmissionProtocol = val;
+}
+
+void JobSubmissionTaskModel::__set_monitorMode(const ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type val) {
+ this->monitorMode = val;
+}
+
+void JobSubmissionTaskModel::__set_wallTime(const int32_t val) {
+ this->wallTime = val;
+__isset.wallTime = true;
+}
+
+const char* JobSubmissionTaskModel::ascii_fingerprint = "AEF3E1D4E4ADDD8D31BD954A62F3809C";
+const uint8_t JobSubmissionTaskModel::binary_fingerprint[16] = {0xAE,0xF3,0xE1,0xD4,0xE4,0xAD,0xDD,0x8D,0x31,0xBD,0x95,0x4A,0x62,0xF3,0x80,0x9C};
+
+uint32_t JobSubmissionTaskModel::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_jobSubmissionProtocol = false;
+ bool isset_monitorMode = 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_I32) {
+ int32_t ecast9;
+ xfer += iprot->readI32(ecast9);
+ this->jobSubmissionProtocol = ( ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type)ecast9;
+ isset_jobSubmissionProtocol = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast10;
+ xfer += iprot->readI32(ecast10);
+ this->monitorMode = ( ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type)ecast10;
+ isset_monitorMode = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->wallTime);
+ this->__isset.wallTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_jobSubmissionProtocol)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_monitorMode)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t JobSubmissionTaskModel::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ oprot->incrementRecursionDepth();
+ xfer += oprot->writeStructBegin("JobSubmissionTaskModel");
+
+ xfer += oprot->writeFieldBegin("jobSubmissionProtocol", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeI32((int32_t)this->jobSubmissionProtocol);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32((int32_t)this->monitorMode);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.wallTime) {
+ xfer += oprot->writeFieldBegin("wallTime", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32(this->wallTime);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ oprot->decrementRecursionDepth();
+ return xfer;
+}
+
+void swap(JobSubmissionTaskModel &a, JobSubmissionTaskModel &b) {
+ using ::std::swap;
+ swap(a.jobSubmissionProtocol, b.jobSubmissionProtocol);
+ swap(a.monitorMode, b.monitorMode);
+ swap(a.wallTime, b.wallTime);
+ swap(a.__isset, b.__isset);
+}
+
+JobSubmissionTaskModel::JobSubmissionTaskModel(const JobSubmissionTaskModel& other11) {
+ jobSubmissionProtocol = other11.jobSubmissionProtocol;
+ monitorMode = other11.monitorMode;
+ wallTime = other11.wallTime;
+ __isset = other11.__isset;
+}
+JobSubmissionTaskModel& JobSubmissionTaskModel::operator=(const JobSubmissionTaskModel& other12) {
+ jobSubmissionProtocol = other12.jobSubmissionProtocol;
+ monitorMode = other12.monitorMode;
+ wallTime = other12.wallTime;
+ __isset = other12.__isset;
+ return *this;
+}
+std::ostream& operator<<(std::ostream& out, const JobSubmissionTaskModel& obj) {
+ using apache::thrift::to_string;
+ out << "JobSubmissionTaskModel(";
+ out << "jobSubmissionProtocol=" << to_string(obj.jobSubmissionProtocol);
+ out << ", " << "monitorMode=" << to_string(obj.monitorMode);
+ out << ", " << "wallTime="; (obj.__isset.wallTime ? (out << to_string(obj.wallTime)) : (out << "<null>"));
+ out << ")";
+ return out;
+}
+
+
+MonitorTaskModel::~MonitorTaskModel() throw() {
+}
+
+
+void MonitorTaskModel::__set_monitorMode(const ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type val) {
+ this->monitorMode = val;
+}
+
+const char* MonitorTaskModel::ascii_fingerprint = "8BBB3D0C3B370CB38F2D1340BB79F0AA";
+const uint8_t MonitorTaskModel::binary_fingerprint[16] = {0x8B,0xBB,0x3D,0x0C,0x3B,0x37,0x0C,0xB3,0x8F,0x2D,0x13,0x40,0xBB,0x79,0xF0,0xAA};
+
+uint32_t MonitorTaskModel::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_monitorMode = 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_I32) {
+ int32_t ecast13;
+ xfer += iprot->readI32(ecast13);
+ this->monitorMode = ( ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type)ecast13;
+ isset_monitorMode = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ if (!isset_monitorMode)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t MonitorTaskModel::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ oprot->incrementRecursionDepth();
+ xfer += oprot->writeStructBegin("MonitorTaskModel");
+
+ xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeI32((int32_t)this->monitorMode);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ oprot->decrementRecursionDepth();
+ return xfer;
+}
+
+void swap(MonitorTaskModel &a, MonitorTaskModel &b) {
+ using ::std::swap;
+ swap(a.monitorMode, b.monitorMode);
+}
+
+MonitorTaskModel::MonitorTaskModel(const MonitorTaskModel& other14) {
+ monitorMode = other14.monitorMode;
+}
+MonitorTaskModel& MonitorTaskModel::operator=(const MonitorTaskModel& other15) {
+ monitorMode = other15.monitorMode;
+ return *this;
+}
+std::ostream& operator<<(std::ostream& out, const MonitorTaskModel& obj) {
+ using apache::thrift::to_string;
+ out << "MonitorTaskModel(";
+ out << "monitorMode=" << to_string(obj.monitorMode);
+ out << ")";
+ return out;
+}
+
}}}} // namespace
http://git-wip-us.apache.org/repos/asf/airavata/blob/4d9973e2/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.h
index 321a807..961e279 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/task_model_types.h
@@ -51,12 +51,25 @@ struct TaskTypes {
extern const std::map<int, const char*> _TaskTypes_VALUES_TO_NAMES;
+struct DataStageType {
+ enum type {
+ INPUT = 0,
+ OUPUT = 1
+ };
+};
+
+extern const std::map<int, const char*> _DataStageType_VALUES_TO_NAMES;
+
class TaskModel;
class DataStagingTaskModel;
class EnvironmentSetupTaskModel;
+class JobSubmissionTaskModel;
+
+class MonitorTaskModel;
+
typedef struct _TaskModel__isset {
_TaskModel__isset() : taskDetail(false), subTaskModel(false), taskError(false) {}
bool taskDetail :1;
@@ -158,17 +171,18 @@ typedef struct _DataStagingTaskModel__isset {
class DataStagingTaskModel {
public:
- static const char* ascii_fingerprint; // = "3224DD8D1EC3134AB6350703A4B92D60";
- static const uint8_t binary_fingerprint[16]; // = {0x32,0x24,0xDD,0x8D,0x1E,0xC3,0x13,0x4A,0xB6,0x35,0x07,0x03,0xA4,0xB9,0x2D,0x60};
+ static const char* ascii_fingerprint; // = "68560D7ABF8515154C93E0A04DD9CF55";
+ static const uint8_t binary_fingerprint[16]; // = {0x68,0x56,0x0D,0x7A,0xBF,0x85,0x15,0x15,0x4C,0x93,0xE0,0xA0,0x4D,0xD9,0xCF,0x55};
DataStagingTaskModel(const DataStagingTaskModel&);
DataStagingTaskModel& operator=(const DataStagingTaskModel&);
- DataStagingTaskModel() : source(), destination(), transferStartTime(0), transferEndTime(0), transferRate() {
+ DataStagingTaskModel() : source(), destination(), type((DataStageType::type)0), transferStartTime(0), transferEndTime(0), transferRate() {
}
virtual ~DataStagingTaskModel() throw();
std::string source;
std::string destination;
+ DataStageType::type type;
int64_t transferStartTime;
int64_t transferEndTime;
std::string transferRate;
@@ -179,6 +193,8 @@ class DataStagingTaskModel {
void __set_destination(const std::string& val);
+ void __set_type(const DataStageType::type val);
+
void __set_transferStartTime(const int64_t val);
void __set_transferEndTime(const int64_t val);
@@ -191,6 +207,8 @@ class DataStagingTaskModel {
return false;
if (!(destination == rhs.destination))
return false;
+ if (!(type == rhs.type))
+ return false;
if (__isset.transferStartTime != rhs.__isset.transferStartTime)
return false;
else if (__isset.transferStartTime && !(transferStartTime == rhs.transferStartTime))
@@ -261,6 +279,98 @@ class EnvironmentSetupTaskModel {
void swap(EnvironmentSetupTaskModel &a, EnvironmentSetupTaskModel &b);
+typedef struct _JobSubmissionTaskModel__isset {
+ _JobSubmissionTaskModel__isset() : wallTime(false) {}
+ bool wallTime :1;
+} _JobSubmissionTaskModel__isset;
+
+class JobSubmissionTaskModel {
+ public:
+
+ static const char* ascii_fingerprint; // = "AEF3E1D4E4ADDD8D31BD954A62F3809C";
+ static const uint8_t binary_fingerprint[16]; // = {0xAE,0xF3,0xE1,0xD4,0xE4,0xAD,0xDD,0x8D,0x31,0xBD,0x95,0x4A,0x62,0xF3,0x80,0x9C};
+
+ JobSubmissionTaskModel(const JobSubmissionTaskModel&);
+ JobSubmissionTaskModel& operator=(const JobSubmissionTaskModel&);
+ JobSubmissionTaskModel() : jobSubmissionProtocol(( ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type)0), monitorMode(( ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type)0), wallTime(0) {
+ }
+
+ virtual ~JobSubmissionTaskModel() throw();
+ ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type jobSubmissionProtocol;
+ ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type monitorMode;
+ int32_t wallTime;
+
+ _JobSubmissionTaskModel__isset __isset;
+
+ void __set_jobSubmissionProtocol(const ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type val);
+
+ void __set_monitorMode(const ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type val);
+
+ void __set_wallTime(const int32_t val);
+
+ bool operator == (const JobSubmissionTaskModel & rhs) const
+ {
+ if (!(jobSubmissionProtocol == rhs.jobSubmissionProtocol))
+ return false;
+ if (!(monitorMode == rhs.monitorMode))
+ return false;
+ if (__isset.wallTime != rhs.__isset.wallTime)
+ return false;
+ else if (__isset.wallTime && !(wallTime == rhs.wallTime))
+ return false;
+ return true;
+ }
+ bool operator != (const JobSubmissionTaskModel &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const JobSubmissionTaskModel & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ friend std::ostream& operator<<(std::ostream& out, const JobSubmissionTaskModel& obj);
+};
+
+void swap(JobSubmissionTaskModel &a, JobSubmissionTaskModel &b);
+
+
+class MonitorTaskModel {
+ public:
+
+ static const char* ascii_fingerprint; // = "8BBB3D0C3B370CB38F2D1340BB79F0AA";
+ static const uint8_t binary_fingerprint[16]; // = {0x8B,0xBB,0x3D,0x0C,0x3B,0x37,0x0C,0xB3,0x8F,0x2D,0x13,0x40,0xBB,0x79,0xF0,0xAA};
+
+ MonitorTaskModel(const MonitorTaskModel&);
+ MonitorTaskModel& operator=(const MonitorTaskModel&);
+ MonitorTaskModel() : monitorMode(( ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type)0) {
+ }
+
+ virtual ~MonitorTaskModel() throw();
+ ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type monitorMode;
+
+ void __set_monitorMode(const ::apache::airavata::model::appcatalog::computeresource::MonitorMode::type val);
+
+ bool operator == (const MonitorTaskModel & rhs) const
+ {
+ if (!(monitorMode == rhs.monitorMode))
+ return false;
+ return true;
+ }
+ bool operator != (const MonitorTaskModel &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const MonitorTaskModel & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+ friend std::ostream& operator<<(std::ostream& out, const MonitorTaskModel& obj);
+};
+
+void swap(MonitorTaskModel &a, MonitorTaskModel &b);
+
}}}} // namespace
#endif
http://git-wip-us.apache.org/repos/asf/airavata/blob/4d9973e2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Task/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Task/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Task/Types.php
index f272524..076e5d1 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Task/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Task/Types.php
@@ -37,6 +37,22 @@ final class TaskTypes {
}
/**
+ * DataStagingTaskModel: A structure holding the data staging task details.
+ *
+ * Source and Destination locations includes standard representation of protocol, host, port and path
+ * A friendly description of the task, usally used to communicate information to users.
+ *
+ */
+final class DataStageType {
+ const INPUT = 0;
+ const OUPUT = 1;
+ static public $__names = array(
+ 0 => 'INPUT',
+ 1 => 'OUPUT',
+ );
+}
+
+/**
* TaskModel: A structure holding the generic task details.
*
* taskDetail:
@@ -314,13 +330,6 @@ class TaskModel {
}
-/**
- * DataStagingTaskModel: A structure holding the data staging task details.
- *
- * Source and Destination locations includes standard representation of protocol, host, port and path
- * A friendly description of the task, usally used to communicate information to users.
- *
- */
class DataStagingTaskModel {
static $_TSPEC;
@@ -335,6 +344,10 @@ class DataStagingTaskModel {
/**
* @var int
*/
+ public $type = null;
+ /**
+ * @var int
+ */
public $transferStartTime = null;
/**
* @var int
@@ -357,14 +370,18 @@ class DataStagingTaskModel {
'type' => TType::STRING,
),
3 => array(
+ 'var' => 'type',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
'var' => 'transferStartTime',
'type' => TType::I64,
),
- 4 => array(
+ 5 => array(
'var' => 'transferEndTime',
'type' => TType::I64,
),
- 5 => array(
+ 6 => array(
'var' => 'transferRate',
'type' => TType::STRING,
),
@@ -377,6 +394,9 @@ class DataStagingTaskModel {
if (isset($vals['destination'])) {
$this->destination = $vals['destination'];
}
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
if (isset($vals['transferStartTime'])) {
$this->transferStartTime = $vals['transferStartTime'];
}
@@ -423,20 +443,27 @@ class DataStagingTaskModel {
}
break;
case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->type);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->transferStartTime);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 4:
+ case 5:
if ($ftype == TType::I64) {
$xfer += $input->readI64($this->transferEndTime);
} else {
$xfer += $input->skip($ftype);
}
break;
- case 5:
+ case 6:
if ($ftype == TType::STRING) {
$xfer += $input->readString($this->transferRate);
} else {
@@ -466,18 +493,23 @@ class DataStagingTaskModel {
$xfer += $output->writeString($this->destination);
$xfer += $output->writeFieldEnd();
}
+ if ($this->type !== null) {
+ $xfer += $output->writeFieldBegin('type', TType::I32, 3);
+ $xfer += $output->writeI32($this->type);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->transferStartTime !== null) {
- $xfer += $output->writeFieldBegin('transferStartTime', TType::I64, 3);
+ $xfer += $output->writeFieldBegin('transferStartTime', TType::I64, 4);
$xfer += $output->writeI64($this->transferStartTime);
$xfer += $output->writeFieldEnd();
}
if ($this->transferEndTime !== null) {
- $xfer += $output->writeFieldBegin('transferEndTime', TType::I64, 4);
+ $xfer += $output->writeFieldBegin('transferEndTime', TType::I64, 5);
$xfer += $output->writeI64($this->transferEndTime);
$xfer += $output->writeFieldEnd();
}
if ($this->transferRate !== null) {
- $xfer += $output->writeFieldBegin('transferRate', TType::STRING, 5);
+ $xfer += $output->writeFieldBegin('transferRate', TType::STRING, 6);
$xfer += $output->writeString($this->transferRate);
$xfer += $output->writeFieldEnd();
}
@@ -590,4 +622,200 @@ class EnvironmentSetupTaskModel {
}
+class JobSubmissionTaskModel {
+ static $_TSPEC;
+
+ /**
+ * @var int
+ */
+ public $jobSubmissionProtocol = null;
+ /**
+ * @var int
+ */
+ public $monitorMode = null;
+ /**
+ * @var int
+ */
+ public $wallTime = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'jobSubmissionProtocol',
+ 'type' => TType::I32,
+ ),
+ 2 => array(
+ 'var' => 'monitorMode',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'wallTime',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['jobSubmissionProtocol'])) {
+ $this->jobSubmissionProtocol = $vals['jobSubmissionProtocol'];
+ }
+ if (isset($vals['monitorMode'])) {
+ $this->monitorMode = $vals['monitorMode'];
+ }
+ if (isset($vals['wallTime'])) {
+ $this->wallTime = $vals['wallTime'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'JobSubmissionTaskModel';
+ }
+
+ 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::I32) {
+ $xfer += $input->readI32($this->jobSubmissionProtocol);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->monitorMode);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->wallTime);
+ } 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('JobSubmissionTaskModel');
+ if ($this->jobSubmissionProtocol !== null) {
+ $xfer += $output->writeFieldBegin('jobSubmissionProtocol', TType::I32, 1);
+ $xfer += $output->writeI32($this->jobSubmissionProtocol);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->monitorMode !== null) {
+ $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 2);
+ $xfer += $output->writeI32($this->monitorMode);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->wallTime !== null) {
+ $xfer += $output->writeFieldBegin('wallTime', TType::I32, 3);
+ $xfer += $output->writeI32($this->wallTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class MonitorTaskModel {
+ static $_TSPEC;
+
+ /**
+ * @var int
+ */
+ public $monitorMode = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'monitorMode',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['monitorMode'])) {
+ $this->monitorMode = $vals['monitorMode'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'MonitorTaskModel';
+ }
+
+ 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::I32) {
+ $xfer += $input->readI32($this->monitorMode);
+ } 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('MonitorTaskModel');
+ if ($this->monitorMode !== null) {
+ $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 1);
+ $xfer += $output->writeI32($this->monitorMode);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/4d9973e2/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/task/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/task/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/task/ttypes.py
index 0433c88..385ef4a 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/task/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/task/ttypes.py
@@ -47,6 +47,27 @@ class TaskTypes:
"MONITORING": 4,
}
+class DataStageType:
+ """
+ DataStagingTaskModel: A structure holding the data staging task details.
+
+ Source and Destination locations includes standard representation of protocol, host, port and path
+ A friendly description of the task, usally used to communicate information to users.
+
+ """
+ INPUT = 0
+ OUPUT = 1
+
+ _VALUES_TO_NAMES = {
+ 0: "INPUT",
+ 1: "OUPUT",
+ }
+
+ _NAMES_TO_VALUES = {
+ "INPUT": 0,
+ "OUPUT": 1,
+ }
+
class TaskModel:
"""
@@ -241,15 +262,10 @@ class TaskModel:
class DataStagingTaskModel:
"""
- DataStagingTaskModel: A structure holding the data staging task details.
-
- Source and Destination locations includes standard representation of protocol, host, port and path
- A friendly description of the task, usally used to communicate information to users.
-
-
Attributes:
- source
- destination
+ - type
- transferStartTime
- transferEndTime
- transferRate
@@ -259,14 +275,16 @@ class DataStagingTaskModel:
None, # 0
(1, TType.STRING, 'source', None, None, ), # 1
(2, TType.STRING, 'destination', None, None, ), # 2
- (3, TType.I64, 'transferStartTime', None, None, ), # 3
- (4, TType.I64, 'transferEndTime', None, None, ), # 4
- (5, TType.STRING, 'transferRate', None, None, ), # 5
+ (3, TType.I32, 'type', None, None, ), # 3
+ (4, TType.I64, 'transferStartTime', None, None, ), # 4
+ (5, TType.I64, 'transferEndTime', None, None, ), # 5
+ (6, TType.STRING, 'transferRate', None, None, ), # 6
)
- def __init__(self, source=None, destination=None, transferStartTime=None, transferEndTime=None, transferRate=None,):
+ def __init__(self, source=None, destination=None, type=None, transferStartTime=None, transferEndTime=None, transferRate=None,):
self.source = source
self.destination = destination
+ self.type = type
self.transferStartTime = transferStartTime
self.transferEndTime = transferEndTime
self.transferRate = transferRate
@@ -291,16 +309,21 @@ class DataStagingTaskModel:
else:
iprot.skip(ftype)
elif fid == 3:
+ if ftype == TType.I32:
+ self.type = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
if ftype == TType.I64:
self.transferStartTime = iprot.readI64();
else:
iprot.skip(ftype)
- elif fid == 4:
+ elif fid == 5:
if ftype == TType.I64:
self.transferEndTime = iprot.readI64();
else:
iprot.skip(ftype)
- elif fid == 5:
+ elif fid == 6:
if ftype == TType.STRING:
self.transferRate = iprot.readString();
else:
@@ -323,16 +346,20 @@ class DataStagingTaskModel:
oprot.writeFieldBegin('destination', TType.STRING, 2)
oprot.writeString(self.destination)
oprot.writeFieldEnd()
+ if self.type is not None:
+ oprot.writeFieldBegin('type', TType.I32, 3)
+ oprot.writeI32(self.type)
+ oprot.writeFieldEnd()
if self.transferStartTime is not None:
- oprot.writeFieldBegin('transferStartTime', TType.I64, 3)
+ oprot.writeFieldBegin('transferStartTime', TType.I64, 4)
oprot.writeI64(self.transferStartTime)
oprot.writeFieldEnd()
if self.transferEndTime is not None:
- oprot.writeFieldBegin('transferEndTime', TType.I64, 4)
+ oprot.writeFieldBegin('transferEndTime', TType.I64, 5)
oprot.writeI64(self.transferEndTime)
oprot.writeFieldEnd()
if self.transferRate is not None:
- oprot.writeFieldBegin('transferRate', TType.STRING, 5)
+ oprot.writeFieldBegin('transferRate', TType.STRING, 6)
oprot.writeString(self.transferRate)
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -343,6 +370,8 @@ class DataStagingTaskModel:
raise TProtocol.TProtocolException(message='Required field source is unset!')
if self.destination is None:
raise TProtocol.TProtocolException(message='Required field destination is unset!')
+ if self.type is None:
+ raise TProtocol.TProtocolException(message='Required field type is unset!')
return
@@ -350,6 +379,7 @@ class DataStagingTaskModel:
value = 17
value = (value * 31) ^ hash(self.source)
value = (value * 31) ^ hash(self.destination)
+ value = (value * 31) ^ hash(self.type)
value = (value * 31) ^ hash(self.transferStartTime)
value = (value * 31) ^ hash(self.transferEndTime)
value = (value * 31) ^ hash(self.transferRate)
@@ -450,3 +480,165 @@ class EnvironmentSetupTaskModel:
def __ne__(self, other):
return not (self == other)
+
+class JobSubmissionTaskModel:
+ """
+ Attributes:
+ - jobSubmissionProtocol
+ - monitorMode
+ - wallTime
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I32, 'jobSubmissionProtocol', None, None, ), # 1
+ (2, TType.I32, 'monitorMode', None, None, ), # 2
+ (3, TType.I32, 'wallTime', None, None, ), # 3
+ )
+
+ def __init__(self, jobSubmissionProtocol=None, monitorMode=None, wallTime=None,):
+ self.jobSubmissionProtocol = jobSubmissionProtocol
+ self.monitorMode = monitorMode
+ self.wallTime = wallTime
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I32:
+ self.jobSubmissionProtocol = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I32:
+ self.monitorMode = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I32:
+ self.wallTime = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('JobSubmissionTaskModel')
+ if self.jobSubmissionProtocol is not None:
+ oprot.writeFieldBegin('jobSubmissionProtocol', TType.I32, 1)
+ oprot.writeI32(self.jobSubmissionProtocol)
+ oprot.writeFieldEnd()
+ if self.monitorMode is not None:
+ oprot.writeFieldBegin('monitorMode', TType.I32, 2)
+ oprot.writeI32(self.monitorMode)
+ oprot.writeFieldEnd()
+ if self.wallTime is not None:
+ oprot.writeFieldBegin('wallTime', TType.I32, 3)
+ oprot.writeI32(self.wallTime)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.jobSubmissionProtocol is None:
+ raise TProtocol.TProtocolException(message='Required field jobSubmissionProtocol is unset!')
+ if self.monitorMode is None:
+ raise TProtocol.TProtocolException(message='Required field monitorMode is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.jobSubmissionProtocol)
+ value = (value * 31) ^ hash(self.monitorMode)
+ value = (value * 31) ^ hash(self.wallTime)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class MonitorTaskModel:
+ """
+ Attributes:
+ - monitorMode
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I32, 'monitorMode', None, None, ), # 1
+ )
+
+ def __init__(self, monitorMode=None,):
+ self.monitorMode = monitorMode
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I32:
+ self.monitorMode = iprot.readI32();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('MonitorTaskModel')
+ if self.monitorMode is not None:
+ oprot.writeFieldBegin('monitorMode', TType.I32, 1)
+ oprot.writeI32(self.monitorMode)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.monitorMode is None:
+ raise TProtocol.TProtocolException(message='Required field monitorMode is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.monitorMode)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)