Commit 7abbfab6 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix openapi cause

parent 03ad3782
...@@ -25,11 +25,20 @@ void Cause::validate() { ...@@ -25,11 +25,20 @@ void Cause::validate() {
// TODO: implement validation // TODO: implement validation
} }
std::string Cause::getValue() const {
return cause;
}
void Cause::setValue(const std::string& value) {
cause = value;
}
void to_json(nlohmann::json& j, const Cause& o) { void to_json(nlohmann::json& j, const Cause& o) {
j = nlohmann::json(); j = nlohmann::json();
} }
void from_json(const nlohmann::json& j, Cause& o) {} void from_json(const nlohmann::json& j, Cause& o) {
j.get_to(o.cause);
}
} // namespace model } // namespace model
} // namespace smf_server } // namespace smf_server
......
...@@ -45,11 +45,14 @@ class Cause { ...@@ -45,11 +45,14 @@ class Cause {
///////////////////////////////////////////// /////////////////////////////////////////////
/// Cause members /// Cause members
std::string getValue() const;
void setValue(const std::string& value);
friend void to_json(nlohmann::json& j, const Cause& o); friend void to_json(nlohmann::json& j, const Cause& o);
friend void from_json(const nlohmann::json& j, Cause& o); friend void from_json(const nlohmann::json& j, Cause& o);
protected: protected:
std::string cause;
}; };
} // namespace model } // namespace model
......
...@@ -97,10 +97,10 @@ void from_json(const nlohmann::json& j, SmContextReleaseData& o) { ...@@ -97,10 +97,10 @@ void from_json(const nlohmann::json& j, SmContextReleaseData& o) {
} }
} }
Cause SmContextReleaseData::getCause() const { std::string SmContextReleaseData::getCause() const {
return m_Cause; return m_Cause;
} }
void SmContextReleaseData::setCause(Cause const& value) { void SmContextReleaseData::setCause(std::string const& value) {
m_Cause = value; m_Cause = value;
m_CauseIsSet = true; m_CauseIsSet = true;
} }
......
...@@ -47,8 +47,8 @@ class SmContextReleaseData { ...@@ -47,8 +47,8 @@ class SmContextReleaseData {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
Cause getCause() const; std::string getCause() const;
void setCause(Cause const& value); void setCause(std::string const& value);
bool causeIsSet() const; bool causeIsSet() const;
void unsetCause(); void unsetCause();
/// <summary> /// <summary>
...@@ -119,7 +119,7 @@ class SmContextReleaseData { ...@@ -119,7 +119,7 @@ class SmContextReleaseData {
friend void from_json(const nlohmann::json& j, SmContextReleaseData& o); friend void from_json(const nlohmann::json& j, SmContextReleaseData& o);
protected: protected:
Cause m_Cause; std::string m_Cause;
bool m_CauseIsSet; bool m_CauseIsSet;
NgApCause m_NgApCause; NgApCause m_NgApCause;
bool m_NgApCauseIsSet; bool m_NgApCauseIsSet;
......
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