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

namespace oai::udr::model {

CagInfo::CagInfo() {
  m_CagOnlyIndicator = false;
  m_CagOnlyIndicatorIsSet = false;
}

CagInfo::~CagInfo() {}

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

void to_json(nlohmann::json &j, const CagInfo &o) {
  j = nlohmann::json();
  j["allowedCagList"] = o.m_AllowedCagList;
  if (o.cagOnlyIndicatorIsSet())
    j["cagOnlyIndicator"] = o.m_CagOnlyIndicator;
}

void from_json(const nlohmann::json &j, CagInfo &o) {
  j.at("allowedCagList").get_to(o.m_AllowedCagList);
  if (j.find("cagOnlyIndicator") != j.end()) {
    j.at("cagOnlyIndicator").get_to(o.m_CagOnlyIndicator);
    o.m_CagOnlyIndicatorIsSet = true;
  }
}

std::vector<std::string> &CagInfo::getAllowedCagList() {
  return m_AllowedCagList;
}
void CagInfo::setAllowedCagList(std::vector<std::string> const &value) {
  m_AllowedCagList = value;
}
bool CagInfo::isCagOnlyIndicator() const { return m_CagOnlyIndicator; }
void CagInfo::setCagOnlyIndicator(bool const value) {
  m_CagOnlyIndicator = value;
  m_CagOnlyIndicatorIsSet = true;
}
bool CagInfo::cagOnlyIndicatorIsSet() const { return m_CagOnlyIndicatorIsSet; }
void CagInfo::unsetCagOnlyIndicator() { m_CagOnlyIndicatorIsSet = false; }

} // namespace oai::udr::model