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

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

LcsClientGroupExternal::LcsClientGroupExternal() {
  m_LcsClientGroupId = "";
  m_LcsClientGroupIdIsSet = false;
  m_AllowedGeographicAreaIsSet = false;
  m_PrivacyCheckRelatedActionIsSet = false;
  m_ValidTimePeriodIsSet = false;
}

LcsClientGroupExternal::~LcsClientGroupExternal() {}

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

void to_json(nlohmann::json &j, const LcsClientGroupExternal &o) {
  j = nlohmann::json();
  if (o.lcsClientGroupIdIsSet())
    j["lcsClientGroupId"] = o.m_LcsClientGroupId;
  if (o.allowedGeographicAreaIsSet() || !o.m_AllowedGeographicArea.empty())
    j["allowedGeographicArea"] = o.m_AllowedGeographicArea;
  if (o.privacyCheckRelatedActionIsSet())
    j["privacyCheckRelatedAction"] = o.m_PrivacyCheckRelatedAction;
  if (o.validTimePeriodIsSet())
    j["validTimePeriod"] = o.m_ValidTimePeriod;
}

void from_json(const nlohmann::json &j, LcsClientGroupExternal &o) {
  if (j.find("lcsClientGroupId") != j.end()) {
    j.at("lcsClientGroupId").get_to(o.m_LcsClientGroupId);
    o.m_LcsClientGroupIdIsSet = true;
  }
  if (j.find("allowedGeographicArea") != j.end()) {
    j.at("allowedGeographicArea").get_to(o.m_AllowedGeographicArea);
    o.m_AllowedGeographicAreaIsSet = true;
  }
  if (j.find("privacyCheckRelatedAction") != j.end()) {
    j.at("privacyCheckRelatedAction").get_to(o.m_PrivacyCheckRelatedAction);
    o.m_PrivacyCheckRelatedActionIsSet = true;
  }
  if (j.find("validTimePeriod") != j.end()) {
    j.at("validTimePeriod").get_to(o.m_ValidTimePeriod);
    o.m_ValidTimePeriodIsSet = true;
  }
}

std::string LcsClientGroupExternal::getLcsClientGroupId() const {
  return m_LcsClientGroupId;
}
void LcsClientGroupExternal::setLcsClientGroupId(std::string const &value) {
  m_LcsClientGroupId = value;
  m_LcsClientGroupIdIsSet = true;
}
bool LcsClientGroupExternal::lcsClientGroupIdIsSet() const {
  return m_LcsClientGroupIdIsSet;
}
void LcsClientGroupExternal::unsetLcsClientGroupId() {
  m_LcsClientGroupIdIsSet = false;
}
std::vector<GeographicArea> &
LcsClientGroupExternal::getAllowedGeographicArea() {
  return m_AllowedGeographicArea;
}
void LcsClientGroupExternal::setAllowedGeographicArea(
    std::vector<GeographicArea> const &value) {
  m_AllowedGeographicArea = value;
  m_AllowedGeographicAreaIsSet = true;
}
bool LcsClientGroupExternal::allowedGeographicAreaIsSet() const {
  return m_AllowedGeographicAreaIsSet;
}
void LcsClientGroupExternal::unsetAllowedGeographicArea() {
  m_AllowedGeographicAreaIsSet = false;
}
PrivacyCheckRelatedAction
LcsClientGroupExternal::getPrivacyCheckRelatedAction() const {
  return m_PrivacyCheckRelatedAction;
}
void LcsClientGroupExternal::setPrivacyCheckRelatedAction(
    PrivacyCheckRelatedAction const &value) {
  m_PrivacyCheckRelatedAction = value;
  m_PrivacyCheckRelatedActionIsSet = true;
}
bool LcsClientGroupExternal::privacyCheckRelatedActionIsSet() const {
  return m_PrivacyCheckRelatedActionIsSet;
}
void LcsClientGroupExternal::unsetPrivacyCheckRelatedAction() {
  m_PrivacyCheckRelatedActionIsSet = false;
}
ValidTimePeriod LcsClientGroupExternal::getValidTimePeriod() const {
  return m_ValidTimePeriod;
}
void LcsClientGroupExternal::setValidTimePeriod(ValidTimePeriod const &value) {
  m_ValidTimePeriod = value;
  m_ValidTimePeriodIsSet = true;
}
bool LcsClientGroupExternal::validTimePeriodIsSet() const {
  return m_ValidTimePeriodIsSet;
}
void LcsClientGroupExternal::unsetValidTimePeriod() {
  m_ValidTimePeriodIsSet = false;
}

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