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

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

PduSessionTypes::PduSessionTypes() { m_AllowedSessionTypesIsSet = false; }

PduSessionTypes::~PduSessionTypes() {}

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

void to_json(nlohmann::json &j, const PduSessionTypes &o) {
  j = nlohmann::json();
  j["defaultSessionType"] = o.m_DefaultSessionType;
  if (o.allowedSessionTypesIsSet() || !o.m_AllowedSessionTypes.empty())
    j["allowedSessionTypes"] = o.m_AllowedSessionTypes;
}

void from_json(const nlohmann::json &j, PduSessionTypes &o) {
  j.at("defaultSessionType").get_to(o.m_DefaultSessionType);
  if (j.find("allowedSessionTypes") != j.end()) {
    j.at("allowedSessionTypes").get_to(o.m_AllowedSessionTypes);
    o.m_AllowedSessionTypesIsSet = true;
  }
}

PduSessionType PduSessionTypes::getDefaultSessionType() const {
  return m_DefaultSessionType;
}
void PduSessionTypes::setDefaultSessionType(PduSessionType const &value) {
  m_DefaultSessionType = value;
}
std::vector<PduSessionType> &PduSessionTypes::getAllowedSessionTypes() {
  return m_AllowedSessionTypes;
}
void PduSessionTypes::setAllowedSessionTypes(
    std::vector<PduSessionType> const &value) {
  m_AllowedSessionTypes = value;
  m_AllowedSessionTypesIsSet = true;
}
bool PduSessionTypes::allowedSessionTypesIsSet() const {
  return m_AllowedSessionTypesIsSet;
}
void PduSessionTypes::unsetAllowedSessionTypes() {
  m_AllowedSessionTypesIsSet = false;
}

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