| /** |
| * 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.10.0) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| #include "scheduling_model_types.h" |
| |
| #include <algorithm> |
| #include <ostream> |
| |
| #include <thrift/TToString.h> |
| |
| namespace apache { namespace airavata { namespace model { namespace scheduling { |
| |
| |
| ComputationalResourceSchedulingModel::~ComputationalResourceSchedulingModel() throw() { |
| } |
| |
| |
| void ComputationalResourceSchedulingModel::__set_resourceHostId(const std::string& val) { |
| this->resourceHostId = val; |
| __isset.resourceHostId = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_totalCPUCount(const int32_t val) { |
| this->totalCPUCount = val; |
| __isset.totalCPUCount = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_nodeCount(const int32_t val) { |
| this->nodeCount = val; |
| __isset.nodeCount = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_numberOfThreads(const int32_t val) { |
| this->numberOfThreads = val; |
| __isset.numberOfThreads = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_queueName(const std::string& val) { |
| this->queueName = val; |
| __isset.queueName = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_wallTimeLimit(const int32_t val) { |
| this->wallTimeLimit = val; |
| __isset.wallTimeLimit = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_totalPhysicalMemory(const int32_t val) { |
| this->totalPhysicalMemory = val; |
| __isset.totalPhysicalMemory = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_chessisNumber(const std::string& val) { |
| this->chessisNumber = val; |
| __isset.chessisNumber = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_staticWorkingDir(const std::string& val) { |
| this->staticWorkingDir = val; |
| __isset.staticWorkingDir = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_overrideLoginUserName(const std::string& val) { |
| this->overrideLoginUserName = val; |
| __isset.overrideLoginUserName = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_overrideScratchLocation(const std::string& val) { |
| this->overrideScratchLocation = val; |
| __isset.overrideScratchLocation = true; |
| } |
| |
| void ComputationalResourceSchedulingModel::__set_overrideAllocationProjectNumber(const std::string& val) { |
| this->overrideAllocationProjectNumber = val; |
| __isset.overrideAllocationProjectNumber = true; |
| } |
| |
| uint32_t ComputationalResourceSchedulingModel::read(::apache::thrift::protocol::TProtocol* iprot) { |
| |
| apache::thrift::protocol::TInputRecursionTracker tracker(*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; |
| |
| |
| 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->resourceHostId); |
| this->__isset.resourceHostId = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 2: |
| if (ftype == ::apache::thrift::protocol::T_I32) { |
| xfer += iprot->readI32(this->totalCPUCount); |
| this->__isset.totalCPUCount = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 3: |
| if (ftype == ::apache::thrift::protocol::T_I32) { |
| xfer += iprot->readI32(this->nodeCount); |
| this->__isset.nodeCount = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 4: |
| if (ftype == ::apache::thrift::protocol::T_I32) { |
| xfer += iprot->readI32(this->numberOfThreads); |
| this->__isset.numberOfThreads = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 5: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->queueName); |
| this->__isset.queueName = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 6: |
| if (ftype == ::apache::thrift::protocol::T_I32) { |
| xfer += iprot->readI32(this->wallTimeLimit); |
| this->__isset.wallTimeLimit = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 7: |
| if (ftype == ::apache::thrift::protocol::T_I32) { |
| xfer += iprot->readI32(this->totalPhysicalMemory); |
| this->__isset.totalPhysicalMemory = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 8: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->chessisNumber); |
| this->__isset.chessisNumber = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 9: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->staticWorkingDir); |
| this->__isset.staticWorkingDir = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 10: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->overrideLoginUserName); |
| this->__isset.overrideLoginUserName = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 11: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->overrideScratchLocation); |
| this->__isset.overrideScratchLocation = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 12: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->overrideAllocationProjectNumber); |
| this->__isset.overrideAllocationProjectNumber = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| default: |
| xfer += iprot->skip(ftype); |
| break; |
| } |
| xfer += iprot->readFieldEnd(); |
| } |
| |
| xfer += iprot->readStructEnd(); |
| |
| return xfer; |
| } |
| |
| uint32_t ComputationalResourceSchedulingModel::write(::apache::thrift::protocol::TProtocol* oprot) const { |
| uint32_t xfer = 0; |
| apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); |
| xfer += oprot->writeStructBegin("ComputationalResourceSchedulingModel"); |
| |
| if (this->__isset.resourceHostId) { |
| xfer += oprot->writeFieldBegin("resourceHostId", ::apache::thrift::protocol::T_STRING, 1); |
| xfer += oprot->writeString(this->resourceHostId); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.totalCPUCount) { |
| xfer += oprot->writeFieldBegin("totalCPUCount", ::apache::thrift::protocol::T_I32, 2); |
| xfer += oprot->writeI32(this->totalCPUCount); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.nodeCount) { |
| xfer += oprot->writeFieldBegin("nodeCount", ::apache::thrift::protocol::T_I32, 3); |
| xfer += oprot->writeI32(this->nodeCount); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.numberOfThreads) { |
| xfer += oprot->writeFieldBegin("numberOfThreads", ::apache::thrift::protocol::T_I32, 4); |
| xfer += oprot->writeI32(this->numberOfThreads); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.queueName) { |
| xfer += oprot->writeFieldBegin("queueName", ::apache::thrift::protocol::T_STRING, 5); |
| xfer += oprot->writeString(this->queueName); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.wallTimeLimit) { |
| xfer += oprot->writeFieldBegin("wallTimeLimit", ::apache::thrift::protocol::T_I32, 6); |
| xfer += oprot->writeI32(this->wallTimeLimit); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.totalPhysicalMemory) { |
| xfer += oprot->writeFieldBegin("totalPhysicalMemory", ::apache::thrift::protocol::T_I32, 7); |
| xfer += oprot->writeI32(this->totalPhysicalMemory); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.chessisNumber) { |
| xfer += oprot->writeFieldBegin("chessisNumber", ::apache::thrift::protocol::T_STRING, 8); |
| xfer += oprot->writeString(this->chessisNumber); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.staticWorkingDir) { |
| xfer += oprot->writeFieldBegin("staticWorkingDir", ::apache::thrift::protocol::T_STRING, 9); |
| xfer += oprot->writeString(this->staticWorkingDir); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.overrideLoginUserName) { |
| xfer += oprot->writeFieldBegin("overrideLoginUserName", ::apache::thrift::protocol::T_STRING, 10); |
| xfer += oprot->writeString(this->overrideLoginUserName); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.overrideScratchLocation) { |
| xfer += oprot->writeFieldBegin("overrideScratchLocation", ::apache::thrift::protocol::T_STRING, 11); |
| xfer += oprot->writeString(this->overrideScratchLocation); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.overrideAllocationProjectNumber) { |
| xfer += oprot->writeFieldBegin("overrideAllocationProjectNumber", ::apache::thrift::protocol::T_STRING, 12); |
| xfer += oprot->writeString(this->overrideAllocationProjectNumber); |
| xfer += oprot->writeFieldEnd(); |
| } |
| xfer += oprot->writeFieldStop(); |
| xfer += oprot->writeStructEnd(); |
| return xfer; |
| } |
| |
| void swap(ComputationalResourceSchedulingModel &a, ComputationalResourceSchedulingModel &b) { |
| using ::std::swap; |
| swap(a.resourceHostId, b.resourceHostId); |
| swap(a.totalCPUCount, b.totalCPUCount); |
| swap(a.nodeCount, b.nodeCount); |
| swap(a.numberOfThreads, b.numberOfThreads); |
| swap(a.queueName, b.queueName); |
| swap(a.wallTimeLimit, b.wallTimeLimit); |
| swap(a.totalPhysicalMemory, b.totalPhysicalMemory); |
| swap(a.chessisNumber, b.chessisNumber); |
| swap(a.staticWorkingDir, b.staticWorkingDir); |
| swap(a.overrideLoginUserName, b.overrideLoginUserName); |
| swap(a.overrideScratchLocation, b.overrideScratchLocation); |
| swap(a.overrideAllocationProjectNumber, b.overrideAllocationProjectNumber); |
| swap(a.__isset, b.__isset); |
| } |
| |
| ComputationalResourceSchedulingModel::ComputationalResourceSchedulingModel(const ComputationalResourceSchedulingModel& other0) { |
| resourceHostId = other0.resourceHostId; |
| totalCPUCount = other0.totalCPUCount; |
| nodeCount = other0.nodeCount; |
| numberOfThreads = other0.numberOfThreads; |
| queueName = other0.queueName; |
| wallTimeLimit = other0.wallTimeLimit; |
| totalPhysicalMemory = other0.totalPhysicalMemory; |
| chessisNumber = other0.chessisNumber; |
| staticWorkingDir = other0.staticWorkingDir; |
| overrideLoginUserName = other0.overrideLoginUserName; |
| overrideScratchLocation = other0.overrideScratchLocation; |
| overrideAllocationProjectNumber = other0.overrideAllocationProjectNumber; |
| __isset = other0.__isset; |
| } |
| ComputationalResourceSchedulingModel& ComputationalResourceSchedulingModel::operator=(const ComputationalResourceSchedulingModel& other1) { |
| resourceHostId = other1.resourceHostId; |
| totalCPUCount = other1.totalCPUCount; |
| nodeCount = other1.nodeCount; |
| numberOfThreads = other1.numberOfThreads; |
| queueName = other1.queueName; |
| wallTimeLimit = other1.wallTimeLimit; |
| totalPhysicalMemory = other1.totalPhysicalMemory; |
| chessisNumber = other1.chessisNumber; |
| staticWorkingDir = other1.staticWorkingDir; |
| overrideLoginUserName = other1.overrideLoginUserName; |
| overrideScratchLocation = other1.overrideScratchLocation; |
| overrideAllocationProjectNumber = other1.overrideAllocationProjectNumber; |
| __isset = other1.__isset; |
| return *this; |
| } |
| void ComputationalResourceSchedulingModel::printTo(std::ostream& out) const { |
| using ::apache::thrift::to_string; |
| out << "ComputationalResourceSchedulingModel("; |
| out << "resourceHostId="; (__isset.resourceHostId ? (out << to_string(resourceHostId)) : (out << "<null>")); |
| out << ", " << "totalCPUCount="; (__isset.totalCPUCount ? (out << to_string(totalCPUCount)) : (out << "<null>")); |
| out << ", " << "nodeCount="; (__isset.nodeCount ? (out << to_string(nodeCount)) : (out << "<null>")); |
| out << ", " << "numberOfThreads="; (__isset.numberOfThreads ? (out << to_string(numberOfThreads)) : (out << "<null>")); |
| out << ", " << "queueName="; (__isset.queueName ? (out << to_string(queueName)) : (out << "<null>")); |
| out << ", " << "wallTimeLimit="; (__isset.wallTimeLimit ? (out << to_string(wallTimeLimit)) : (out << "<null>")); |
| out << ", " << "totalPhysicalMemory="; (__isset.totalPhysicalMemory ? (out << to_string(totalPhysicalMemory)) : (out << "<null>")); |
| out << ", " << "chessisNumber="; (__isset.chessisNumber ? (out << to_string(chessisNumber)) : (out << "<null>")); |
| out << ", " << "staticWorkingDir="; (__isset.staticWorkingDir ? (out << to_string(staticWorkingDir)) : (out << "<null>")); |
| out << ", " << "overrideLoginUserName="; (__isset.overrideLoginUserName ? (out << to_string(overrideLoginUserName)) : (out << "<null>")); |
| out << ", " << "overrideScratchLocation="; (__isset.overrideScratchLocation ? (out << to_string(overrideScratchLocation)) : (out << "<null>")); |
| out << ", " << "overrideAllocationProjectNumber="; (__isset.overrideAllocationProjectNumber ? (out << to_string(overrideAllocationProjectNumber)) : (out << "<null>")); |
| out << ")"; |
| } |
| |
| }}}} // namespace |