| /** |
| * 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 "gateway_resource_profile_model_types.h" |
| |
| #include <algorithm> |
| #include <ostream> |
| |
| #include <thrift/TToString.h> |
| |
| namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace gatewayprofile { |
| |
| |
| ComputeResourcePreference::~ComputeResourcePreference() throw() { |
| } |
| |
| |
| void ComputeResourcePreference::__set_computeResourceId(const std::string& val) { |
| this->computeResourceId = val; |
| } |
| |
| void ComputeResourcePreference::__set_overridebyAiravata(const bool val) { |
| this->overridebyAiravata = val; |
| } |
| |
| void ComputeResourcePreference::__set_loginUserName(const std::string& val) { |
| this->loginUserName = val; |
| __isset.loginUserName = true; |
| } |
| |
| void ComputeResourcePreference::__set_preferredJobSubmissionProtocol(const ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type val) { |
| this->preferredJobSubmissionProtocol = val; |
| __isset.preferredJobSubmissionProtocol = true; |
| } |
| |
| void ComputeResourcePreference::__set_preferredDataMovementProtocol(const ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type val) { |
| this->preferredDataMovementProtocol = val; |
| __isset.preferredDataMovementProtocol = true; |
| } |
| |
| void ComputeResourcePreference::__set_preferredBatchQueue(const std::string& val) { |
| this->preferredBatchQueue = val; |
| __isset.preferredBatchQueue = true; |
| } |
| |
| void ComputeResourcePreference::__set_scratchLocation(const std::string& val) { |
| this->scratchLocation = val; |
| __isset.scratchLocation = true; |
| } |
| |
| void ComputeResourcePreference::__set_allocationProjectNumber(const std::string& val) { |
| this->allocationProjectNumber = val; |
| __isset.allocationProjectNumber = true; |
| } |
| |
| void ComputeResourcePreference::__set_resourceSpecificCredentialStoreToken(const std::string& val) { |
| this->resourceSpecificCredentialStoreToken = val; |
| __isset.resourceSpecificCredentialStoreToken = true; |
| } |
| |
| const char* ComputeResourcePreference::ascii_fingerprint = "294547CFB0912EC49097370EC1C66E41"; |
| const uint8_t ComputeResourcePreference::binary_fingerprint[16] = {0x29,0x45,0x47,0xCF,0xB0,0x91,0x2E,0xC4,0x90,0x97,0x37,0x0E,0xC1,0xC6,0x6E,0x41}; |
| |
| 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->loginUserName); |
| this->__isset.loginUserName = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 4: |
| if (ftype == ::apache::thrift::protocol::T_I32) { |
| int32_t ecast0; |
| xfer += iprot->readI32(ecast0); |
| this->preferredJobSubmissionProtocol = ( ::apache::airavata::model::appcatalog::computeresource::JobSubmissionProtocol::type)ecast0; |
| this->__isset.preferredJobSubmissionProtocol = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 5: |
| if (ftype == ::apache::thrift::protocol::T_I32) { |
| int32_t ecast1; |
| xfer += iprot->readI32(ecast1); |
| this->preferredDataMovementProtocol = ( ::apache::airavata::model::appcatalog::computeresource::DataMovementProtocol::type)ecast1; |
| this->__isset.preferredDataMovementProtocol = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 6: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->preferredBatchQueue); |
| this->__isset.preferredBatchQueue = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 7: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->scratchLocation); |
| this->__isset.scratchLocation = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 8: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->allocationProjectNumber); |
| this->__isset.allocationProjectNumber = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 9: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->resourceSpecificCredentialStoreToken); |
| this->__isset.resourceSpecificCredentialStoreToken = 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; |
| oprot->incrementRecursionDepth(); |
| 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.loginUserName) { |
| xfer += oprot->writeFieldBegin("loginUserName", ::apache::thrift::protocol::T_STRING, 3); |
| xfer += oprot->writeString(this->loginUserName); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.preferredJobSubmissionProtocol) { |
| xfer += oprot->writeFieldBegin("preferredJobSubmissionProtocol", ::apache::thrift::protocol::T_I32, 4); |
| xfer += oprot->writeI32((int32_t)this->preferredJobSubmissionProtocol); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.preferredDataMovementProtocol) { |
| xfer += oprot->writeFieldBegin("preferredDataMovementProtocol", ::apache::thrift::protocol::T_I32, 5); |
| xfer += oprot->writeI32((int32_t)this->preferredDataMovementProtocol); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.preferredBatchQueue) { |
| xfer += oprot->writeFieldBegin("preferredBatchQueue", ::apache::thrift::protocol::T_STRING, 6); |
| xfer += oprot->writeString(this->preferredBatchQueue); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.scratchLocation) { |
| xfer += oprot->writeFieldBegin("scratchLocation", ::apache::thrift::protocol::T_STRING, 7); |
| xfer += oprot->writeString(this->scratchLocation); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.allocationProjectNumber) { |
| xfer += oprot->writeFieldBegin("allocationProjectNumber", ::apache::thrift::protocol::T_STRING, 8); |
| xfer += oprot->writeString(this->allocationProjectNumber); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.resourceSpecificCredentialStoreToken) { |
| xfer += oprot->writeFieldBegin("resourceSpecificCredentialStoreToken", ::apache::thrift::protocol::T_STRING, 9); |
| xfer += oprot->writeString(this->resourceSpecificCredentialStoreToken); |
| xfer += oprot->writeFieldEnd(); |
| } |
| xfer += oprot->writeFieldStop(); |
| xfer += oprot->writeStructEnd(); |
| oprot->decrementRecursionDepth(); |
| return xfer; |
| } |
| |
| void swap(ComputeResourcePreference &a, ComputeResourcePreference &b) { |
| using ::std::swap; |
| swap(a.computeResourceId, b.computeResourceId); |
| swap(a.overridebyAiravata, b.overridebyAiravata); |
| swap(a.loginUserName, b.loginUserName); |
| 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.resourceSpecificCredentialStoreToken, b.resourceSpecificCredentialStoreToken); |
| swap(a.__isset, b.__isset); |
| } |
| |
| ComputeResourcePreference::ComputeResourcePreference(const ComputeResourcePreference& other2) { |
| computeResourceId = other2.computeResourceId; |
| overridebyAiravata = other2.overridebyAiravata; |
| loginUserName = other2.loginUserName; |
| preferredJobSubmissionProtocol = other2.preferredJobSubmissionProtocol; |
| preferredDataMovementProtocol = other2.preferredDataMovementProtocol; |
| preferredBatchQueue = other2.preferredBatchQueue; |
| scratchLocation = other2.scratchLocation; |
| allocationProjectNumber = other2.allocationProjectNumber; |
| resourceSpecificCredentialStoreToken = other2.resourceSpecificCredentialStoreToken; |
| __isset = other2.__isset; |
| } |
| ComputeResourcePreference& ComputeResourcePreference::operator=(const ComputeResourcePreference& other3) { |
| computeResourceId = other3.computeResourceId; |
| overridebyAiravata = other3.overridebyAiravata; |
| loginUserName = other3.loginUserName; |
| preferredJobSubmissionProtocol = other3.preferredJobSubmissionProtocol; |
| preferredDataMovementProtocol = other3.preferredDataMovementProtocol; |
| preferredBatchQueue = other3.preferredBatchQueue; |
| scratchLocation = other3.scratchLocation; |
| allocationProjectNumber = other3.allocationProjectNumber; |
| resourceSpecificCredentialStoreToken = other3.resourceSpecificCredentialStoreToken; |
| __isset = other3.__isset; |
| return *this; |
| } |
| std::ostream& operator<<(std::ostream& out, const ComputeResourcePreference& obj) { |
| using apache::thrift::to_string; |
| out << "ComputeResourcePreference("; |
| out << "computeResourceId=" << to_string(obj.computeResourceId); |
| out << ", " << "overridebyAiravata=" << to_string(obj.overridebyAiravata); |
| out << ", " << "loginUserName="; (obj.__isset.loginUserName ? (out << to_string(obj.loginUserName)) : (out << "<null>")); |
| out << ", " << "preferredJobSubmissionProtocol="; (obj.__isset.preferredJobSubmissionProtocol ? (out << to_string(obj.preferredJobSubmissionProtocol)) : (out << "<null>")); |
| out << ", " << "preferredDataMovementProtocol="; (obj.__isset.preferredDataMovementProtocol ? (out << to_string(obj.preferredDataMovementProtocol)) : (out << "<null>")); |
| out << ", " << "preferredBatchQueue="; (obj.__isset.preferredBatchQueue ? (out << to_string(obj.preferredBatchQueue)) : (out << "<null>")); |
| out << ", " << "scratchLocation="; (obj.__isset.scratchLocation ? (out << to_string(obj.scratchLocation)) : (out << "<null>")); |
| out << ", " << "allocationProjectNumber="; (obj.__isset.allocationProjectNumber ? (out << to_string(obj.allocationProjectNumber)) : (out << "<null>")); |
| out << ", " << "resourceSpecificCredentialStoreToken="; (obj.__isset.resourceSpecificCredentialStoreToken ? (out << to_string(obj.resourceSpecificCredentialStoreToken)) : (out << "<null>")); |
| out << ")"; |
| return out; |
| } |
| |
| |
| DataStoragePreference::~DataStoragePreference() throw() { |
| } |
| |
| |
| void DataStoragePreference::__set_dataMovememtResourceId(const std::string& val) { |
| this->dataMovememtResourceId = val; |
| } |
| |
| void DataStoragePreference::__set_loginUserName(const std::string& val) { |
| this->loginUserName = val; |
| __isset.loginUserName = true; |
| } |
| |
| void DataStoragePreference::__set_fileSystemRootLocation(const std::string& val) { |
| this->fileSystemRootLocation = val; |
| __isset.fileSystemRootLocation = true; |
| } |
| |
| void DataStoragePreference::__set_resourceSpecificCredentialStoreToken(const std::string& val) { |
| this->resourceSpecificCredentialStoreToken = val; |
| __isset.resourceSpecificCredentialStoreToken = true; |
| } |
| |
| const char* DataStoragePreference::ascii_fingerprint = "6BA700CA2E5FC52A8DA5ADCF811DC8DA"; |
| const uint8_t DataStoragePreference::binary_fingerprint[16] = {0x6B,0xA7,0x00,0xCA,0x2E,0x5F,0xC5,0x2A,0x8D,0xA5,0xAD,0xCF,0x81,0x1D,0xC8,0xDA}; |
| |
| uint32_t DataStoragePreference::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_dataMovememtResourceId = 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->dataMovememtResourceId); |
| isset_dataMovememtResourceId = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 2: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->loginUserName); |
| this->__isset.loginUserName = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 3: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->fileSystemRootLocation); |
| this->__isset.fileSystemRootLocation = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 4: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->resourceSpecificCredentialStoreToken); |
| this->__isset.resourceSpecificCredentialStoreToken = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| default: |
| xfer += iprot->skip(ftype); |
| break; |
| } |
| xfer += iprot->readFieldEnd(); |
| } |
| |
| xfer += iprot->readStructEnd(); |
| |
| if (!isset_dataMovememtResourceId) |
| throw TProtocolException(TProtocolException::INVALID_DATA); |
| return xfer; |
| } |
| |
| uint32_t DataStoragePreference::write(::apache::thrift::protocol::TProtocol* oprot) const { |
| uint32_t xfer = 0; |
| oprot->incrementRecursionDepth(); |
| xfer += oprot->writeStructBegin("DataStoragePreference"); |
| |
| xfer += oprot->writeFieldBegin("dataMovememtResourceId", ::apache::thrift::protocol::T_STRING, 1); |
| xfer += oprot->writeString(this->dataMovememtResourceId); |
| xfer += oprot->writeFieldEnd(); |
| |
| if (this->__isset.loginUserName) { |
| xfer += oprot->writeFieldBegin("loginUserName", ::apache::thrift::protocol::T_STRING, 2); |
| xfer += oprot->writeString(this->loginUserName); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.fileSystemRootLocation) { |
| xfer += oprot->writeFieldBegin("fileSystemRootLocation", ::apache::thrift::protocol::T_STRING, 3); |
| xfer += oprot->writeString(this->fileSystemRootLocation); |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.resourceSpecificCredentialStoreToken) { |
| xfer += oprot->writeFieldBegin("resourceSpecificCredentialStoreToken", ::apache::thrift::protocol::T_STRING, 4); |
| xfer += oprot->writeString(this->resourceSpecificCredentialStoreToken); |
| xfer += oprot->writeFieldEnd(); |
| } |
| xfer += oprot->writeFieldStop(); |
| xfer += oprot->writeStructEnd(); |
| oprot->decrementRecursionDepth(); |
| return xfer; |
| } |
| |
| void swap(DataStoragePreference &a, DataStoragePreference &b) { |
| using ::std::swap; |
| swap(a.dataMovememtResourceId, b.dataMovememtResourceId); |
| swap(a.loginUserName, b.loginUserName); |
| swap(a.fileSystemRootLocation, b.fileSystemRootLocation); |
| swap(a.resourceSpecificCredentialStoreToken, b.resourceSpecificCredentialStoreToken); |
| swap(a.__isset, b.__isset); |
| } |
| |
| DataStoragePreference::DataStoragePreference(const DataStoragePreference& other4) { |
| dataMovememtResourceId = other4.dataMovememtResourceId; |
| loginUserName = other4.loginUserName; |
| fileSystemRootLocation = other4.fileSystemRootLocation; |
| resourceSpecificCredentialStoreToken = other4.resourceSpecificCredentialStoreToken; |
| __isset = other4.__isset; |
| } |
| DataStoragePreference& DataStoragePreference::operator=(const DataStoragePreference& other5) { |
| dataMovememtResourceId = other5.dataMovememtResourceId; |
| loginUserName = other5.loginUserName; |
| fileSystemRootLocation = other5.fileSystemRootLocation; |
| resourceSpecificCredentialStoreToken = other5.resourceSpecificCredentialStoreToken; |
| __isset = other5.__isset; |
| return *this; |
| } |
| std::ostream& operator<<(std::ostream& out, const DataStoragePreference& obj) { |
| using apache::thrift::to_string; |
| out << "DataStoragePreference("; |
| out << "dataMovememtResourceId=" << to_string(obj.dataMovememtResourceId); |
| out << ", " << "loginUserName="; (obj.__isset.loginUserName ? (out << to_string(obj.loginUserName)) : (out << "<null>")); |
| out << ", " << "fileSystemRootLocation="; (obj.__isset.fileSystemRootLocation ? (out << to_string(obj.fileSystemRootLocation)) : (out << "<null>")); |
| out << ", " << "resourceSpecificCredentialStoreToken="; (obj.__isset.resourceSpecificCredentialStoreToken ? (out << to_string(obj.resourceSpecificCredentialStoreToken)) : (out << "<null>")); |
| out << ")"; |
| return out; |
| } |
| |
| |
| GatewayResourceProfile::~GatewayResourceProfile() throw() { |
| } |
| |
| |
| void GatewayResourceProfile::__set_gatewayID(const std::string& val) { |
| this->gatewayID = val; |
| } |
| |
| void GatewayResourceProfile::__set_dataStorageHostName(const std::string& val) { |
| this->dataStorageHostName = val; |
| } |
| |
| void GatewayResourceProfile::__set_credentialStoreToken(const std::string& val) { |
| this->credentialStoreToken = val; |
| __isset.credentialStoreToken = true; |
| } |
| |
| void GatewayResourceProfile::__set_computeResourcePreferences(const std::vector<ComputeResourcePreference> & val) { |
| this->computeResourcePreferences = val; |
| __isset.computeResourcePreferences = true; |
| } |
| |
| void GatewayResourceProfile::__set_dataStoragePreferences(const std::vector<DataStoragePreference> & val) { |
| this->dataStoragePreferences = val; |
| __isset.dataStoragePreferences = true; |
| } |
| |
| const char* GatewayResourceProfile::ascii_fingerprint = "37EFF83E3A15E60FB3772FDFEAD90A88"; |
| const uint8_t GatewayResourceProfile::binary_fingerprint[16] = {0x37,0xEF,0xF8,0x3E,0x3A,0x15,0xE6,0x0F,0xB3,0x77,0x2F,0xDF,0xEA,0xD9,0x0A,0x88}; |
| |
| uint32_t GatewayResourceProfile::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_gatewayID = false; |
| bool isset_dataStorageHostName = 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->gatewayID); |
| isset_gatewayID = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 2: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->dataStorageHostName); |
| isset_dataStorageHostName = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 3: |
| if (ftype == ::apache::thrift::protocol::T_STRING) { |
| xfer += iprot->readString(this->credentialStoreToken); |
| this->__isset.credentialStoreToken = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 4: |
| if (ftype == ::apache::thrift::protocol::T_LIST) { |
| { |
| this->computeResourcePreferences.clear(); |
| uint32_t _size6; |
| ::apache::thrift::protocol::TType _etype9; |
| xfer += iprot->readListBegin(_etype9, _size6); |
| this->computeResourcePreferences.resize(_size6); |
| uint32_t _i10; |
| for (_i10 = 0; _i10 < _size6; ++_i10) |
| { |
| xfer += this->computeResourcePreferences[_i10].read(iprot); |
| } |
| xfer += iprot->readListEnd(); |
| } |
| this->__isset.computeResourcePreferences = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| case 5: |
| if (ftype == ::apache::thrift::protocol::T_LIST) { |
| { |
| this->dataStoragePreferences.clear(); |
| uint32_t _size11; |
| ::apache::thrift::protocol::TType _etype14; |
| xfer += iprot->readListBegin(_etype14, _size11); |
| this->dataStoragePreferences.resize(_size11); |
| uint32_t _i15; |
| for (_i15 = 0; _i15 < _size11; ++_i15) |
| { |
| xfer += this->dataStoragePreferences[_i15].read(iprot); |
| } |
| xfer += iprot->readListEnd(); |
| } |
| this->__isset.dataStoragePreferences = true; |
| } else { |
| xfer += iprot->skip(ftype); |
| } |
| break; |
| default: |
| xfer += iprot->skip(ftype); |
| break; |
| } |
| xfer += iprot->readFieldEnd(); |
| } |
| |
| xfer += iprot->readStructEnd(); |
| |
| if (!isset_gatewayID) |
| throw TProtocolException(TProtocolException::INVALID_DATA); |
| if (!isset_dataStorageHostName) |
| throw TProtocolException(TProtocolException::INVALID_DATA); |
| return xfer; |
| } |
| |
| uint32_t GatewayResourceProfile::write(::apache::thrift::protocol::TProtocol* oprot) const { |
| uint32_t xfer = 0; |
| oprot->incrementRecursionDepth(); |
| xfer += oprot->writeStructBegin("GatewayResourceProfile"); |
| |
| xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 1); |
| xfer += oprot->writeString(this->gatewayID); |
| xfer += oprot->writeFieldEnd(); |
| |
| xfer += oprot->writeFieldBegin("dataStorageHostName", ::apache::thrift::protocol::T_STRING, 2); |
| xfer += oprot->writeString(this->dataStorageHostName); |
| xfer += oprot->writeFieldEnd(); |
| |
| if (this->__isset.credentialStoreToken) { |
| xfer += oprot->writeFieldBegin("credentialStoreToken", ::apache::thrift::protocol::T_STRING, 3); |
| xfer += oprot->writeString(this->credentialStoreToken); |
| xfer += oprot->writeFieldEnd(); |
| } |
| 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 _iter16; |
| for (_iter16 = this->computeResourcePreferences.begin(); _iter16 != this->computeResourcePreferences.end(); ++_iter16) |
| { |
| xfer += (*_iter16).write(oprot); |
| } |
| xfer += oprot->writeListEnd(); |
| } |
| xfer += oprot->writeFieldEnd(); |
| } |
| if (this->__isset.dataStoragePreferences) { |
| xfer += oprot->writeFieldBegin("dataStoragePreferences", ::apache::thrift::protocol::T_LIST, 5); |
| { |
| xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->dataStoragePreferences.size())); |
| std::vector<DataStoragePreference> ::const_iterator _iter17; |
| for (_iter17 = this->dataStoragePreferences.begin(); _iter17 != this->dataStoragePreferences.end(); ++_iter17) |
| { |
| xfer += (*_iter17).write(oprot); |
| } |
| xfer += oprot->writeListEnd(); |
| } |
| xfer += oprot->writeFieldEnd(); |
| } |
| xfer += oprot->writeFieldStop(); |
| xfer += oprot->writeStructEnd(); |
| oprot->decrementRecursionDepth(); |
| return xfer; |
| } |
| |
| void swap(GatewayResourceProfile &a, GatewayResourceProfile &b) { |
| using ::std::swap; |
| swap(a.gatewayID, b.gatewayID); |
| swap(a.dataStorageHostName, b.dataStorageHostName); |
| swap(a.credentialStoreToken, b.credentialStoreToken); |
| swap(a.computeResourcePreferences, b.computeResourcePreferences); |
| swap(a.dataStoragePreferences, b.dataStoragePreferences); |
| swap(a.__isset, b.__isset); |
| } |
| |
| GatewayResourceProfile::GatewayResourceProfile(const GatewayResourceProfile& other18) { |
| gatewayID = other18.gatewayID; |
| dataStorageHostName = other18.dataStorageHostName; |
| credentialStoreToken = other18.credentialStoreToken; |
| computeResourcePreferences = other18.computeResourcePreferences; |
| dataStoragePreferences = other18.dataStoragePreferences; |
| __isset = other18.__isset; |
| } |
| GatewayResourceProfile& GatewayResourceProfile::operator=(const GatewayResourceProfile& other19) { |
| gatewayID = other19.gatewayID; |
| dataStorageHostName = other19.dataStorageHostName; |
| credentialStoreToken = other19.credentialStoreToken; |
| computeResourcePreferences = other19.computeResourcePreferences; |
| dataStoragePreferences = other19.dataStoragePreferences; |
| __isset = other19.__isset; |
| return *this; |
| } |
| std::ostream& operator<<(std::ostream& out, const GatewayResourceProfile& obj) { |
| using apache::thrift::to_string; |
| out << "GatewayResourceProfile("; |
| out << "gatewayID=" << to_string(obj.gatewayID); |
| out << ", " << "dataStorageHostName=" << to_string(obj.dataStorageHostName); |
| out << ", " << "credentialStoreToken="; (obj.__isset.credentialStoreToken ? (out << to_string(obj.credentialStoreToken)) : (out << "<null>")); |
| out << ", " << "computeResourcePreferences="; (obj.__isset.computeResourcePreferences ? (out << to_string(obj.computeResourcePreferences)) : (out << "<null>")); |
| out << ", " << "dataStoragePreferences="; (obj.__isset.dataStoragePreferences ? (out << to_string(obj.dataStoragePreferences)) : (out << "<null>")); |
| out << ")"; |
| return out; |
| } |
| |
| }}}}} // namespace |