in airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/compute_resource_model_types.cpp [1867:2125]
uint32_t ComputeResourceDescription::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;
bool isset_computeResourceId = false;
bool isset_hostName = 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_STRING) {
xfer += iprot->readString(this->hostName);
isset_hostName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->hostAliases.clear();
uint32_t _size55;
::apache::thrift::protocol::TType _etype58;
xfer += iprot->readListBegin(_etype58, _size55);
this->hostAliases.resize(_size55);
uint32_t _i59;
for (_i59 = 0; _i59 < _size55; ++_i59)
{
xfer += iprot->readString(this->hostAliases[_i59]);
}
xfer += iprot->readListEnd();
}
this->__isset.hostAliases = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->ipAddresses.clear();
uint32_t _size60;
::apache::thrift::protocol::TType _etype63;
xfer += iprot->readListBegin(_etype63, _size60);
this->ipAddresses.resize(_size60);
uint32_t _i64;
for (_i64 = 0; _i64 < _size60; ++_i64)
{
xfer += iprot->readString(this->ipAddresses[_i64]);
}
xfer += iprot->readListEnd();
}
this->__isset.ipAddresses = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->resourceDescription);
this->__isset.resourceDescription = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 6:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->enabled);
this->__isset.enabled = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->batchQueues.clear();
uint32_t _size65;
::apache::thrift::protocol::TType _etype68;
xfer += iprot->readListBegin(_etype68, _size65);
this->batchQueues.resize(_size65);
uint32_t _i69;
for (_i69 = 0; _i69 < _size65; ++_i69)
{
xfer += this->batchQueues[_i69].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.batchQueues = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_MAP) {
{
this->fileSystems.clear();
uint32_t _size70;
::apache::thrift::protocol::TType _ktype71;
::apache::thrift::protocol::TType _vtype72;
xfer += iprot->readMapBegin(_ktype71, _vtype72, _size70);
uint32_t _i74;
for (_i74 = 0; _i74 < _size70; ++_i74)
{
FileSystems::type _key75;
int32_t ecast77;
xfer += iprot->readI32(ecast77);
_key75 = (FileSystems::type)ecast77;
std::string& _val76 = this->fileSystems[_key75];
xfer += iprot->readString(_val76);
}
xfer += iprot->readMapEnd();
}
this->__isset.fileSystems = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 9:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->jobSubmissionInterfaces.clear();
uint32_t _size78;
::apache::thrift::protocol::TType _etype81;
xfer += iprot->readListBegin(_etype81, _size78);
this->jobSubmissionInterfaces.resize(_size78);
uint32_t _i82;
for (_i82 = 0; _i82 < _size78; ++_i82)
{
xfer += this->jobSubmissionInterfaces[_i82].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.jobSubmissionInterfaces = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->dataMovementInterfaces.clear();
uint32_t _size83;
::apache::thrift::protocol::TType _etype86;
xfer += iprot->readListBegin(_etype86, _size83);
this->dataMovementInterfaces.resize(_size83);
uint32_t _i87;
for (_i87 = 0; _i87 < _size83; ++_i87)
{
xfer += this->dataMovementInterfaces[_i87].read(iprot);
}
xfer += iprot->readListEnd();
}
this->__isset.dataMovementInterfaces = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 11:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->maxMemoryPerNode);
this->__isset.maxMemoryPerNode = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 12:
if (ftype == ::apache::thrift::protocol::T_BOOL) {
xfer += iprot->readBool(this->gatewayUsageReporting);
this->__isset.gatewayUsageReporting = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 13:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->gatewayUsageModuleLoadCommand);
this->__isset.gatewayUsageModuleLoadCommand = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 14:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->gatewayUsageExecutable);
this->__isset.gatewayUsageExecutable = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 15:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->cpusPerNode);
this->__isset.cpusPerNode = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 16:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->defaultNodeCount);
this->__isset.defaultNodeCount = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 17:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->defaultCPUCount);
this->__isset.defaultCPUCount = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 18:
if (ftype == ::apache::thrift::protocol::T_I32) {
xfer += iprot->readI32(this->defaultWalltime);
this->__isset.defaultWalltime = 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_hostName)
throw TProtocolException(TProtocolException::INVALID_DATA);
return xfer;
}