/**
 * Nudr_DataRepository API OpenAPI file
 * 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 Do not edit
 * the class manually.
 */

#include "EmergencyInfo.h"

namespace org {
namespace openapitools {
namespace server {
namespace model {

EmergencyInfo::EmergencyInfo() {
  m_PgwFqdn = "";
  m_PgwFqdnIsSet = false;
  m_PgwIpAddressIsSet = false;
  m_SmfInstanceId = "";
  m_SmfInstanceIdIsSet = false;
  m_EpdgInd = false;
  m_EpdgIndIsSet = false;
}

EmergencyInfo::~EmergencyInfo() {}

void EmergencyInfo::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const EmergencyInfo &o) {
  j = nlohmann::json();
  if (o.pgwFqdnIsSet())
    j["pgwFqdn"] = o.m_PgwFqdn;
  if (o.pgwIpAddressIsSet())
    j["pgwIpAddress"] = o.m_PgwIpAddress;
  if (o.smfInstanceIdIsSet())
    j["smfInstanceId"] = o.m_SmfInstanceId;
  if (o.epdgIndIsSet())
    j["epdgInd"] = o.m_EpdgInd;
}

void from_json(const nlohmann::json &j, EmergencyInfo &o) {
  if (j.find("pgwFqdn") != j.end()) {
    j.at("pgwFqdn").get_to(o.m_PgwFqdn);
    o.m_PgwFqdnIsSet = true;
  }
  if (j.find("pgwIpAddress") != j.end()) {
    j.at("pgwIpAddress").get_to(o.m_PgwIpAddress);
    o.m_PgwIpAddressIsSet = true;
  }
  if (j.find("smfInstanceId") != j.end()) {
    j.at("smfInstanceId").get_to(o.m_SmfInstanceId);
    o.m_SmfInstanceIdIsSet = true;
  }
  if (j.find("epdgInd") != j.end()) {
    j.at("epdgInd").get_to(o.m_EpdgInd);
    o.m_EpdgIndIsSet = true;
  }
}

std::string EmergencyInfo::getPgwFqdn() const { return m_PgwFqdn; }
void EmergencyInfo::setPgwFqdn(std::string const &value) {
  m_PgwFqdn = value;
  m_PgwFqdnIsSet = true;
}
bool EmergencyInfo::pgwFqdnIsSet() const { return m_PgwFqdnIsSet; }
void EmergencyInfo::unsetPgwFqdn() { m_PgwFqdnIsSet = false; }
IpAddress EmergencyInfo::getPgwIpAddress() const { return m_PgwIpAddress; }
void EmergencyInfo::setPgwIpAddress(IpAddress const &value) {
  m_PgwIpAddress = value;
  m_PgwIpAddressIsSet = true;
}
bool EmergencyInfo::pgwIpAddressIsSet() const { return m_PgwIpAddressIsSet; }
void EmergencyInfo::unsetPgwIpAddress() { m_PgwIpAddressIsSet = false; }
std::string EmergencyInfo::getSmfInstanceId() const { return m_SmfInstanceId; }
void EmergencyInfo::setSmfInstanceId(std::string const &value) {
  m_SmfInstanceId = value;
  m_SmfInstanceIdIsSet = true;
}
bool EmergencyInfo::smfInstanceIdIsSet() const { return m_SmfInstanceIdIsSet; }
void EmergencyInfo::unsetSmfInstanceId() { m_SmfInstanceIdIsSet = false; }
bool EmergencyInfo::isEpdgInd() const { return m_EpdgInd; }
void EmergencyInfo::setEpdgInd(bool const value) {
  m_EpdgInd = value;
  m_EpdgIndIsSet = true;
}
bool EmergencyInfo::epdgIndIsSet() const { return m_EpdgIndIsSet; }
void EmergencyInfo::unsetEpdgInd() { m_EpdgIndIsSet = false; }

} // namespace model
} // namespace server
} // namespace openapitools
} // namespace org
