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

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

ChargingInformation::ChargingInformation() {
  m_PrimaryChfAddress = "";
  m_SecondaryChfAddress = "";
  m_PrimaryChfSetId = "";
  m_PrimaryChfSetIdIsSet = false;
  m_PrimaryChfInstanceId = "";
  m_PrimaryChfInstanceIdIsSet = false;
  m_SecondaryChfSetId = "";
  m_SecondaryChfSetIdIsSet = false;
  m_SecondaryChfInstanceId = "";
  m_SecondaryChfInstanceIdIsSet = false;
}

ChargingInformation::~ChargingInformation() {}

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

void to_json(nlohmann::json &j, const ChargingInformation &o) {
  j = nlohmann::json();
  j["primaryChfAddress"] = o.m_PrimaryChfAddress;
  j["secondaryChfAddress"] = o.m_SecondaryChfAddress;
  if (o.primaryChfSetIdIsSet())
    j["primaryChfSetId"] = o.m_PrimaryChfSetId;
  if (o.primaryChfInstanceIdIsSet())
    j["primaryChfInstanceId"] = o.m_PrimaryChfInstanceId;
  if (o.secondaryChfSetIdIsSet())
    j["secondaryChfSetId"] = o.m_SecondaryChfSetId;
  if (o.secondaryChfInstanceIdIsSet())
    j["secondaryChfInstanceId"] = o.m_SecondaryChfInstanceId;
}

void from_json(const nlohmann::json &j, ChargingInformation &o) {
  j.at("primaryChfAddress").get_to(o.m_PrimaryChfAddress);
  j.at("secondaryChfAddress").get_to(o.m_SecondaryChfAddress);
  if (j.find("primaryChfSetId") != j.end()) {
    j.at("primaryChfSetId").get_to(o.m_PrimaryChfSetId);
    o.m_PrimaryChfSetIdIsSet = true;
  }
  if (j.find("primaryChfInstanceId") != j.end()) {
    j.at("primaryChfInstanceId").get_to(o.m_PrimaryChfInstanceId);
    o.m_PrimaryChfInstanceIdIsSet = true;
  }
  if (j.find("secondaryChfSetId") != j.end()) {
    j.at("secondaryChfSetId").get_to(o.m_SecondaryChfSetId);
    o.m_SecondaryChfSetIdIsSet = true;
  }
  if (j.find("secondaryChfInstanceId") != j.end()) {
    j.at("secondaryChfInstanceId").get_to(o.m_SecondaryChfInstanceId);
    o.m_SecondaryChfInstanceIdIsSet = true;
  }
}

std::string ChargingInformation::getPrimaryChfAddress() const {
  return m_PrimaryChfAddress;
}
void ChargingInformation::setPrimaryChfAddress(std::string const &value) {
  m_PrimaryChfAddress = value;
}
std::string ChargingInformation::getSecondaryChfAddress() const {
  return m_SecondaryChfAddress;
}
void ChargingInformation::setSecondaryChfAddress(std::string const &value) {
  m_SecondaryChfAddress = value;
}
std::string ChargingInformation::getPrimaryChfSetId() const {
  return m_PrimaryChfSetId;
}
void ChargingInformation::setPrimaryChfSetId(std::string const &value) {
  m_PrimaryChfSetId = value;
  m_PrimaryChfSetIdIsSet = true;
}
bool ChargingInformation::primaryChfSetIdIsSet() const {
  return m_PrimaryChfSetIdIsSet;
}
void ChargingInformation::unsetPrimaryChfSetId() {
  m_PrimaryChfSetIdIsSet = false;
}
std::string ChargingInformation::getPrimaryChfInstanceId() const {
  return m_PrimaryChfInstanceId;
}
void ChargingInformation::setPrimaryChfInstanceId(std::string const &value) {
  m_PrimaryChfInstanceId = value;
  m_PrimaryChfInstanceIdIsSet = true;
}
bool ChargingInformation::primaryChfInstanceIdIsSet() const {
  return m_PrimaryChfInstanceIdIsSet;
}
void ChargingInformation::unsetPrimaryChfInstanceId() {
  m_PrimaryChfInstanceIdIsSet = false;
}
std::string ChargingInformation::getSecondaryChfSetId() const {
  return m_SecondaryChfSetId;
}
void ChargingInformation::setSecondaryChfSetId(std::string const &value) {
  m_SecondaryChfSetId = value;
  m_SecondaryChfSetIdIsSet = true;
}
bool ChargingInformation::secondaryChfSetIdIsSet() const {
  return m_SecondaryChfSetIdIsSet;
}
void ChargingInformation::unsetSecondaryChfSetId() {
  m_SecondaryChfSetIdIsSet = false;
}
std::string ChargingInformation::getSecondaryChfInstanceId() const {
  return m_SecondaryChfInstanceId;
}
void ChargingInformation::setSecondaryChfInstanceId(std::string const &value) {
  m_SecondaryChfInstanceId = value;
  m_SecondaryChfInstanceIdIsSet = true;
}
bool ChargingInformation::secondaryChfInstanceIdIsSet() const {
  return m_SecondaryChfInstanceIdIsSet;
}
void ChargingInformation::unsetSecondaryChfInstanceId() {
  m_SecondaryChfInstanceIdIsSet = false;
}

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