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

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

LcsClientExternal::LcsClientExternal() {
  m_AllowedGeographicAreaIsSet = false;
  m_PrivacyCheckRelatedActionIsSet = false;
  m_ValidTimePeriodIsSet = false;
}

LcsClientExternal::~LcsClientExternal() {}

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

void to_json(nlohmann::json &j, const LcsClientExternal &o) {
  j = nlohmann::json();
  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, LcsClientExternal &o) {
  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::vector<GeographicArea> &LcsClientExternal::getAllowedGeographicArea() {
  return m_AllowedGeographicArea;
}
void LcsClientExternal::setAllowedGeographicArea(
    std::vector<GeographicArea> const &value) {
  m_AllowedGeographicArea = value;
  m_AllowedGeographicAreaIsSet = true;
}
bool LcsClientExternal::allowedGeographicAreaIsSet() const {
  return m_AllowedGeographicAreaIsSet;
}
void LcsClientExternal::unsetAllowedGeographicArea() {
  m_AllowedGeographicAreaIsSet = false;
}
PrivacyCheckRelatedAction
LcsClientExternal::getPrivacyCheckRelatedAction() const {
  return m_PrivacyCheckRelatedAction;
}
void LcsClientExternal::setPrivacyCheckRelatedAction(
    PrivacyCheckRelatedAction const &value) {
  m_PrivacyCheckRelatedAction = value;
  m_PrivacyCheckRelatedActionIsSet = true;
}
bool LcsClientExternal::privacyCheckRelatedActionIsSet() const {
  return m_PrivacyCheckRelatedActionIsSet;
}
void LcsClientExternal::unsetPrivacyCheckRelatedAction() {
  m_PrivacyCheckRelatedActionIsSet = false;
}
ValidTimePeriod LcsClientExternal::getValidTimePeriod() const {
  return m_ValidTimePeriod;
}
void LcsClientExternal::setValidTimePeriod(ValidTimePeriod const &value) {
  m_ValidTimePeriod = value;
  m_ValidTimePeriodIsSet = true;
}
bool LcsClientExternal::validTimePeriodIsSet() const {
  return m_ValidTimePeriodIsSet;
}
void LcsClientExternal::unsetValidTimePeriod() {
  m_ValidTimePeriodIsSet = false;
}

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