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

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

TemporalValidity::TemporalValidity() {
  m_StartTime = "";
  m_StartTimeIsSet = false;
  m_StopTime = "";
  m_StopTimeIsSet = false;
}

TemporalValidity::~TemporalValidity() {}

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

void to_json(nlohmann::json &j, const TemporalValidity &o) {
  j = nlohmann::json();
  if (o.startTimeIsSet())
    j["startTime"] = o.m_StartTime;
  if (o.stopTimeIsSet())
    j["stopTime"] = o.m_StopTime;
}

void from_json(const nlohmann::json &j, TemporalValidity &o) {
  if (j.find("startTime") != j.end()) {
    j.at("startTime").get_to(o.m_StartTime);
    o.m_StartTimeIsSet = true;
  }
  if (j.find("stopTime") != j.end()) {
    j.at("stopTime").get_to(o.m_StopTime);
    o.m_StopTimeIsSet = true;
  }
}

std::string TemporalValidity::getStartTime() const { return m_StartTime; }
void TemporalValidity::setStartTime(std::string const &value) {
  m_StartTime = value;
  m_StartTimeIsSet = true;
}
bool TemporalValidity::startTimeIsSet() const { return m_StartTimeIsSet; }
void TemporalValidity::unsetStartTime() { m_StartTimeIsSet = false; }
std::string TemporalValidity::getStopTime() const { return m_StopTime; }
void TemporalValidity::setStopTime(std::string const &value) {
  m_StopTime = value;
  m_StopTimeIsSet = true;
}
bool TemporalValidity::stopTimeIsSet() const { return m_StopTimeIsSet; }
void TemporalValidity::unsetStopTime() { m_StopTimeIsSet = false; }

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