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

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

ScheduledCommunicationTimeRm::ScheduledCommunicationTimeRm() {
  m_DaysOfWeekIsSet = false;
  m_TimeOfDayStart = "";
  m_TimeOfDayStartIsSet = false;
  m_TimeOfDayEnd = "";
  m_TimeOfDayEndIsSet = false;
}

ScheduledCommunicationTimeRm::~ScheduledCommunicationTimeRm() {}

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

void to_json(nlohmann::json &j, const ScheduledCommunicationTimeRm &o) {
  j = nlohmann::json();
  if (o.daysOfWeekIsSet() || !o.m_DaysOfWeek.empty())
    j["daysOfWeek"] = o.m_DaysOfWeek;
  if (o.timeOfDayStartIsSet())
    j["timeOfDayStart"] = o.m_TimeOfDayStart;
  if (o.timeOfDayEndIsSet())
    j["timeOfDayEnd"] = o.m_TimeOfDayEnd;
}

void from_json(const nlohmann::json &j, ScheduledCommunicationTimeRm &o) {
  if (j.find("daysOfWeek") != j.end()) {
    j.at("daysOfWeek").get_to(o.m_DaysOfWeek);
    o.m_DaysOfWeekIsSet = true;
  }
  if (j.find("timeOfDayStart") != j.end()) {
    j.at("timeOfDayStart").get_to(o.m_TimeOfDayStart);
    o.m_TimeOfDayStartIsSet = true;
  }
  if (j.find("timeOfDayEnd") != j.end()) {
    j.at("timeOfDayEnd").get_to(o.m_TimeOfDayEnd);
    o.m_TimeOfDayEndIsSet = true;
  }
}

std::vector<int32_t> &ScheduledCommunicationTimeRm::getDaysOfWeek() {
  return m_DaysOfWeek;
}
void ScheduledCommunicationTimeRm::setDaysOfWeek(
    std::vector<int32_t> const value) {
  m_DaysOfWeek = value;
  m_DaysOfWeekIsSet = true;
}
bool ScheduledCommunicationTimeRm::daysOfWeekIsSet() const {
  return m_DaysOfWeekIsSet;
}
void ScheduledCommunicationTimeRm::unsetDaysOfWeek() {
  m_DaysOfWeekIsSet = false;
}
std::string ScheduledCommunicationTimeRm::getTimeOfDayStart() const {
  return m_TimeOfDayStart;
}
void ScheduledCommunicationTimeRm::setTimeOfDayStart(std::string const &value) {
  m_TimeOfDayStart = value;
  m_TimeOfDayStartIsSet = true;
}
bool ScheduledCommunicationTimeRm::timeOfDayStartIsSet() const {
  return m_TimeOfDayStartIsSet;
}
void ScheduledCommunicationTimeRm::unsetTimeOfDayStart() {
  m_TimeOfDayStartIsSet = false;
}
std::string ScheduledCommunicationTimeRm::getTimeOfDayEnd() const {
  return m_TimeOfDayEnd;
}
void ScheduledCommunicationTimeRm::setTimeOfDayEnd(std::string const &value) {
  m_TimeOfDayEnd = value;
  m_TimeOfDayEndIsSet = true;
}
bool ScheduledCommunicationTimeRm::timeOfDayEndIsSet() const {
  return m_TimeOfDayEndIsSet;
}
void ScheduledCommunicationTimeRm::unsetTimeOfDayEnd() {
  m_TimeOfDayEndIsSet = false;
}

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