http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d55608f1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp deleted file mode 100644 index 8dbb408..0000000 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp +++ /dev/null @@ -1,982 +0,0 @@ -/** - * 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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#include "user_profile_model_types.h" - -#include <algorithm> -#include <ostream> - -#include <thrift/TToString.h> - -namespace apache { namespace airavata { namespace model { namespace user { - -int _kStatusValues[] = { - Status::ACTIVE, - Status::CONFIRMED, - Status::APPROVED, - Status::DELETED, - Status::DUPLICATE, - Status::GRACE_PERIOD, - Status::INVITED, - Status::DENIED, - Status::PENDING, - Status::PENDING_APPROVAL, - Status::PENDING_CONFIRMATION, - Status::SUSPENDED, - Status::DECLINED, - Status::EXPIRED -}; -const char* _kStatusNames[] = { - "ACTIVE", - "CONFIRMED", - "APPROVED", - "DELETED", - "DUPLICATE", - "GRACE_PERIOD", - "INVITED", - "DENIED", - "PENDING", - "PENDING_APPROVAL", - "PENDING_CONFIRMATION", - "SUSPENDED", - "DECLINED", - "EXPIRED" -}; -const std::map<int, const char*> _Status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(14, _kStatusValues, _kStatusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kUSCitizenshipValues[] = { - USCitizenship::US_CITIZEN, - USCitizenship::US_PERMANENT_RESIDENT, - USCitizenship::OTHER_NON_US_CITIZEN -}; -const char* _kUSCitizenshipNames[] = { - "US_CITIZEN", - "US_PERMANENT_RESIDENT", - "OTHER_NON_US_CITIZEN" -}; -const std::map<int, const char*> _USCitizenship_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kUSCitizenshipValues, _kUSCitizenshipNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kethnicityValues[] = { - ethnicity::HISPANIC_LATINO, - ethnicity::NOT_HISPANIC_LATINO -}; -const char* _kethnicityNames[] = { - "HISPANIC_LATINO", - "NOT_HISPANIC_LATINO" -}; -const std::map<int, const char*> _ethnicity_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kethnicityValues, _kethnicityNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kraceValues[] = { - race::ASIAN, - race::AMERICAN_INDIAN_OR_ALASKAN_NATIVE, - race::BLACK_OR_AFRICAN_AMERICAN, - race::NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER, - race::WHITE -}; -const char* _kraceNames[] = { - "ASIAN", - "AMERICAN_INDIAN_OR_ALASKAN_NATIVE", - "BLACK_OR_AFRICAN_AMERICAN", - "NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER", - "WHITE" -}; -const std::map<int, const char*> _race_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kraceValues, _kraceNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - -int _kdisabilityValues[] = { - disability::HEARING_IMAPAIRED, - disability::VISUAL_IMPAIRED, - disability::MOBILITY_OR_ORTHOPEDIC_IMPAIRMENT, - disability::OTHER_IMPAIRMENT -}; -const char* _kdisabilityNames[] = { - "HEARING_IMAPAIRED", - "VISUAL_IMPAIRED", - "MOBILITY_OR_ORTHOPEDIC_IMPAIRMENT", - "OTHER_IMPAIRMENT" -}; -const std::map<int, const char*> _disability_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kdisabilityValues, _kdisabilityNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); - - -NSFDemographics::~NSFDemographics() throw() { -} - - -void NSFDemographics::__set_gender(const std::string& val) { - this->gender = val; -__isset.gender = true; -} - -void NSFDemographics::__set_usCitizenship(const USCitizenship::type val) { - this->usCitizenship = val; -__isset.usCitizenship = true; -} - -void NSFDemographics::__set_ethnicities(const std::vector<ethnicity::type> & val) { - this->ethnicities = val; -__isset.ethnicities = true; -} - -void NSFDemographics::__set_races(const std::vector<race::type> & val) { - this->races = val; -__isset.races = true; -} - -void NSFDemographics::__set_disabilities(const std::vector<disability::type> & val) { - this->disabilities = val; -__isset.disabilities = true; -} - -uint32_t NSFDemographics::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->gender); - this->__isset.gender = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast0; - xfer += iprot->readI32(ecast0); - this->usCitizenship = (USCitizenship::type)ecast0; - this->__isset.usCitizenship = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->ethnicities.clear(); - uint32_t _size1; - ::apache::thrift::protocol::TType _etype4; - xfer += iprot->readListBegin(_etype4, _size1); - this->ethnicities.resize(_size1); - uint32_t _i5; - for (_i5 = 0; _i5 < _size1; ++_i5) - { - int32_t ecast6; - xfer += iprot->readI32(ecast6); - this->ethnicities[_i5] = (ethnicity::type)ecast6; - } - xfer += iprot->readListEnd(); - } - this->__isset.ethnicities = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->races.clear(); - uint32_t _size7; - ::apache::thrift::protocol::TType _etype10; - xfer += iprot->readListBegin(_etype10, _size7); - this->races.resize(_size7); - uint32_t _i11; - for (_i11 = 0; _i11 < _size7; ++_i11) - { - int32_t ecast12; - xfer += iprot->readI32(ecast12); - this->races[_i11] = (race::type)ecast12; - } - xfer += iprot->readListEnd(); - } - this->__isset.races = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->disabilities.clear(); - uint32_t _size13; - ::apache::thrift::protocol::TType _etype16; - xfer += iprot->readListBegin(_etype16, _size13); - this->disabilities.resize(_size13); - uint32_t _i17; - for (_i17 = 0; _i17 < _size13; ++_i17) - { - int32_t ecast18; - xfer += iprot->readI32(ecast18); - this->disabilities[_i17] = (disability::type)ecast18; - } - xfer += iprot->readListEnd(); - } - this->__isset.disabilities = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t NSFDemographics::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("NSFDemographics"); - - if (this->__isset.gender) { - xfer += oprot->writeFieldBegin("gender", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->gender); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.usCitizenship) { - xfer += oprot->writeFieldBegin("usCitizenship", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->usCitizenship); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.ethnicities) { - xfer += oprot->writeFieldBegin("ethnicities", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->ethnicities.size())); - std::vector<ethnicity::type> ::const_iterator _iter19; - for (_iter19 = this->ethnicities.begin(); _iter19 != this->ethnicities.end(); ++_iter19) - { - xfer += oprot->writeI32((int32_t)(*_iter19)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.races) { - xfer += oprot->writeFieldBegin("races", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->races.size())); - std::vector<race::type> ::const_iterator _iter20; - for (_iter20 = this->races.begin(); _iter20 != this->races.end(); ++_iter20) - { - xfer += oprot->writeI32((int32_t)(*_iter20)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.disabilities) { - xfer += oprot->writeFieldBegin("disabilities", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->disabilities.size())); - std::vector<disability::type> ::const_iterator _iter21; - for (_iter21 = this->disabilities.begin(); _iter21 != this->disabilities.end(); ++_iter21) - { - xfer += oprot->writeI32((int32_t)(*_iter21)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(NSFDemographics &a, NSFDemographics &b) { - using ::std::swap; - swap(a.gender, b.gender); - swap(a.usCitizenship, b.usCitizenship); - swap(a.ethnicities, b.ethnicities); - swap(a.races, b.races); - swap(a.disabilities, b.disabilities); - swap(a.__isset, b.__isset); -} - -NSFDemographics::NSFDemographics(const NSFDemographics& other22) { - gender = other22.gender; - usCitizenship = other22.usCitizenship; - ethnicities = other22.ethnicities; - races = other22.races; - disabilities = other22.disabilities; - __isset = other22.__isset; -} -NSFDemographics& NSFDemographics::operator=(const NSFDemographics& other23) { - gender = other23.gender; - usCitizenship = other23.usCitizenship; - ethnicities = other23.ethnicities; - races = other23.races; - disabilities = other23.disabilities; - __isset = other23.__isset; - return *this; -} -void NSFDemographics::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "NSFDemographics("; - out << "gender="; (__isset.gender ? (out << to_string(gender)) : (out << "<null>")); - out << ", " << "usCitizenship="; (__isset.usCitizenship ? (out << to_string(usCitizenship)) : (out << "<null>")); - out << ", " << "ethnicities="; (__isset.ethnicities ? (out << to_string(ethnicities)) : (out << "<null>")); - out << ", " << "races="; (__isset.races ? (out << to_string(races)) : (out << "<null>")); - out << ", " << "disabilities="; (__isset.disabilities ? (out << to_string(disabilities)) : (out << "<null>")); - out << ")"; -} - - -UserProfile::~UserProfile() throw() { -} - - -void UserProfile::__set_userModelVersion(const std::string& val) { - this->userModelVersion = val; -} - -void UserProfile::__set_airavataInternalUserId(const std::string& val) { - this->airavataInternalUserId = val; -} - -void UserProfile::__set_userId(const std::string& val) { - this->userId = val; -} - -void UserProfile::__set_gatewayId(const std::string& val) { - this->gatewayId = val; -} - -void UserProfile::__set_emails(const std::vector<std::string> & val) { - this->emails = val; -} - -void UserProfile::__set_userName(const std::string& val) { - this->userName = val; -__isset.userName = true; -} - -void UserProfile::__set_orcidId(const std::string& val) { - this->orcidId = val; -__isset.orcidId = true; -} - -void UserProfile::__set_phones(const std::vector<std::string> & val) { - this->phones = val; -__isset.phones = true; -} - -void UserProfile::__set_country(const std::string& val) { - this->country = val; -__isset.country = true; -} - -void UserProfile::__set_nationality(const std::vector<std::string> & val) { - this->nationality = val; -__isset.nationality = true; -} - -void UserProfile::__set_homeOrganization(const std::string& val) { - this->homeOrganization = val; -__isset.homeOrganization = true; -} - -void UserProfile::__set_orginationAffiliation(const std::string& val) { - this->orginationAffiliation = val; -__isset.orginationAffiliation = true; -} - -void UserProfile::__set_creationTime(const std::string& val) { - this->creationTime = val; -} - -void UserProfile::__set_lastAccessTime(const std::string& val) { - this->lastAccessTime = val; -} - -void UserProfile::__set_validUntil(const std::string& val) { - this->validUntil = val; -} - -void UserProfile::__set_State(const Status::type val) { - this->State = val; -} - -void UserProfile::__set_comments(const std::string& val) { - this->comments = val; -__isset.comments = true; -} - -void UserProfile::__set_labeledURI(const std::vector<std::string> & val) { - this->labeledURI = val; -__isset.labeledURI = true; -} - -void UserProfile::__set_gpgKey(const std::string& val) { - this->gpgKey = val; -__isset.gpgKey = true; -} - -void UserProfile::__set_timeZone(const std::string& val) { - this->timeZone = val; -__isset.timeZone = true; -} - -void UserProfile::__set_nsfDemographics(const NSFDemographics& val) { - this->nsfDemographics = val; -__isset.nsfDemographics = true; -} - -uint32_t UserProfile::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_userModelVersion = false; - bool isset_airavataInternalUserId = false; - bool isset_userId = false; - bool isset_gatewayId = false; - bool isset_emails = false; - bool isset_creationTime = false; - bool isset_lastAccessTime = false; - bool isset_validUntil = false; - bool isset_State = 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->userModelVersion); - isset_userModelVersion = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->airavataInternalUserId); - isset_airavataInternalUserId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->userId); - isset_userId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->gatewayId); - isset_gatewayId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->emails.clear(); - uint32_t _size24; - ::apache::thrift::protocol::TType _etype27; - xfer += iprot->readListBegin(_etype27, _size24); - this->emails.resize(_size24); - uint32_t _i28; - for (_i28 = 0; _i28 < _size24; ++_i28) - { - xfer += iprot->readString(this->emails[_i28]); - } - xfer += iprot->readListEnd(); - } - isset_emails = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->userName); - this->__isset.userName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->orcidId); - this->__isset.orcidId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->phones.clear(); - uint32_t _size29; - ::apache::thrift::protocol::TType _etype32; - xfer += iprot->readListBegin(_etype32, _size29); - this->phones.resize(_size29); - uint32_t _i33; - for (_i33 = 0; _i33 < _size29; ++_i33) - { - xfer += iprot->readString(this->phones[_i33]); - } - xfer += iprot->readListEnd(); - } - this->__isset.phones = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->country); - this->__isset.country = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->nationality.clear(); - uint32_t _size34; - ::apache::thrift::protocol::TType _etype37; - xfer += iprot->readListBegin(_etype37, _size34); - this->nationality.resize(_size34); - uint32_t _i38; - for (_i38 = 0; _i38 < _size34; ++_i38) - { - xfer += iprot->readString(this->nationality[_i38]); - } - xfer += iprot->readListEnd(); - } - this->__isset.nationality = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->homeOrganization); - this->__isset.homeOrganization = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->orginationAffiliation); - this->__isset.orginationAffiliation = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->creationTime); - isset_creationTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 14: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->lastAccessTime); - isset_lastAccessTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 15: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->validUntil); - isset_validUntil = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 16: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast39; - xfer += iprot->readI32(ecast39); - this->State = (Status::type)ecast39; - isset_State = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 17: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->comments); - this->__isset.comments = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 18: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->labeledURI.clear(); - uint32_t _size40; - ::apache::thrift::protocol::TType _etype43; - xfer += iprot->readListBegin(_etype43, _size40); - this->labeledURI.resize(_size40); - uint32_t _i44; - for (_i44 = 0; _i44 < _size40; ++_i44) - { - xfer += iprot->readString(this->labeledURI[_i44]); - } - xfer += iprot->readListEnd(); - } - this->__isset.labeledURI = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 19: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->gpgKey); - this->__isset.gpgKey = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 20: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->timeZone); - this->__isset.timeZone = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 21: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->nsfDemographics.read(iprot); - this->__isset.nsfDemographics = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_userModelVersion) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_airavataInternalUserId) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_userId) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_gatewayId) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_emails) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_creationTime) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_lastAccessTime) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_validUntil) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_State) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t UserProfile::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("UserProfile"); - - xfer += oprot->writeFieldBegin("userModelVersion", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->userModelVersion); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("airavataInternalUserId", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->airavataInternalUserId); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("userId", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->userId); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->gatewayId); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("emails", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->emails.size())); - std::vector<std::string> ::const_iterator _iter45; - for (_iter45 = this->emails.begin(); _iter45 != this->emails.end(); ++_iter45) - { - xfer += oprot->writeString((*_iter45)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - - if (this->__isset.userName) { - xfer += oprot->writeFieldBegin("userName", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->userName); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.orcidId) { - xfer += oprot->writeFieldBegin("orcidId", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->orcidId); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.phones) { - xfer += oprot->writeFieldBegin("phones", ::apache::thrift::protocol::T_LIST, 8); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->phones.size())); - std::vector<std::string> ::const_iterator _iter46; - for (_iter46 = this->phones.begin(); _iter46 != this->phones.end(); ++_iter46) - { - xfer += oprot->writeString((*_iter46)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.country) { - xfer += oprot->writeFieldBegin("country", ::apache::thrift::protocol::T_STRING, 9); - xfer += oprot->writeString(this->country); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.nationality) { - xfer += oprot->writeFieldBegin("nationality", ::apache::thrift::protocol::T_LIST, 10); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->nationality.size())); - std::vector<std::string> ::const_iterator _iter47; - for (_iter47 = this->nationality.begin(); _iter47 != this->nationality.end(); ++_iter47) - { - xfer += oprot->writeString((*_iter47)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.homeOrganization) { - xfer += oprot->writeFieldBegin("homeOrganization", ::apache::thrift::protocol::T_STRING, 11); - xfer += oprot->writeString(this->homeOrganization); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.orginationAffiliation) { - xfer += oprot->writeFieldBegin("orginationAffiliation", ::apache::thrift::protocol::T_STRING, 12); - xfer += oprot->writeString(this->orginationAffiliation); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("creationTime", ::apache::thrift::protocol::T_STRING, 13); - xfer += oprot->writeString(this->creationTime); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_STRING, 14); - xfer += oprot->writeString(this->lastAccessTime); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("validUntil", ::apache::thrift::protocol::T_STRING, 15); - xfer += oprot->writeString(this->validUntil); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("State", ::apache::thrift::protocol::T_I32, 16); - xfer += oprot->writeI32((int32_t)this->State); - xfer += oprot->writeFieldEnd(); - - if (this->__isset.comments) { - xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 17); - xfer += oprot->writeString(this->comments); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.labeledURI) { - xfer += oprot->writeFieldBegin("labeledURI", ::apache::thrift::protocol::T_LIST, 18); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->labeledURI.size())); - std::vector<std::string> ::const_iterator _iter48; - for (_iter48 = this->labeledURI.begin(); _iter48 != this->labeledURI.end(); ++_iter48) - { - xfer += oprot->writeString((*_iter48)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.gpgKey) { - xfer += oprot->writeFieldBegin("gpgKey", ::apache::thrift::protocol::T_STRING, 19); - xfer += oprot->writeString(this->gpgKey); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.timeZone) { - xfer += oprot->writeFieldBegin("timeZone", ::apache::thrift::protocol::T_STRING, 20); - xfer += oprot->writeString(this->timeZone); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.nsfDemographics) { - xfer += oprot->writeFieldBegin("nsfDemographics", ::apache::thrift::protocol::T_STRUCT, 21); - xfer += this->nsfDemographics.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(UserProfile &a, UserProfile &b) { - using ::std::swap; - swap(a.userModelVersion, b.userModelVersion); - swap(a.airavataInternalUserId, b.airavataInternalUserId); - swap(a.userId, b.userId); - swap(a.gatewayId, b.gatewayId); - swap(a.emails, b.emails); - swap(a.userName, b.userName); - swap(a.orcidId, b.orcidId); - swap(a.phones, b.phones); - swap(a.country, b.country); - swap(a.nationality, b.nationality); - swap(a.homeOrganization, b.homeOrganization); - swap(a.orginationAffiliation, b.orginationAffiliation); - swap(a.creationTime, b.creationTime); - swap(a.lastAccessTime, b.lastAccessTime); - swap(a.validUntil, b.validUntil); - swap(a.State, b.State); - swap(a.comments, b.comments); - swap(a.labeledURI, b.labeledURI); - swap(a.gpgKey, b.gpgKey); - swap(a.timeZone, b.timeZone); - swap(a.nsfDemographics, b.nsfDemographics); - swap(a.__isset, b.__isset); -} - -UserProfile::UserProfile(const UserProfile& other49) { - userModelVersion = other49.userModelVersion; - airavataInternalUserId = other49.airavataInternalUserId; - userId = other49.userId; - gatewayId = other49.gatewayId; - emails = other49.emails; - userName = other49.userName; - orcidId = other49.orcidId; - phones = other49.phones; - country = other49.country; - nationality = other49.nationality; - homeOrganization = other49.homeOrganization; - orginationAffiliation = other49.orginationAffiliation; - creationTime = other49.creationTime; - lastAccessTime = other49.lastAccessTime; - validUntil = other49.validUntil; - State = other49.State; - comments = other49.comments; - labeledURI = other49.labeledURI; - gpgKey = other49.gpgKey; - timeZone = other49.timeZone; - nsfDemographics = other49.nsfDemographics; - __isset = other49.__isset; -} -UserProfile& UserProfile::operator=(const UserProfile& other50) { - userModelVersion = other50.userModelVersion; - airavataInternalUserId = other50.airavataInternalUserId; - userId = other50.userId; - gatewayId = other50.gatewayId; - emails = other50.emails; - userName = other50.userName; - orcidId = other50.orcidId; - phones = other50.phones; - country = other50.country; - nationality = other50.nationality; - homeOrganization = other50.homeOrganization; - orginationAffiliation = other50.orginationAffiliation; - creationTime = other50.creationTime; - lastAccessTime = other50.lastAccessTime; - validUntil = other50.validUntil; - State = other50.State; - comments = other50.comments; - labeledURI = other50.labeledURI; - gpgKey = other50.gpgKey; - timeZone = other50.timeZone; - nsfDemographics = other50.nsfDemographics; - __isset = other50.__isset; - return *this; -} -void UserProfile::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UserProfile("; - out << "userModelVersion=" << to_string(userModelVersion); - out << ", " << "airavataInternalUserId=" << to_string(airavataInternalUserId); - out << ", " << "userId=" << to_string(userId); - out << ", " << "gatewayId=" << to_string(gatewayId); - out << ", " << "emails=" << to_string(emails); - out << ", " << "userName="; (__isset.userName ? (out << to_string(userName)) : (out << "<null>")); - out << ", " << "orcidId="; (__isset.orcidId ? (out << to_string(orcidId)) : (out << "<null>")); - out << ", " << "phones="; (__isset.phones ? (out << to_string(phones)) : (out << "<null>")); - out << ", " << "country="; (__isset.country ? (out << to_string(country)) : (out << "<null>")); - out << ", " << "nationality="; (__isset.nationality ? (out << to_string(nationality)) : (out << "<null>")); - out << ", " << "homeOrganization="; (__isset.homeOrganization ? (out << to_string(homeOrganization)) : (out << "<null>")); - out << ", " << "orginationAffiliation="; (__isset.orginationAffiliation ? (out << to_string(orginationAffiliation)) : (out << "<null>")); - out << ", " << "creationTime=" << to_string(creationTime); - out << ", " << "lastAccessTime=" << to_string(lastAccessTime); - out << ", " << "validUntil=" << to_string(validUntil); - out << ", " << "State=" << to_string(State); - out << ", " << "comments="; (__isset.comments ? (out << to_string(comments)) : (out << "<null>")); - out << ", " << "labeledURI="; (__isset.labeledURI ? (out << to_string(labeledURI)) : (out << "<null>")); - out << ", " << "gpgKey="; (__isset.gpgKey ? (out << to_string(gpgKey)) : (out << "<null>")); - out << ", " << "timeZone="; (__isset.timeZone ? (out << to_string(timeZone)) : (out << "<null>")); - out << ", " << "nsfDemographics="; (__isset.nsfDemographics ? (out << to_string(nsfDemographics)) : (out << "<null>")); - out << ")"; -} - -}}}} // namespace
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d55608f1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h deleted file mode 100644 index 69fa0a0..0000000 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.h +++ /dev/null @@ -1,370 +0,0 @@ -/** - * 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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#ifndef user_profile_model_TYPES_H -#define user_profile_model_TYPES_H - -#include <iosfwd> - -#include <thrift/Thrift.h> -#include <thrift/TApplicationException.h> -#include <thrift/protocol/TProtocol.h> -#include <thrift/transport/TTransport.h> - -#include <thrift/cxxfunctional.h> -#include "airavata_commons_types.h" - - -namespace apache { namespace airavata { namespace model { namespace user { - -struct Status { - enum type { - ACTIVE = 0, - CONFIRMED = 1, - APPROVED = 2, - DELETED = 3, - DUPLICATE = 4, - GRACE_PERIOD = 5, - INVITED = 6, - DENIED = 7, - PENDING = 8, - PENDING_APPROVAL = 9, - PENDING_CONFIRMATION = 10, - SUSPENDED = 11, - DECLINED = 12, - EXPIRED = 13 - }; -}; - -extern const std::map<int, const char*> _Status_VALUES_TO_NAMES; - -struct USCitizenship { - enum type { - US_CITIZEN = 0, - US_PERMANENT_RESIDENT = 1, - OTHER_NON_US_CITIZEN = 2 - }; -}; - -extern const std::map<int, const char*> _USCitizenship_VALUES_TO_NAMES; - -struct ethnicity { - enum type { - HISPANIC_LATINO = 0, - NOT_HISPANIC_LATINO = 1 - }; -}; - -extern const std::map<int, const char*> _ethnicity_VALUES_TO_NAMES; - -struct race { - enum type { - ASIAN = 0, - AMERICAN_INDIAN_OR_ALASKAN_NATIVE = 1, - BLACK_OR_AFRICAN_AMERICAN = 2, - NATIVE_HAWAIIAN_OR_PACIFIC_ISLANDER = 3, - WHITE = 4 - }; -}; - -extern const std::map<int, const char*> _race_VALUES_TO_NAMES; - -struct disability { - enum type { - HEARING_IMAPAIRED = 0, - VISUAL_IMPAIRED = 1, - MOBILITY_OR_ORTHOPEDIC_IMPAIRMENT = 2, - OTHER_IMPAIRMENT = 3 - }; -}; - -extern const std::map<int, const char*> _disability_VALUES_TO_NAMES; - -class NSFDemographics; - -class UserProfile; - -typedef struct _NSFDemographics__isset { - _NSFDemographics__isset() : gender(false), usCitizenship(false), ethnicities(false), races(false), disabilities(false) {} - bool gender :1; - bool usCitizenship :1; - bool ethnicities :1; - bool races :1; - bool disabilities :1; -} _NSFDemographics__isset; - -class NSFDemographics { - public: - - NSFDemographics(const NSFDemographics&); - NSFDemographics& operator=(const NSFDemographics&); - NSFDemographics() : gender(), usCitizenship((USCitizenship::type)0) { - } - - virtual ~NSFDemographics() throw(); - std::string gender; - USCitizenship::type usCitizenship; - std::vector<ethnicity::type> ethnicities; - std::vector<race::type> races; - std::vector<disability::type> disabilities; - - _NSFDemographics__isset __isset; - - void __set_gender(const std::string& val); - - void __set_usCitizenship(const USCitizenship::type val); - - void __set_ethnicities(const std::vector<ethnicity::type> & val); - - void __set_races(const std::vector<race::type> & val); - - void __set_disabilities(const std::vector<disability::type> & val); - - bool operator == (const NSFDemographics & rhs) const - { - if (__isset.gender != rhs.__isset.gender) - return false; - else if (__isset.gender && !(gender == rhs.gender)) - return false; - if (__isset.usCitizenship != rhs.__isset.usCitizenship) - return false; - else if (__isset.usCitizenship && !(usCitizenship == rhs.usCitizenship)) - return false; - if (__isset.ethnicities != rhs.__isset.ethnicities) - return false; - else if (__isset.ethnicities && !(ethnicities == rhs.ethnicities)) - return false; - if (__isset.races != rhs.__isset.races) - return false; - else if (__isset.races && !(races == rhs.races)) - return false; - if (__isset.disabilities != rhs.__isset.disabilities) - return false; - else if (__isset.disabilities && !(disabilities == rhs.disabilities)) - return false; - return true; - } - bool operator != (const NSFDemographics &rhs) const { - return !(*this == rhs); - } - - bool operator < (const NSFDemographics & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(NSFDemographics &a, NSFDemographics &b); - -inline std::ostream& operator<<(std::ostream& out, const NSFDemographics& obj) -{ - obj.printTo(out); - return out; -} - -typedef struct _UserProfile__isset { - _UserProfile__isset() : userName(false), orcidId(false), phones(false), country(false), nationality(false), homeOrganization(false), orginationAffiliation(false), comments(false), labeledURI(false), gpgKey(false), timeZone(false), nsfDemographics(false) {} - bool userName :1; - bool orcidId :1; - bool phones :1; - bool country :1; - bool nationality :1; - bool homeOrganization :1; - bool orginationAffiliation :1; - bool comments :1; - bool labeledURI :1; - bool gpgKey :1; - bool timeZone :1; - bool nsfDemographics :1; -} _UserProfile__isset; - -class UserProfile { - public: - - UserProfile(const UserProfile&); - UserProfile& operator=(const UserProfile&); - UserProfile() : userModelVersion("1.0"), airavataInternalUserId("DO_NOT_SET_AT_CLIENTS"), userId(), gatewayId(), userName(), orcidId(), country(), homeOrganization(), orginationAffiliation(), creationTime(), lastAccessTime(), validUntil(), State((Status::type)0), comments(), gpgKey(), timeZone() { - } - - virtual ~UserProfile() throw(); - std::string userModelVersion; - std::string airavataInternalUserId; - std::string userId; - std::string gatewayId; - std::vector<std::string> emails; - std::string userName; - std::string orcidId; - std::vector<std::string> phones; - std::string country; - std::vector<std::string> nationality; - std::string homeOrganization; - std::string orginationAffiliation; - std::string creationTime; - std::string lastAccessTime; - std::string validUntil; - Status::type State; - std::string comments; - std::vector<std::string> labeledURI; - std::string gpgKey; - std::string timeZone; - NSFDemographics nsfDemographics; - - _UserProfile__isset __isset; - - void __set_userModelVersion(const std::string& val); - - void __set_airavataInternalUserId(const std::string& val); - - void __set_userId(const std::string& val); - - void __set_gatewayId(const std::string& val); - - void __set_emails(const std::vector<std::string> & val); - - void __set_userName(const std::string& val); - - void __set_orcidId(const std::string& val); - - void __set_phones(const std::vector<std::string> & val); - - void __set_country(const std::string& val); - - void __set_nationality(const std::vector<std::string> & val); - - void __set_homeOrganization(const std::string& val); - - void __set_orginationAffiliation(const std::string& val); - - void __set_creationTime(const std::string& val); - - void __set_lastAccessTime(const std::string& val); - - void __set_validUntil(const std::string& val); - - void __set_State(const Status::type val); - - void __set_comments(const std::string& val); - - void __set_labeledURI(const std::vector<std::string> & val); - - void __set_gpgKey(const std::string& val); - - void __set_timeZone(const std::string& val); - - void __set_nsfDemographics(const NSFDemographics& val); - - bool operator == (const UserProfile & rhs) const - { - if (!(userModelVersion == rhs.userModelVersion)) - return false; - if (!(airavataInternalUserId == rhs.airavataInternalUserId)) - return false; - if (!(userId == rhs.userId)) - return false; - if (!(gatewayId == rhs.gatewayId)) - return false; - if (!(emails == rhs.emails)) - return false; - if (__isset.userName != rhs.__isset.userName) - return false; - else if (__isset.userName && !(userName == rhs.userName)) - return false; - if (__isset.orcidId != rhs.__isset.orcidId) - return false; - else if (__isset.orcidId && !(orcidId == rhs.orcidId)) - return false; - if (__isset.phones != rhs.__isset.phones) - return false; - else if (__isset.phones && !(phones == rhs.phones)) - return false; - if (__isset.country != rhs.__isset.country) - return false; - else if (__isset.country && !(country == rhs.country)) - return false; - if (__isset.nationality != rhs.__isset.nationality) - return false; - else if (__isset.nationality && !(nationality == rhs.nationality)) - return false; - if (__isset.homeOrganization != rhs.__isset.homeOrganization) - return false; - else if (__isset.homeOrganization && !(homeOrganization == rhs.homeOrganization)) - return false; - if (__isset.orginationAffiliation != rhs.__isset.orginationAffiliation) - return false; - else if (__isset.orginationAffiliation && !(orginationAffiliation == rhs.orginationAffiliation)) - return false; - if (!(creationTime == rhs.creationTime)) - return false; - if (!(lastAccessTime == rhs.lastAccessTime)) - return false; - if (!(validUntil == rhs.validUntil)) - return false; - if (!(State == rhs.State)) - return false; - if (__isset.comments != rhs.__isset.comments) - return false; - else if (__isset.comments && !(comments == rhs.comments)) - return false; - if (__isset.labeledURI != rhs.__isset.labeledURI) - return false; - else if (__isset.labeledURI && !(labeledURI == rhs.labeledURI)) - return false; - if (__isset.gpgKey != rhs.__isset.gpgKey) - return false; - else if (__isset.gpgKey && !(gpgKey == rhs.gpgKey)) - return false; - if (__isset.timeZone != rhs.__isset.timeZone) - return false; - else if (__isset.timeZone && !(timeZone == rhs.timeZone)) - return false; - if (__isset.nsfDemographics != rhs.__isset.nsfDemographics) - return false; - else if (__isset.nsfDemographics && !(nsfDemographics == rhs.nsfDemographics)) - return false; - return true; - } - bool operator != (const UserProfile &rhs) const { - return !(*this == rhs); - } - - bool operator < (const UserProfile & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - - virtual void printTo(std::ostream& out) const; -}; - -void swap(UserProfile &a, UserProfile &b); - -inline std::ostream& operator<<(std::ostream& out, const UserProfile& obj) -{ - obj.printTo(out); - return out; -} - -}}}} // namespace - -#endif http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d55608f1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.cpp deleted file mode 100644 index c235d16..0000000 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/** - * 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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#include "user_resource_profile_model_constants.h" - -namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace userresourceprofile { - -const user_resource_profile_modelConstants g_user_resource_profile_model_constants; - -user_resource_profile_modelConstants::user_resource_profile_modelConstants() { -} - -}}}}} // namespace - http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d55608f1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.h ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.h deleted file mode 100644 index 8684bee..0000000 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_constants.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#ifndef user_resource_profile_model_CONSTANTS_H -#define user_resource_profile_model_CONSTANTS_H - -#include "user_resource_profile_model_types.h" - -namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace userresourceprofile { - -class user_resource_profile_modelConstants { - public: - user_resource_profile_modelConstants(); - -}; - -extern const user_resource_profile_modelConstants g_user_resource_profile_model_constants; - -}}}}} // namespace - -#endif http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d55608f1/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp deleted file mode 100644 index a1ad24e..0000000 --- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_resource_profile_model_types.cpp +++ /dev/null @@ -1,759 +0,0 @@ -/** - * 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.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -#include "user_resource_profile_model_types.h" - -#include <algorithm> -#include <ostream> - -#include <thrift/TToString.h> - -namespace apache { namespace airavata { namespace model { namespace appcatalog { namespace userresourceprofile { - - -UserComputeResourcePreference::~UserComputeResourcePreference() throw() { -} - - -void UserComputeResourcePreference::__set_computeResourceId(const std::string& val) { - this->computeResourceId = val; -} - -void UserComputeResourcePreference::__set_loginUserName(const std::string& val) { - this->loginUserName = val; -__isset.loginUserName = true; -} - -void UserComputeResourcePreference::__set_preferredBatchQueue(const std::string& val) { - this->preferredBatchQueue = val; -__isset.preferredBatchQueue = true; -} - -void UserComputeResourcePreference::__set_scratchLocation(const std::string& val) { - this->scratchLocation = val; -__isset.scratchLocation = true; -} - -void UserComputeResourcePreference::__set_allocationProjectNumber(const std::string& val) { - this->allocationProjectNumber = val; -__isset.allocationProjectNumber = true; -} - -void UserComputeResourcePreference::__set_resourceSpecificCredentialStoreToken(const std::string& val) { - this->resourceSpecificCredentialStoreToken = val; -__isset.resourceSpecificCredentialStoreToken = true; -} - -void UserComputeResourcePreference::__set_qualityOfService(const std::string& val) { - this->qualityOfService = val; -__isset.qualityOfService = true; -} - -void UserComputeResourcePreference::__set_reservation(const std::string& val) { - this->reservation = val; -__isset.reservation = true; -} - -void UserComputeResourcePreference::__set_reservationStartTime(const int64_t val) { - this->reservationStartTime = val; -__isset.reservationStartTime = true; -} - -void UserComputeResourcePreference::__set_reservationEndTime(const int64_t val) { - this->reservationEndTime = val; -__isset.reservationEndTime = true; -} - -uint32_t UserComputeResourcePreference::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; - - 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->loginUserName); - this->__isset.loginUserName = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->preferredBatchQueue); - this->__isset.preferredBatchQueue = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->scratchLocation); - this->__isset.scratchLocation = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->allocationProjectNumber); - this->__isset.allocationProjectNumber = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->resourceSpecificCredentialStoreToken); - this->__isset.resourceSpecificCredentialStoreToken = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->qualityOfService); - this->__isset.qualityOfService = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->reservation); - this->__isset.reservation = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->reservationStartTime); - this->__isset.reservationStartTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->reservationEndTime); - this->__isset.reservationEndTime = 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); - return xfer; -} - -uint32_t UserComputeResourcePreference::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("UserComputeResourcePreference"); - - xfer += oprot->writeFieldBegin("computeResourceId", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->computeResourceId); - 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.preferredBatchQueue) { - xfer += oprot->writeFieldBegin("preferredBatchQueue", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->preferredBatchQueue); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.scratchLocation) { - xfer += oprot->writeFieldBegin("scratchLocation", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->scratchLocation); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.allocationProjectNumber) { - xfer += oprot->writeFieldBegin("allocationProjectNumber", ::apache::thrift::protocol::T_STRING, 5); - xfer += oprot->writeString(this->allocationProjectNumber); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.resourceSpecificCredentialStoreToken) { - xfer += oprot->writeFieldBegin("resourceSpecificCredentialStoreToken", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->resourceSpecificCredentialStoreToken); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.qualityOfService) { - xfer += oprot->writeFieldBegin("qualityOfService", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->qualityOfService); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.reservation) { - xfer += oprot->writeFieldBegin("reservation", ::apache::thrift::protocol::T_STRING, 8); - xfer += oprot->writeString(this->reservation); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.reservationStartTime) { - xfer += oprot->writeFieldBegin("reservationStartTime", ::apache::thrift::protocol::T_I64, 9); - xfer += oprot->writeI64(this->reservationStartTime); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.reservationEndTime) { - xfer += oprot->writeFieldBegin("reservationEndTime", ::apache::thrift::protocol::T_I64, 10); - xfer += oprot->writeI64(this->reservationEndTime); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(UserComputeResourcePreference &a, UserComputeResourcePreference &b) { - using ::std::swap; - swap(a.computeResourceId, b.computeResourceId); - swap(a.loginUserName, b.loginUserName); - swap(a.preferredBatchQueue, b.preferredBatchQueue); - swap(a.scratchLocation, b.scratchLocation); - swap(a.allocationProjectNumber, b.allocationProjectNumber); - swap(a.resourceSpecificCredentialStoreToken, b.resourceSpecificCredentialStoreToken); - swap(a.qualityOfService, b.qualityOfService); - swap(a.reservation, b.reservation); - swap(a.reservationStartTime, b.reservationStartTime); - swap(a.reservationEndTime, b.reservationEndTime); - swap(a.__isset, b.__isset); -} - -UserComputeResourcePreference::UserComputeResourcePreference(const UserComputeResourcePreference& other0) { - computeResourceId = other0.computeResourceId; - loginUserName = other0.loginUserName; - preferredBatchQueue = other0.preferredBatchQueue; - scratchLocation = other0.scratchLocation; - allocationProjectNumber = other0.allocationProjectNumber; - resourceSpecificCredentialStoreToken = other0.resourceSpecificCredentialStoreToken; - qualityOfService = other0.qualityOfService; - reservation = other0.reservation; - reservationStartTime = other0.reservationStartTime; - reservationEndTime = other0.reservationEndTime; - __isset = other0.__isset; -} -UserComputeResourcePreference& UserComputeResourcePreference::operator=(const UserComputeResourcePreference& other1) { - computeResourceId = other1.computeResourceId; - loginUserName = other1.loginUserName; - preferredBatchQueue = other1.preferredBatchQueue; - scratchLocation = other1.scratchLocation; - allocationProjectNumber = other1.allocationProjectNumber; - resourceSpecificCredentialStoreToken = other1.resourceSpecificCredentialStoreToken; - qualityOfService = other1.qualityOfService; - reservation = other1.reservation; - reservationStartTime = other1.reservationStartTime; - reservationEndTime = other1.reservationEndTime; - __isset = other1.__isset; - return *this; -} -void UserComputeResourcePreference::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UserComputeResourcePreference("; - out << "computeResourceId=" << to_string(computeResourceId); - out << ", " << "loginUserName="; (__isset.loginUserName ? (out << to_string(loginUserName)) : (out << "<null>")); - out << ", " << "preferredBatchQueue="; (__isset.preferredBatchQueue ? (out << to_string(preferredBatchQueue)) : (out << "<null>")); - out << ", " << "scratchLocation="; (__isset.scratchLocation ? (out << to_string(scratchLocation)) : (out << "<null>")); - out << ", " << "allocationProjectNumber="; (__isset.allocationProjectNumber ? (out << to_string(allocationProjectNumber)) : (out << "<null>")); - out << ", " << "resourceSpecificCredentialStoreToken="; (__isset.resourceSpecificCredentialStoreToken ? (out << to_string(resourceSpecificCredentialStoreToken)) : (out << "<null>")); - out << ", " << "qualityOfService="; (__isset.qualityOfService ? (out << to_string(qualityOfService)) : (out << "<null>")); - out << ", " << "reservation="; (__isset.reservation ? (out << to_string(reservation)) : (out << "<null>")); - out << ", " << "reservationStartTime="; (__isset.reservationStartTime ? (out << to_string(reservationStartTime)) : (out << "<null>")); - out << ", " << "reservationEndTime="; (__isset.reservationEndTime ? (out << to_string(reservationEndTime)) : (out << "<null>")); - out << ")"; -} - - -UserStoragePreference::~UserStoragePreference() throw() { -} - - -void UserStoragePreference::__set_storageResourceId(const std::string& val) { - this->storageResourceId = val; -} - -void UserStoragePreference::__set_loginUserName(const std::string& val) { - this->loginUserName = val; -__isset.loginUserName = true; -} - -void UserStoragePreference::__set_fileSystemRootLocation(const std::string& val) { - this->fileSystemRootLocation = val; -__isset.fileSystemRootLocation = true; -} - -void UserStoragePreference::__set_resourceSpecificCredentialStoreToken(const std::string& val) { - this->resourceSpecificCredentialStoreToken = val; -__isset.resourceSpecificCredentialStoreToken = true; -} - -uint32_t UserStoragePreference::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_storageResourceId = 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->storageResourceId); - isset_storageResourceId = 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_storageResourceId) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t UserStoragePreference::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("UserStoragePreference"); - - xfer += oprot->writeFieldBegin("storageResourceId", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->storageResourceId); - 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(); - return xfer; -} - -void swap(UserStoragePreference &a, UserStoragePreference &b) { - using ::std::swap; - swap(a.storageResourceId, b.storageResourceId); - swap(a.loginUserName, b.loginUserName); - swap(a.fileSystemRootLocation, b.fileSystemRootLocation); - swap(a.resourceSpecificCredentialStoreToken, b.resourceSpecificCredentialStoreToken); - swap(a.__isset, b.__isset); -} - -UserStoragePreference::UserStoragePreference(const UserStoragePreference& other2) { - storageResourceId = other2.storageResourceId; - loginUserName = other2.loginUserName; - fileSystemRootLocation = other2.fileSystemRootLocation; - resourceSpecificCredentialStoreToken = other2.resourceSpecificCredentialStoreToken; - __isset = other2.__isset; -} -UserStoragePreference& UserStoragePreference::operator=(const UserStoragePreference& other3) { - storageResourceId = other3.storageResourceId; - loginUserName = other3.loginUserName; - fileSystemRootLocation = other3.fileSystemRootLocation; - resourceSpecificCredentialStoreToken = other3.resourceSpecificCredentialStoreToken; - __isset = other3.__isset; - return *this; -} -void UserStoragePreference::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UserStoragePreference("; - out << "storageResourceId=" << to_string(storageResourceId); - out << ", " << "loginUserName="; (__isset.loginUserName ? (out << to_string(loginUserName)) : (out << "<null>")); - out << ", " << "fileSystemRootLocation="; (__isset.fileSystemRootLocation ? (out << to_string(fileSystemRootLocation)) : (out << "<null>")); - out << ", " << "resourceSpecificCredentialStoreToken="; (__isset.resourceSpecificCredentialStoreToken ? (out << to_string(resourceSpecificCredentialStoreToken)) : (out << "<null>")); - out << ")"; -} - - -UserResourceProfile::~UserResourceProfile() throw() { -} - - -void UserResourceProfile::__set_userId(const std::string& val) { - this->userId = val; -} - -void UserResourceProfile::__set_gatewayID(const std::string& val) { - this->gatewayID = val; -} - -void UserResourceProfile::__set_credentialStoreToken(const std::string& val) { - this->credentialStoreToken = val; -__isset.credentialStoreToken = true; -} - -void UserResourceProfile::__set_userComputeResourcePreferences(const std::vector<UserComputeResourcePreference> & val) { - this->userComputeResourcePreferences = val; -__isset.userComputeResourcePreferences = true; -} - -void UserResourceProfile::__set_userStoragePreferences(const std::vector<UserStoragePreference> & val) { - this->userStoragePreferences = val; -__isset.userStoragePreferences = true; -} - -void UserResourceProfile::__set_identityServerTenant(const std::string& val) { - this->identityServerTenant = val; -__isset.identityServerTenant = true; -} - -void UserResourceProfile::__set_identityServerPwdCredToken(const std::string& val) { - this->identityServerPwdCredToken = val; -__isset.identityServerPwdCredToken = true; -} - -void UserResourceProfile::__set_isNull(const bool val) { - this->isNull = val; -__isset.isNull = true; -} - -uint32_t UserResourceProfile::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_userId = false; - bool isset_gatewayID = 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->userId); - isset_userId = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->gatewayID); - isset_gatewayID = 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->userComputeResourcePreferences.clear(); - uint32_t _size4; - ::apache::thrift::protocol::TType _etype7; - xfer += iprot->readListBegin(_etype7, _size4); - this->userComputeResourcePreferences.resize(_size4); - uint32_t _i8; - for (_i8 = 0; _i8 < _size4; ++_i8) - { - xfer += this->userComputeResourcePreferences[_i8].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.userComputeResourcePreferences = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->userStoragePreferences.clear(); - uint32_t _size9; - ::apache::thrift::protocol::TType _etype12; - xfer += iprot->readListBegin(_etype12, _size9); - this->userStoragePreferences.resize(_size9); - uint32_t _i13; - for (_i13 = 0; _i13 < _size9; ++_i13) - { - xfer += this->userStoragePreferences[_i13].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.userStoragePreferences = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->identityServerTenant); - this->__isset.identityServerTenant = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->identityServerPwdCredToken); - this->__isset.identityServerPwdCredToken = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->isNull); - this->__isset.isNull = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_userId) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_gatewayID) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t UserResourceProfile::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("UserResourceProfile"); - - xfer += oprot->writeFieldBegin("userId", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->userId); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("gatewayID", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->gatewayID); - 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.userComputeResourcePreferences) { - xfer += oprot->writeFieldBegin("userComputeResourcePreferences", ::apache::thrift::protocol::T_LIST, 4); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->userComputeResourcePreferences.size())); - std::vector<UserComputeResourcePreference> ::const_iterator _iter14; - for (_iter14 = this->userComputeResourcePreferences.begin(); _iter14 != this->userComputeResourcePreferences.end(); ++_iter14) - { - xfer += (*_iter14).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.userStoragePreferences) { - xfer += oprot->writeFieldBegin("userStoragePreferences", ::apache::thrift::protocol::T_LIST, 5); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->userStoragePreferences.size())); - std::vector<UserStoragePreference> ::const_iterator _iter15; - for (_iter15 = this->userStoragePreferences.begin(); _iter15 != this->userStoragePreferences.end(); ++_iter15) - { - xfer += (*_iter15).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.identityServerTenant) { - xfer += oprot->writeFieldBegin("identityServerTenant", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->identityServerTenant); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.identityServerPwdCredToken) { - xfer += oprot->writeFieldBegin("identityServerPwdCredToken", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->identityServerPwdCredToken); - xfer += oprot->writeFieldEnd(); - } - if (this->__isset.isNull) { - xfer += oprot->writeFieldBegin("isNull", ::apache::thrift::protocol::T_BOOL, 8); - xfer += oprot->writeBool(this->isNull); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(UserResourceProfile &a, UserResourceProfile &b) { - using ::std::swap; - swap(a.userId, b.userId); - swap(a.gatewayID, b.gatewayID); - swap(a.credentialStoreToken, b.credentialStoreToken); - swap(a.userComputeResourcePreferences, b.userComputeResourcePreferences); - swap(a.userStoragePreferences, b.userStoragePreferences); - swap(a.identityServerTenant, b.identityServerTenant); - swap(a.identityServerPwdCredToken, b.identityServerPwdCredToken); - swap(a.isNull, b.isNull); - swap(a.__isset, b.__isset); -} - -UserResourceProfile::UserResourceProfile(const UserResourceProfile& other16) { - userId = other16.userId; - gatewayID = other16.gatewayID; - credentialStoreToken = other16.credentialStoreToken; - userComputeResourcePreferences = other16.userComputeResourcePreferences; - userStoragePreferences = other16.userStoragePreferences; - identityServerTenant = other16.identityServerTenant; - identityServerPwdCredToken = other16.identityServerPwdCredToken; - isNull = other16.isNull; - __isset = other16.__isset; -} -UserResourceProfile& UserResourceProfile::operator=(const UserResourceProfile& other17) { - userId = other17.userId; - gatewayID = other17.gatewayID; - credentialStoreToken = other17.credentialStoreToken; - userComputeResourcePreferences = other17.userComputeResourcePreferences; - userStoragePreferences = other17.userStoragePreferences; - identityServerTenant = other17.identityServerTenant; - identityServerPwdCredToken = other17.identityServerPwdCredToken; - isNull = other17.isNull; - __isset = other17.__isset; - return *this; -} -void UserResourceProfile::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "UserResourceProfile("; - out << "userId=" << to_string(userId); - out << ", " << "gatewayID=" << to_string(gatewayID); - out << ", " << "credentialStoreToken="; (__isset.credentialStoreToken ? (out << to_string(credentialStoreToken)) : (out << "<null>")); - out << ", " << "userComputeResourcePreferences="; (__isset.userComputeResourcePreferences ? (out << to_string(userComputeResourcePreferences)) : (out << "<null>")); - out << ", " << "userStoragePreferences="; (__isset.userStoragePreferences ? (out << to_string(userStoragePreferences)) : (out << "<null>")); - out << ", " << "identityServerTenant="; (__isset.identityServerTenant ? (out << to_string(identityServerTenant)) : (out << "<null>")); - out << ", " << "identityServerPwdCredToken="; (__isset.identityServerPwdCredToken ? (out << to_string(identityServerPwdCredToken)) : (out << "<null>")); - out << ", " << "isNull="; (__isset.isNull ? (out << to_string(isNull)) : (out << "<null>")); - out << ")"; -} - -}}}}} // namespace
