blob: 12a5cc99a55546c45a1e2a3a2766b4b7444d6ea4 [file] [log] [blame]
/**
* 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.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "process_model_types.h"
#include <algorithm>
#include <ostream>
#include <thrift/TToString.h>
namespace apache { namespace airavata { namespace model { namespace process {
ProcessModel::~ProcessModel() throw() {
}
void ProcessModel::__set_processId(const std::string& val) {
this->processId = val;
}
void ProcessModel::__set_experimentId(const std::string& val) {
this->experimentId = val;
}
void ProcessModel::__set_creationTime(const int64_t val) {
this->creationTime = val;
__isset.creationTime = true;
}
void ProcessModel::__set_lastUpdateTime(const int64_t val) {
this->lastUpdateTime = val;
__isset.lastUpdateTime = true;
}
void ProcessModel::__set_processStatus(const ::apache::airavata::model::status::ProcessStatus& val) {
this->processStatus = val;
__isset.processStatus = true;
}
void ProcessModel::__set_processDetail(const std::string& val) {
this->processDetail = val;
__isset.processDetail = true;
}
void ProcessModel::__set_applicationInterfaceId(const std::string& val) {
this->applicationInterfaceId = val;
__isset.applicationInterfaceId = true;
}
void ProcessModel::__set_applicationDeploymentId(const std::string& val) {
this->applicationDeploymentId = val;
__isset.applicationDeploymentId = true;
}
void ProcessModel::__set_computeResourceId(const std::string& val) {
this->computeResourceId = val;
__isset.computeResourceId = true;
}
void ProcessModel::__set_processInputs(const std::vector< ::apache::airavata::model::application::io::InputDataObjectType> & val) {
this->processInputs = val;
__isset.processInputs = true;
}
void ProcessModel::__set_processOutputs(const std::vector< ::apache::airavata::model::application::io::OutputDataObjectType> & val) {
this->processOutputs = val;
__isset.processOutputs = true;
}
void ProcessModel::__set_resourceSchedule(const ::apache::airavata::model::scheduling::ComputationalResourceSchedulingModel& val) {
this->resourceSchedule = val;
__isset.resourceSchedule = true;
}
void ProcessModel::__set_tasks(const std::vector< ::apache::airavata::model::task::TaskModel> & val) {
this->tasks = val;
__isset.tasks = true;
}
void ProcessModel::__set_taskDag(const std::string& val) {
this->taskDag = val;
__isset.taskDag = true;
}
void ProcessModel::__set_processError(const ::apache::airavata::model::commons::ErrorModel& val) {
this->processError = val;
__isset.processError = true;
}
void ProcessModel::__set_gatewayExecutionId(const std::string& val) {
this->gatewayExecutionId = val;
__isset.gatewayExecutionId = true;
}
void ProcessModel::__set_enableEmailNotification(const bool val) {
this->enableEmailNotification = val;
__isset.enableEmailNotification = true;
}
void ProcessModel::__set_emailAddresses(const std::vector<std::string> & val) {
this->emailAddresses = val;
__isset.emailAddresses = true;
}
const char* ProcessModel::ascii_fingerprint = "DD9F28E8C54528EC5BBC117D76D7BC84";
const uint8_t ProcessModel::binary_fingerprint[16] = {0xDD,0x9F,0x28,0xE8,0xC5,0x45,0x28,0xEC,0x5B,0xBC,0x11,0x7D,0x76,0xD7,0xBC,0x84};
uint32_t ProcessModel::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_processId = false;
bool isset_experimentId = 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->processId);
isset_processId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->experimentId);
isset_experimentId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->creationTime);
this->__isset.creationTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lastUpdateTime);
this->__isset.lastUpdateTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->processStatus.read(iprot);
this->__isset.processStatus = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->processDetail);
this->__isset.processDetail = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->applicationInterfaceId);
this->__isset.applicationInterfaceId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->applicationDeploymentId);
this->__isset.applicationDeploymentId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 9:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->computeResourceId);
this->__isset.computeResourceId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->processInputs.clear();
uint32_t _size0;
::apache::thrift::protocol::TType _etype3;
xfer += iprot->readListBegin(_etype3, _size0);
this->processInputs.resize(_size0);
uint32_t _i4;
for (_i4 = 0; _i4 < _size0; ++_i4)
{
xfer += this->processInputs[_i4].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.processInputs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 11:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->processOutputs.clear();
uint32_t _size5;
::apache::thrift::protocol::TType _etype8;
xfer += iprot->readListBegin(_etype8, _size5);
this->processOutputs.resize(_size5);
uint32_t _i9;
for (_i9 = 0; _i9 < _size5; ++_i9)
{
xfer += this->processOutputs[_i9].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.processOutputs = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 12:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->resourceSchedule.read(iprot);
this->__isset.resourceSchedule = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 13:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->tasks.clear();
uint32_t _size10;
::apache::thrift::protocol::TType _etype13;
xfer += iprot->readListBegin(_etype13, _size10);
this->tasks.resize(_size10);
uint32_t _i14;
for (_i14 = 0; _i14 < _size10; ++_i14)
{
xfer += this->tasks[_i14].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.tasks = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 14:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->taskDag);
this->__isset.taskDag = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 15:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->processError.read(iprot);
this->__isset.processError = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 16:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->gatewayExecutionId);
this->__isset.gatewayExecutionId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 17:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->enableEmailNotification);
this->__isset.enableEmailNotification = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 18:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->emailAddresses.clear();
uint32_t _size15;
::apache::thrift::protocol::TType _etype18;
xfer += iprot->readListBegin(_etype18, _size15);
this->emailAddresses.resize(_size15);
uint32_t _i19;
for (_i19 = 0; _i19 < _size15; ++_i19)
{
xfer += iprot->readString(this->emailAddresses[_i19]);
}
xfer += iprot->readListEnd();
}
this->__isset.emailAddresses = true;
} else {
xfer += iprot->skip(ftype);
}
break;
default:
xfer += iprot->skip(ftype);
break;
}
xfer += iprot->readFieldEnd();
}
xfer += iprot->readStructEnd();
if (!isset_processId)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_experimentId)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}
uint32_t ProcessModel::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
oprot->incrementRecursionDepth();
xfer += oprot->writeStructBegin("ProcessModel");
xfer += oprot->writeFieldBegin("processId", ::apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->processId);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldBegin("experimentId", ::apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->experimentId);
xfer += oprot->writeFieldEnd();
if (this->__isset.creationTime) {
xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_I64, 3);
xfer += oprot->writeI64(this->creationTime);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.lastUpdateTime) {
xfer += oprot->writeFieldBegin("lastUpdateTime", ::apache::thrift::protocol::T_I64, 4);
xfer += oprot->writeI64(this->lastUpdateTime);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.processStatus) {
xfer += oprot->writeFieldBegin("processStatus", ::apache::thrift::protocol::T_STRUCT, 5);
xfer += this->processStatus.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.processDetail) {
xfer += oprot->writeFieldBegin("processDetail", ::apache::thrift::protocol::T_STRING, 6);
xfer += oprot->writeString(this->processDetail);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.applicationInterfaceId) {
xfer += oprot->writeFieldBegin("applicationInterfaceId", ::apache::thrift::protocol::T_STRING, 7);
xfer += oprot->writeString(this->applicationInterfaceId);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.applicationDeploymentId) {
xfer += oprot->writeFieldBegin("applicationDeploymentId", ::apache::thrift::protocol::T_STRING, 8);
xfer += oprot->writeString(this->applicationDeploymentId);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.computeResourceId) {
xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 9);
xfer += oprot->writeString(this->computeResourceId);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.processInputs) {
xfer += oprot->writeFieldBegin("processInputs", ::apache::thrift::protocol::T_LIST, 10);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->processInputs.size()));
std::vector< ::apache::airavata::model::application::io::InputDataObjectType> ::const_iterator _iter20;
for (_iter20 = this->processInputs.begin(); _iter20 != this->processInputs.end(); ++_iter20)
{
xfer += (*_iter20).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
if (this->__isset.processOutputs) {
xfer += oprot->writeFieldBegin("processOutputs", ::apache::thrift::protocol::T_LIST, 11);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->processOutputs.size()));
std::vector< ::apache::airavata::model::application::io::OutputDataObjectType> ::const_iterator _iter21;
for (_iter21 = this->processOutputs.begin(); _iter21 != this->processOutputs.end(); ++_iter21)
{
xfer += (*_iter21).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
if (this->__isset.resourceSchedule) {
xfer += oprot->writeFieldBegin("resourceSchedule", ::apache::thrift::protocol::T_STRUCT, 12);
xfer += this->resourceSchedule.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.tasks) {
xfer += oprot->writeFieldBegin("tasks", ::apache::thrift::protocol::T_LIST, 13);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->tasks.size()));
std::vector< ::apache::airavata::model::task::TaskModel> ::const_iterator _iter22;
for (_iter22 = this->tasks.begin(); _iter22 != this->tasks.end(); ++_iter22)
{
xfer += (*_iter22).write(oprot);
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
if (this->__isset.taskDag) {
xfer += oprot->writeFieldBegin("taskDag", ::apache::thrift::protocol::T_STRING, 14);
xfer += oprot->writeString(this->taskDag);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.processError) {
xfer += oprot->writeFieldBegin("processError", ::apache::thrift::protocol::T_STRUCT, 15);
xfer += this->processError.write(oprot);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.gatewayExecutionId) {
xfer += oprot->writeFieldBegin("gatewayExecutionId", ::apache::thrift::protocol::T_STRING, 16);
xfer += oprot->writeString(this->gatewayExecutionId);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.enableEmailNotification) {
xfer += oprot->writeFieldBegin("enableEmailNotification", ::apache::thrift::protocol::T_BOOL, 17);
xfer += oprot->writeBool(this->enableEmailNotification);
xfer += oprot->writeFieldEnd();
}
if (this->__isset.emailAddresses) {
xfer += oprot->writeFieldBegin("emailAddresses", ::apache::thrift::protocol::T_LIST, 18);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->emailAddresses.size()));
std::vector<std::string> ::const_iterator _iter23;
for (_iter23 = this->emailAddresses.begin(); _iter23 != this->emailAddresses.end(); ++_iter23)
{
xfer += oprot->writeString((*_iter23));
}
xfer += oprot->writeListEnd();
}
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
oprot->decrementRecursionDepth();
return xfer;
}
void swap(ProcessModel &a, ProcessModel &b) {
using ::std::swap;
swap(a.processId, b.processId);
swap(a.experimentId, b.experimentId);
swap(a.creationTime, b.creationTime);
swap(a.lastUpdateTime, b.lastUpdateTime);
swap(a.processStatus, b.processStatus);
swap(a.processDetail, b.processDetail);
swap(a.applicationInterfaceId, b.applicationInterfaceId);
swap(a.applicationDeploymentId, b.applicationDeploymentId);
swap(a.computeResourceId, b.computeResourceId);
swap(a.processInputs, b.processInputs);
swap(a.processOutputs, b.processOutputs);
swap(a.resourceSchedule, b.resourceSchedule);
swap(a.tasks, b.tasks);
swap(a.taskDag, b.taskDag);
swap(a.processError, b.processError);
swap(a.gatewayExecutionId, b.gatewayExecutionId);
swap(a.enableEmailNotification, b.enableEmailNotification);
swap(a.emailAddresses, b.emailAddresses);
swap(a.__isset, b.__isset);
}
ProcessModel::ProcessModel(const ProcessModel& other24) {
processId = other24.processId;
experimentId = other24.experimentId;
creationTime = other24.creationTime;
lastUpdateTime = other24.lastUpdateTime;
processStatus = other24.processStatus;
processDetail = other24.processDetail;
applicationInterfaceId = other24.applicationInterfaceId;
applicationDeploymentId = other24.applicationDeploymentId;
computeResourceId = other24.computeResourceId;
processInputs = other24.processInputs;
processOutputs = other24.processOutputs;
resourceSchedule = other24.resourceSchedule;
tasks = other24.tasks;
taskDag = other24.taskDag;
processError = other24.processError;
gatewayExecutionId = other24.gatewayExecutionId;
enableEmailNotification = other24.enableEmailNotification;
emailAddresses = other24.emailAddresses;
__isset = other24.__isset;
}
ProcessModel& ProcessModel::operator=(const ProcessModel& other25) {
processId = other25.processId;
experimentId = other25.experimentId;
creationTime = other25.creationTime;
lastUpdateTime = other25.lastUpdateTime;
processStatus = other25.processStatus;
processDetail = other25.processDetail;
applicationInterfaceId = other25.applicationInterfaceId;
applicationDeploymentId = other25.applicationDeploymentId;
computeResourceId = other25.computeResourceId;
processInputs = other25.processInputs;
processOutputs = other25.processOutputs;
resourceSchedule = other25.resourceSchedule;
tasks = other25.tasks;
taskDag = other25.taskDag;
processError = other25.processError;
gatewayExecutionId = other25.gatewayExecutionId;
enableEmailNotification = other25.enableEmailNotification;
emailAddresses = other25.emailAddresses;
__isset = other25.__isset;
return *this;
}
std::ostream& operator<<(std::ostream& out, const ProcessModel& obj) {
using apache::thrift::to_string;
out << "ProcessModel(";
out << "processId=" << to_string(obj.processId);
out << ", " << "experimentId=" << to_string(obj.experimentId);
out << ", " << "creationTime="; (obj.__isset.creationTime ? (out << to_string(obj.creationTime)) : (out << "<null>"));
out << ", " << "lastUpdateTime="; (obj.__isset.lastUpdateTime ? (out << to_string(obj.lastUpdateTime)) : (out << "<null>"));
out << ", " << "processStatus="; (obj.__isset.processStatus ? (out << to_string(obj.processStatus)) : (out << "<null>"));
out << ", " << "processDetail="; (obj.__isset.processDetail ? (out << to_string(obj.processDetail)) : (out << "<null>"));
out << ", " << "applicationInterfaceId="; (obj.__isset.applicationInterfaceId ? (out << to_string(obj.applicationInterfaceId)) : (out << "<null>"));
out << ", " << "applicationDeploymentId="; (obj.__isset.applicationDeploymentId ? (out << to_string(obj.applicationDeploymentId)) : (out << "<null>"));
out << ", " << "computeResourceId="; (obj.__isset.computeResourceId ? (out << to_string(obj.computeResourceId)) : (out << "<null>"));
out << ", " << "processInputs="; (obj.__isset.processInputs ? (out << to_string(obj.processInputs)) : (out << "<null>"));
out << ", " << "processOutputs="; (obj.__isset.processOutputs ? (out << to_string(obj.processOutputs)) : (out << "<null>"));
out << ", " << "resourceSchedule="; (obj.__isset.resourceSchedule ? (out << to_string(obj.resourceSchedule)) : (out << "<null>"));
out << ", " << "tasks="; (obj.__isset.tasks ? (out << to_string(obj.tasks)) : (out << "<null>"));
out << ", " << "taskDag="; (obj.__isset.taskDag ? (out << to_string(obj.taskDag)) : (out << "<null>"));
out << ", " << "processError="; (obj.__isset.processError ? (out << to_string(obj.processError)) : (out << "<null>"));
out << ", " << "gatewayExecutionId="; (obj.__isset.gatewayExecutionId ? (out << to_string(obj.gatewayExecutionId)) : (out << "<null>"));
out << ", " << "enableEmailNotification="; (obj.__isset.enableEmailNotification ? (out << to_string(obj.enableEmailNotification)) : (out << "<null>"));
out << ", " << "emailAddresses="; (obj.__isset.emailAddresses ? (out << to_string(obj.emailAddresses)) : (out << "<null>"));
out << ")";
return out;
}
}}}} // namespace