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

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

SmfSelectionSubscriptionData::SmfSelectionSubscriptionData() {
  m_SupportedFeatures = "";
  m_SupportedFeaturesIsSet = false;
  m_SubscribedSnssaiInfosIsSet = false;
  m_SharedSnssaiInfosId = "";
  m_SharedSnssaiInfosIdIsSet = false;
}

SmfSelectionSubscriptionData::~SmfSelectionSubscriptionData() {}

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

void to_json(nlohmann::json &j, const SmfSelectionSubscriptionData &o) {
  j = nlohmann::json();
  if (o.supportedFeaturesIsSet())
    j["supportedFeatures"] = o.m_SupportedFeatures;
  if (o.subscribedSnssaiInfosIsSet() || !o.m_SubscribedSnssaiInfos.empty())
    j["subscribedSnssaiInfos"] = o.m_SubscribedSnssaiInfos;
  if (o.sharedSnssaiInfosIdIsSet())
    j["sharedSnssaiInfosId"] = o.m_SharedSnssaiInfosId;
}

void from_json(const nlohmann::json &j, SmfSelectionSubscriptionData &o) {
  if (j.find("supportedFeatures") != j.end()) {
    j.at("supportedFeatures").get_to(o.m_SupportedFeatures);
    o.m_SupportedFeaturesIsSet = true;
  }
  if (j.find("subscribedSnssaiInfos") != j.end()) {
    j.at("subscribedSnssaiInfos").get_to(o.m_SubscribedSnssaiInfos);
    o.m_SubscribedSnssaiInfosIsSet = true;
  }
  if (j.find("sharedSnssaiInfosId") != j.end()) {
    j.at("sharedSnssaiInfosId").get_to(o.m_SharedSnssaiInfosId);
    o.m_SharedSnssaiInfosIdIsSet = true;
  }
}

std::string SmfSelectionSubscriptionData::getSupportedFeatures() const {
  return m_SupportedFeatures;
}
void SmfSelectionSubscriptionData::setSupportedFeatures(
    std::string const &value) {
  m_SupportedFeatures = value;
  m_SupportedFeaturesIsSet = true;
}
bool SmfSelectionSubscriptionData::supportedFeaturesIsSet() const {
  return m_SupportedFeaturesIsSet;
}
void SmfSelectionSubscriptionData::unsetSupportedFeatures() {
  m_SupportedFeaturesIsSet = false;
}
std::map<std::string, SnssaiInfo> &
SmfSelectionSubscriptionData::getSubscribedSnssaiInfos() {
  return m_SubscribedSnssaiInfos;
}
void SmfSelectionSubscriptionData::setSubscribedSnssaiInfos(
    std::map<std::string, SnssaiInfo> const &value) {
  m_SubscribedSnssaiInfos = value;
  m_SubscribedSnssaiInfosIsSet = true;
}
bool SmfSelectionSubscriptionData::subscribedSnssaiInfosIsSet() const {
  return m_SubscribedSnssaiInfosIsSet;
}
void SmfSelectionSubscriptionData::unsetSubscribedSnssaiInfos() {
  m_SubscribedSnssaiInfosIsSet = false;
}
std::string SmfSelectionSubscriptionData::getSharedSnssaiInfosId() const {
  return m_SharedSnssaiInfosId;
}
void SmfSelectionSubscriptionData::setSharedSnssaiInfosId(
    std::string const &value) {
  m_SharedSnssaiInfosId = value;
  m_SharedSnssaiInfosIdIsSet = true;
}
bool SmfSelectionSubscriptionData::sharedSnssaiInfosIdIsSet() const {
  return m_SharedSnssaiInfosIdIsSet;
}
void SmfSelectionSubscriptionData::unsetSharedSnssaiInfosId() {
  m_SharedSnssaiInfosIdIsSet = false;
}

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