Commit 2506ceab authored by yangjian's avatar yangjian

Update AMF3GPPAccessRegistration: add fields

parent 45624c67
/**
* Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 2.1.2
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
......@@ -12,7 +12,7 @@
/*
* AMF3GPPAccessRegistrationDocumentApi.h
*
*
*
*/
#ifndef AMF3GPPAccessRegistrationDocumentApi_H_
......@@ -61,7 +61,7 @@ private:
/// To modify the AMF context data of a UE using 3gpp access in the UDR
/// </summary>
/// <remarks>
///
///
/// </remarks>
/// <param name="ueId">UE id</param>
/// <param name="patchItem"></param>
......@@ -72,17 +72,17 @@ private:
/// To store the AMF context data of a UE using 3gpp access in the UDR
/// </summary>
/// <remarks>
///
///
/// </remarks>
/// <param name="ueId">UE id</param>
/// <param name="amf3GppAccessRegistration"> (optional)</param>
virtual void create_amf_context3gpp(const std::string &ueId, const Amf3GppAccessRegistration &amf3GppAccessRegistration, Pistache::Http::ResponseWriter &response) = 0;
virtual void create_amf_context3gpp(const std::string &ueId, Amf3GppAccessRegistration &amf3GppAccessRegistration, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Retrieves the AMF context data of a UE using 3gpp access
/// </summary>
/// <remarks>
///
///
/// </remarks>
/// <param name="ueId">UE id</param>
/// <param name="fields">attributes to be retrieved (optional, default to std::vector&lt;std::string&gt;())</param>
......
......@@ -42,7 +42,7 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::amf_context3gpp(const std::string
//3.send PatchResult
//response.send(Pistache::Http::Code::Ok, j.dump());
}
void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std::string &ueId, const Amf3GppAccessRegistration &amf3GppAccessRegistration, Pistache::Http::ResponseWriter &response) {
void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std::string &ueId, Amf3GppAccessRegistration &amf3GppAccessRegistration, Pistache::Http::ResponseWriter &response) {
MYSQL_RES *res = NULL;
MYSQL_ROW row;
const std::string select_AMF3GPPAccessRegistration = "select * from Amf3GppAccessRegistration WHERE ueid="+ueId;
......@@ -68,29 +68,63 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std:
(amf3GppAccessRegistration.supportedFeaturesIsSet()?"supportedFeatures='"+amf3GppAccessRegistration.getSupportedFeatures()+"',":"")+ \
(amf3GppAccessRegistration.purgeFlagIsSet()?(amf3GppAccessRegistration.isPurgeFlag()?"purgeFlag=1,":"purgeFlag=0,"):"")+ \
(amf3GppAccessRegistration.peiIsSet()?"pei='"+amf3GppAccessRegistration.getPei()+"',":"")+ \
// (amf3GppAccessRegistration.imsVoPsIsSet()?",imsVoPs="+amf3GppAccessRegistration.getImsVoPs():"")+
"deregCallbackUri='"+amf3GppAccessRegistration.getDeregCallbackUri()+"',"+ \
// (amf3GppAccessRegistration.amfServiceNameDeregIsSet()?",amfServiceNameDereg="+amf3GppAccessRegistration.getAmfServiceNameDereg():"")+
(amf3GppAccessRegistration.pcscfRestorationCallbackUriIsSet()?"pcscfRestorationCallbackUri='"+amf3GppAccessRegistration.getPcscfRestorationCallbackUri()+"',":"")+ \
// (amf3GppAccessRegistration.amfServiceNamePcscfRestIsSet()?",amfServiceNamePcscfRest="+amf3GppAccessRegistration.getAmfServiceNamePcscfRest():"")+
(amf3GppAccessRegistration.initialRegistrationIndIsSet()?(amf3GppAccessRegistration.isInitialRegistrationInd()?"initialRegistrationInd=1,":"initialRegistrationInd=0,"):"")+ \
// ",guami="+to_json(j,amf3GppAccessRegistration.getGuami())+ **M
// backupAmfInfo
(amf3GppAccessRegistration.drFlagIsSet()?(amf3GppAccessRegistration.isDrFlag()?"drFlag=1,":"drFlag=0,"):"")+ \
// ratType **M
(amf3GppAccessRegistration.urrpIndicatorIsSet()?(amf3GppAccessRegistration.isUrrpIndicator()?"urrpIndicator=1,":"urrpIndicator=0,"):"")+ \
(amf3GppAccessRegistration.amfEeSubscriptionIdIsSet()?"amfEeSubscriptionId='"+amf3GppAccessRegistration.getAmfEeSubscriptionId()+"',":"")+ \
// epsInterworkingInfo
(amf3GppAccessRegistration.ueSrvccCapabilityIsSet()?(amf3GppAccessRegistration.isUeSrvccCapability()?"ueSrvccCapability=1,":"ueSrvccCapability=0,"):"")+ \
(amf3GppAccessRegistration.registrationTimeIsSet()?"registrationTime='"+amf3GppAccessRegistration.getRegistrationTime()+"',":"")+ \
// vgmlcAddress
// contextInfo
(amf3GppAccessRegistration.noEeSubscriptionIndIsSet()?(amf3GppAccessRegistration.isNoEeSubscriptionInd()?"noEeSubscriptionInd=1,":"noEeSubscriptionInd=0,"):"");
if(amf3GppAccessRegistration.imsVoPsIsSet())
{
to_json(j,amf3GppAccessRegistration.getImsVoPs());
query += "imsVoPs='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.amfServiceNameDeregIsSet())
{
to_json(j,amf3GppAccessRegistration.getAmfServiceNameDereg());
query += "amfServiceNameDereg='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.amfServiceNamePcscfRestIsSet())
{
to_json(j,amf3GppAccessRegistration.getAmfServiceNamePcscfRest());
query += "amfServiceNamePcscfRest='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.backupAmfInfoIsSet())
{
nlohmann::json tmp;
j.clear();
std::vector<BackupAmfInfo> backupamfinfo = amf3GppAccessRegistration.getBackupAmfInfo();
for(int i=0;i<backupamfinfo.size();i++)
{
to_json(tmp,backupamfinfo[i]);
j+=tmp;
}
query += "backupAmfInfo='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.epsInterworkingInfoIsSet())
{
to_json(j,amf3GppAccessRegistration.getEpsInterworkingInfo());
query += "epsInterworkingInfo='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.vgmlcAddressIsSet())
{
to_json(j,amf3GppAccessRegistration.getVgmlcAddress());
query += "vgmlcAddress='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.contextInfoIsSet())
{
to_json(j,amf3GppAccessRegistration.getContextInfo());
query += "contextInfo='"+j.dump()+"',";
}
to_json(j,amf3GppAccessRegistration.getGuami());
query += "guami='"+j.dump()+"',";
// to_json(j,amf3GppAccessRegistration.getRatType());
// query += ",ratType="+j.dump();
query += "ratType='{}'";
to_json(j,amf3GppAccessRegistration.getRatType());
query += "ratType='"+j.dump()+"'";
query += " where ueid="+ueId;
}
else
......@@ -100,29 +134,63 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std:
(amf3GppAccessRegistration.supportedFeaturesIsSet()?"supportedFeatures='"+amf3GppAccessRegistration.getSupportedFeatures()+"',":"")+ \
(amf3GppAccessRegistration.purgeFlagIsSet()?(amf3GppAccessRegistration.isPurgeFlag()?"purgeFlag=1,":"purgeFlag=0,"):"")+ \
(amf3GppAccessRegistration.peiIsSet()?"pei='"+amf3GppAccessRegistration.getPei()+"',":"")+ \
// (amf3GppAccessRegistration.imsVoPsIsSet()?",imsVoPs="+amf3GppAccessRegistration.getImsVoPs():"")+
"deregCallbackUri='"+amf3GppAccessRegistration.getDeregCallbackUri()+"',"+ \
// (amf3GppAccessRegistration.amfServiceNameDeregIsSet()?",amfServiceNameDereg="+amf3GppAccessRegistration.getAmfServiceNameDereg():"")+
(amf3GppAccessRegistration.pcscfRestorationCallbackUriIsSet()?"pcscfRestorationCallbackUri='"+amf3GppAccessRegistration.getPcscfRestorationCallbackUri()+"',":"")+ \
// (amf3GppAccessRegistration.amfServiceNamePcscfRestIsSet()?",amfServiceNamePcscfRest="+amf3GppAccessRegistration.getAmfServiceNamePcscfRest():"")+
(amf3GppAccessRegistration.initialRegistrationIndIsSet()?(amf3GppAccessRegistration.isInitialRegistrationInd()?"initialRegistrationInd=1,":"initialRegistrationInd=0,"):"")+ \
// ",guami="+to_json(j,amf3GppAccessRegistration.getGuami())+ **M
// backupAmfInfo
(amf3GppAccessRegistration.drFlagIsSet()?(amf3GppAccessRegistration.isDrFlag()?"drFlag=1,":"drFlag=0,"):"")+ \
// ratType **M
(amf3GppAccessRegistration.urrpIndicatorIsSet()?(amf3GppAccessRegistration.isUrrpIndicator()?"urrpIndicator=1,":"urrpIndicator=0,"):"")+ \
(amf3GppAccessRegistration.amfEeSubscriptionIdIsSet()?"amfEeSubscriptionId='"+amf3GppAccessRegistration.getAmfEeSubscriptionId()+"',":"")+ \
// epsInterworkingInfo
(amf3GppAccessRegistration.ueSrvccCapabilityIsSet()?(amf3GppAccessRegistration.isUeSrvccCapability()?"ueSrvccCapability=1,":"ueSrvccCapability=0,"):"")+ \
(amf3GppAccessRegistration.registrationTimeIsSet()?"registrationTime='"+amf3GppAccessRegistration.getRegistrationTime()+"',":"")+ \
// vgmlcAddress
// contextInfo
(amf3GppAccessRegistration.noEeSubscriptionIndIsSet()?(amf3GppAccessRegistration.isNoEeSubscriptionInd()?"noEeSubscriptionInd=1,":"noEeSubscriptionInd=0,"):"");
if(amf3GppAccessRegistration.imsVoPsIsSet())
{
to_json(j,amf3GppAccessRegistration.getImsVoPs());
query += "imsVoPs='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.amfServiceNameDeregIsSet())
{
to_json(j,amf3GppAccessRegistration.getAmfServiceNameDereg());
query += "amfServiceNameDereg='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.amfServiceNamePcscfRestIsSet())
{
to_json(j,amf3GppAccessRegistration.getAmfServiceNamePcscfRest());
query += "amfServiceNamePcscfRest='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.backupAmfInfoIsSet())
{
nlohmann::json tmp;
j.clear();
std::vector<BackupAmfInfo> backupamfinfo = amf3GppAccessRegistration.getBackupAmfInfo();
for(int i=0;i<backupamfinfo.size();i++)
{
to_json(tmp,backupamfinfo[i]);
j+=tmp;
}
query += "backupAmfInfo='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.epsInterworkingInfoIsSet())
{
to_json(j,amf3GppAccessRegistration.getEpsInterworkingInfo());
query += "epsInterworkingInfo='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.vgmlcAddressIsSet())
{
to_json(j,amf3GppAccessRegistration.getVgmlcAddress());
query += "vgmlcAddress='"+j.dump()+"',";
}
if(amf3GppAccessRegistration.contextInfoIsSet())
{
to_json(j,amf3GppAccessRegistration.getContextInfo());
query += "contextInfo='"+j.dump()+"',";
}
to_json(j,amf3GppAccessRegistration.getGuami());
query += "guami='"+j.dump()+"',";
// to_json(j,amf3GppAccessRegistration.getRatType());
// query += ",ratType="+j.dump();
query += "ratType='{}'";
to_json(j,amf3GppAccessRegistration.getRatType());
query += "ratType='"+j.dump()+"'";
}
mysql_free_result(res);
......@@ -190,7 +258,9 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
else if(!strcmp("imsVoPs", field->name) && row[i] != NULL)
{
// amf3gppaccessregistration.setImsVoPs(ImsVoPs const & value);
ImsVoPs imsvops;
nlohmann::json::parse(row[i]).get_to(imsvops);
amf3gppaccessregistration.setImsVoPs(imsvops);
}
else if(!strcmp("deregCallbackUri", field->name))
{
......@@ -198,7 +268,9 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
else if(!strcmp("amfServiceNameDereg", field->name) && row[i] != NULL)
{
// amf3gppaccessregistration.setAmfServiceNameDereg(ServiceName const & value);
ServiceName amfservicenamedereg;
nlohmann::json::parse(row[i]).get_to(amfservicenamedereg);
amf3gppaccessregistration.setAmfServiceNameDereg(amfservicenamedereg);
}
else if(!strcmp("pcscfRestorationCallbackUri", field->name) && row[i] != NULL)
{
......@@ -206,7 +278,9 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
else if(!strcmp("amfServiceNamePcscfRest", field->name) && row[i] != NULL)
{
// amf3gppaccessregistration.setAmfServiceNamePcscfRest(ServiceName const & value);
ServiceName amfservicenamepcscfrest;
nlohmann::json::parse(row[i]).get_to(amfservicenamepcscfrest);
amf3gppaccessregistration.setAmfServiceNamePcscfRest(amfservicenamepcscfrest);
}
else if(!strcmp("initialRegistrationInd", field->name) && row[i] != NULL)
{
......@@ -217,11 +291,15 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
else if(!strcmp("guami", field->name))
{
// amf3gppaccessregistration.setGuami(Guami const & value);
Guami guami;
nlohmann::json::parse(row[i]).get_to(guami);
amf3gppaccessregistration.setGuami(guami);
}
else if(!strcmp("backupAmfInfo", field->name) && row[i] != NULL)
{
// amf3gppaccessregistration.setBackupAmfInfo(std :: vector < BackupAmfInfo > const & value);
std :: vector < BackupAmfInfo > backupamfinfo;
nlohmann::json::parse(row[i]).get_to(backupamfinfo);
amf3gppaccessregistration.setBackupAmfInfo(backupamfinfo);
}
else if(!strcmp("drFlag", field->name) && row[i] != NULL)
{
......@@ -232,7 +310,9 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
else if(!strcmp("ratType", field->name))
{
// amf3gppaccessregistration.setRatType(RatType const & value);
RatType rattype;
nlohmann::json::parse(row[i]).get_to(rattype);
amf3gppaccessregistration.setRatType(rattype);
}
else if(!strcmp("urrpIndicator", field->name) && row[i] != NULL)
{
......@@ -247,7 +327,9 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
else if(!strcmp("epsInterworkingInfo", field->name) && row[i] != NULL)
{
// amf3gppaccessregistration.setEpsInterworkingInfo(EpsInterworkingInfo const & value);
EpsInterworkingInfo epsinterworkinginfo;
nlohmann::json::parse(row[i]).get_to(epsinterworkinginfo);
amf3gppaccessregistration.setEpsInterworkingInfo(epsinterworkinginfo);
}
else if(!strcmp("ueSrvccCapability", field->name) && row[i] != NULL)
{
......@@ -262,11 +344,15 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
else if(!strcmp("vgmlcAddress", field->name) && row[i] != NULL)
{
// amf3gppaccessregistration.setVgmlcAddress(VgmlcAddress const & value);
VgmlcAddress vgmlcaddress;
nlohmann::json::parse(row[i]).get_to(vgmlcaddress);
amf3gppaccessregistration.setVgmlcAddress(vgmlcaddress);
}
else if(!strcmp("contextInfo", field->name) && row[i] != NULL)
{
// amf3gppaccessregistration.setContextInfo(ContextInfo const & value);
ContextInfo contextinfo;
nlohmann::json::parse(row[i]).get_to(contextinfo);
amf3gppaccessregistration.setContextInfo(contextinfo);
}
else if(!strcmp("noEeSubscriptionInd", field->name) && row[i] != NULL)
{
......
......@@ -51,7 +51,7 @@ public:
~AMF3GPPAccessRegistrationDocumentApiImpl() {}
void amf_context3gpp(const std::string &ueId, const std::vector<PatchItem> &patchItem, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response);
void create_amf_context3gpp(const std::string &ueId, const Amf3GppAccessRegistration &amf3GppAccessRegistration, Pistache::Http::ResponseWriter &response);
void create_amf_context3gpp(const std::string &ueId, Amf3GppAccessRegistration &amf3GppAccessRegistration, Pistache::Http::ResponseWriter &response);
void query_amf_context3gpp(const std::string &ueId, const Pistache::Optional<std::vector<std::string>> &fields, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response);
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment