in airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/user_profile_model_types.cpp [1127:1449]
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_firstName = false;
bool isset_lastName = 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 _size26;
::apache::thrift::protocol::TType _etype29;
xfer += iprot->readListBegin(_etype29, _size26);
this->emails.resize(_size26);
uint32_t _i30;
for (_i30 = 0; _i30 < _size26; ++_i30)
{
xfer += iprot->readString(this->emails[_i30]);
}
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->firstName);
isset_firstName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->lastName);
isset_lastName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 8:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->middleName);
this->__isset.middleName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 9:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->namePrefix);
this->__isset.namePrefix = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 10:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->nameSuffix);
this->__isset.nameSuffix = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 11:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->orcidId);
this->__isset.orcidId = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 12:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->phones.clear();
uint32_t _size31;
::apache::thrift::protocol::TType _etype34;
xfer += iprot->readListBegin(_etype34, _size31);
this->phones.resize(_size31);
uint32_t _i35;
for (_i35 = 0; _i35 < _size31; ++_i35)
{
xfer += iprot->readString(this->phones[_i35]);
}
xfer += iprot->readListEnd();
}
this->__isset.phones = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 13:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->country);
this->__isset.country = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 14:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->nationality.clear();
uint32_t _size36;
::apache::thrift::protocol::TType _etype39;
xfer += iprot->readListBegin(_etype39, _size36);
this->nationality.resize(_size36);
uint32_t _i40;
for (_i40 = 0; _i40 < _size36; ++_i40)
{
xfer += iprot->readString(this->nationality[_i40]);
}
xfer += iprot->readListEnd();
}
this->__isset.nationality = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 15:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->homeOrganization);
this->__isset.homeOrganization = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 16:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->orginationAffiliation);
this->__isset.orginationAffiliation = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 17:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->creationTime);
isset_creationTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 18:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->lastAccessTime);
isset_lastAccessTime = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 19:
if (ftype == ::apache::thrift::protocol::T_I64) {
xfer += iprot->readI64(this->validUntil);
isset_validUntil = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 20:
if (ftype == ::apache::thrift::protocol::T_I32) {
int32_t ecast41;
xfer += iprot->readI32(ecast41);
this->State = (Status::type)ecast41;
isset_State = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 21:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->comments);
this->__isset.comments = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 22:
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->labeledURI.clear();
uint32_t _size42;
::apache::thrift::protocol::TType _etype45;
xfer += iprot->readListBegin(_etype45, _size42);
this->labeledURI.resize(_size42);
uint32_t _i46;
for (_i46 = 0; _i46 < _size42; ++_i46)
{
xfer += iprot->readString(this->labeledURI[_i46]);
}
xfer += iprot->readListEnd();
}
this->__isset.labeledURI = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 23:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->gpgKey);
this->__isset.gpgKey = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 24:
if (ftype == ::apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(this->timeZone);
this->__isset.timeZone = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 25:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->nsfDemographics.read(iprot);
this->__isset.nsfDemographics = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 26:
if (ftype == ::apache::thrift::protocol::T_STRUCT) {
xfer += this->customDashboard.read(iprot);
this->__isset.customDashboard = 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_firstName)
throw TProtocolException(TProtocolException::INVALID_DATA);
if (!isset_lastName)
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;
}