/**
 * Namf_Communication
 * AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
 * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 1.1.0.alpha-1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "PwsInformation.h"

namespace oai {
namespace amf {
namespace model {

PwsInformation::PwsInformation() {
  m_MessageIdentifier    = 0;
  m_SerialNumber         = 0;
  m_SendRanResponse      = false;
  m_SendRanResponseIsSet = false;
  m_OmcId                = "";
  m_OmcIdIsSet           = false;
}

PwsInformation::~PwsInformation() {}

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

void to_json(nlohmann::json& j, const PwsInformation& o) {
  j                      = nlohmann::json();
  j["messageIdentifier"] = o.m_MessageIdentifier;
  j["serialNumber"]      = o.m_SerialNumber;
  j["pwsContainer"]      = o.m_PwsContainer;
  if (o.sendRanResponseIsSet()) j["sendRanResponse"] = o.m_SendRanResponse;
  if (o.omcIdIsSet()) j["omcId"] = o.m_OmcId;
}

void from_json(const nlohmann::json& j, PwsInformation& o) {
  j.at("messageIdentifier").get_to(o.m_MessageIdentifier);
  j.at("serialNumber").get_to(o.m_SerialNumber);
  j.at("pwsContainer").get_to(o.m_PwsContainer);
  if (j.find("sendRanResponse") != j.end()) {
    j.at("sendRanResponse").get_to(o.m_SendRanResponse);
    o.m_SendRanResponseIsSet = true;
  }
  if (j.find("omcId") != j.end()) {
    j.at("omcId").get_to(o.m_OmcId);
    o.m_OmcIdIsSet = true;
  }
}

int32_t PwsInformation::getMessageIdentifier() const {
  return m_MessageIdentifier;
}
void PwsInformation::setMessageIdentifier(int32_t const value) {
  m_MessageIdentifier = value;
}
int32_t PwsInformation::getSerialNumber() const {
  return m_SerialNumber;
}
void PwsInformation::setSerialNumber(int32_t const value) {
  m_SerialNumber = value;
}
N2InfoContent PwsInformation::getPwsContainer() const {
  return m_PwsContainer;
}
void PwsInformation::setPwsContainer(N2InfoContent const& value) {
  m_PwsContainer = value;
}
bool PwsInformation::isSendRanResponse() const {
  return m_SendRanResponse;
}
void PwsInformation::setSendRanResponse(bool const value) {
  m_SendRanResponse      = value;
  m_SendRanResponseIsSet = true;
}
bool PwsInformation::sendRanResponseIsSet() const {
  return m_SendRanResponseIsSet;
}
void PwsInformation::unsetSendRanResponse() {
  m_SendRanResponseIsSet = false;
}
std::string PwsInformation::getOmcId() const {
  return m_OmcId;
}
void PwsInformation::setOmcId(std::string const& value) {
  m_OmcId      = value;
  m_OmcIdIsSet = true;
}
bool PwsInformation::omcIdIsSet() const {
  return m_OmcIdIsSet;
}
void PwsInformation::unsetOmcId() {
  m_OmcIdIsSet = false;
}

}  // namespace model
}  // namespace amf
}  // namespace oai
