/**
 * 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 "5GVnGroupData.h"

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

_5GVnGroupData::_5GVnGroupData() {
  m_Dnn = "";
  m_PduSessionTypesIsSet = false;
  m_AppDescriptorsIsSet = false;
  m_SecondaryAuth = false;
  m_SecondaryAuthIsSet = false;
  m_DnAaaAddressIsSet = false;
}

_5GVnGroupData::~_5GVnGroupData() {}

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

void to_json(nlohmann::json &j, const _5GVnGroupData &o) {
  j = nlohmann::json();
  j["dnn"] = o.m_Dnn;
  j["sNssai"] = o.m_SNssai;
  if (o.pduSessionTypesIsSet() || !o.m_PduSessionTypes.empty())
    j["pduSessionTypes"] = o.m_PduSessionTypes;
  if (o.appDescriptorsIsSet() || !o.m_AppDescriptors.empty())
    j["appDescriptors"] = o.m_AppDescriptors;
  if (o.secondaryAuthIsSet())
    j["secondaryAuth"] = o.m_SecondaryAuth;
  if (o.dnAaaAddressIsSet())
    j["dnAaaAddress"] = o.m_DnAaaAddress;
}

void from_json(const nlohmann::json &j, _5GVnGroupData &o) {
  j.at("dnn").get_to(o.m_Dnn);
  j.at("sNssai").get_to(o.m_SNssai);
  if (j.find("pduSessionTypes") != j.end()) {
    j.at("pduSessionTypes").get_to(o.m_PduSessionTypes);
    o.m_PduSessionTypesIsSet = true;
  }
  if (j.find("appDescriptors") != j.end()) {
    j.at("appDescriptors").get_to(o.m_AppDescriptors);
    o.m_AppDescriptorsIsSet = true;
  }
  if (j.find("secondaryAuth") != j.end()) {
    j.at("secondaryAuth").get_to(o.m_SecondaryAuth);
    o.m_SecondaryAuthIsSet = true;
  }
  if (j.find("dnAaaAddress") != j.end()) {
    j.at("dnAaaAddress").get_to(o.m_DnAaaAddress);
    o.m_DnAaaAddressIsSet = true;
  }
}

std::string _5GVnGroupData::getDnn() const { return m_Dnn; }
void _5GVnGroupData::setDnn(std::string const &value) { m_Dnn = value; }
Snssai _5GVnGroupData::getSNssai() const { return m_SNssai; }
void _5GVnGroupData::setSNssai(Snssai const &value) { m_SNssai = value; }
std::vector<PduSessionType> &_5GVnGroupData::getPduSessionTypes() {
  return m_PduSessionTypes;
}
void _5GVnGroupData::setPduSessionTypes(
    std::vector<PduSessionType> const &value) {
  m_PduSessionTypes = value;
  m_PduSessionTypesIsSet = true;
}
bool _5GVnGroupData::pduSessionTypesIsSet() const {
  return m_PduSessionTypesIsSet;
}
void _5GVnGroupData::unsetPduSessionTypes() { m_PduSessionTypesIsSet = false; }
std::vector<AppDescriptor> &_5GVnGroupData::getAppDescriptors() {
  return m_AppDescriptors;
}
void _5GVnGroupData::setAppDescriptors(
    std::vector<AppDescriptor> const &value) {
  m_AppDescriptors = value;
  m_AppDescriptorsIsSet = true;
}
bool _5GVnGroupData::appDescriptorsIsSet() const {
  return m_AppDescriptorsIsSet;
}
void _5GVnGroupData::unsetAppDescriptors() { m_AppDescriptorsIsSet = false; }
bool _5GVnGroupData::isSecondaryAuth() const { return m_SecondaryAuth; }
void _5GVnGroupData::setSecondaryAuth(bool const value) {
  m_SecondaryAuth = value;
  m_SecondaryAuthIsSet = true;
}
bool _5GVnGroupData::secondaryAuthIsSet() const { return m_SecondaryAuthIsSet; }
void _5GVnGroupData::unsetSecondaryAuth() { m_SecondaryAuthIsSet = false; }
IpAddress _5GVnGroupData::getDnAaaAddress() const { return m_DnAaaAddress; }
void _5GVnGroupData::setDnAaaAddress(IpAddress const &value) {
  m_DnAaaAddress = value;
  m_DnAaaAddressIsSet = true;
}
bool _5GVnGroupData::dnAaaAddressIsSet() const { return m_DnAaaAddressIsSet; }
void _5GVnGroupData::unsetDnAaaAddress() { m_DnAaaAddressIsSet = false; }

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