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

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

AuthenticationSubscription::AuthenticationSubscription() {
  m_EncPermanentKey = "";
  m_EncPermanentKeyIsSet = false;
  m_ProtectionParameterId = "";
  m_ProtectionParameterIdIsSet = false;
  m_SequenceNumberIsSet = false;
  m_AuthenticationManagementField = "";
  m_AuthenticationManagementFieldIsSet = false;
  m_AlgorithmId = "";
  m_AlgorithmIdIsSet = false;
  m_EncOpcKey = "";
  m_EncOpcKeyIsSet = false;
  m_EncTopcKey = "";
  m_EncTopcKeyIsSet = false;
  m_VectorGenerationInHss = false;
  m_VectorGenerationInHssIsSet = false;
  m_N5gcAuthMethodIsSet = false;
  m_RgAuthenticationInd = false;
  m_RgAuthenticationIndIsSet = false;
  m_Supi = "";
  m_SupiIsSet = false;
}

AuthenticationSubscription::~AuthenticationSubscription() {}

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

void to_json(nlohmann::json &j, const AuthenticationSubscription &o) {
  j = nlohmann::json();
  j["authenticationMethod"] = o.m_AuthenticationMethod;
  if (o.encPermanentKeyIsSet())
    j["encPermanentKey"] = o.m_EncPermanentKey;
  if (o.protectionParameterIdIsSet())
    j["protectionParameterId"] = o.m_ProtectionParameterId;
  if (o.sequenceNumberIsSet())
    j["sequenceNumber"] = o.m_SequenceNumber;
  if (o.authenticationManagementFieldIsSet())
    j["authenticationManagementField"] = o.m_AuthenticationManagementField;
  if (o.algorithmIdIsSet())
    j["algorithmId"] = o.m_AlgorithmId;
  if (o.encOpcKeyIsSet())
    j["encOpcKey"] = o.m_EncOpcKey;
  if (o.encTopcKeyIsSet())
    j["encTopcKey"] = o.m_EncTopcKey;
  if (o.vectorGenerationInHssIsSet())
    j["vectorGenerationInHss"] = o.m_VectorGenerationInHss;
  if (o.n5gcAuthMethodIsSet())
    j["n5gcAuthMethod"] = o.m_N5gcAuthMethod;
  if (o.rgAuthenticationIndIsSet())
    j["rgAuthenticationInd"] = o.m_RgAuthenticationInd;
  if (o.supiIsSet())
    j["supi"] = o.m_Supi;
}

void from_json(const nlohmann::json &j, AuthenticationSubscription &o) {
  j.at("authenticationMethod").get_to(o.m_AuthenticationMethod);
  if (j.find("encPermanentKey") != j.end()) {
    j.at("encPermanentKey").get_to(o.m_EncPermanentKey);
    o.m_EncPermanentKeyIsSet = true;
  }
  if (j.find("protectionParameterId") != j.end()) {
    j.at("protectionParameterId").get_to(o.m_ProtectionParameterId);
    o.m_ProtectionParameterIdIsSet = true;
  }
  if (j.find("sequenceNumber") != j.end()) {
    j.at("sequenceNumber").get_to(o.m_SequenceNumber);
    o.m_SequenceNumberIsSet = true;
  }
  if (j.find("authenticationManagementField") != j.end()) {
    j.at("authenticationManagementField")
        .get_to(o.m_AuthenticationManagementField);
    o.m_AuthenticationManagementFieldIsSet = true;
  }
  if (j.find("algorithmId") != j.end()) {
    j.at("algorithmId").get_to(o.m_AlgorithmId);
    o.m_AlgorithmIdIsSet = true;
  }
  if (j.find("encOpcKey") != j.end()) {
    j.at("encOpcKey").get_to(o.m_EncOpcKey);
    o.m_EncOpcKeyIsSet = true;
  }
  if (j.find("encTopcKey") != j.end()) {
    j.at("encTopcKey").get_to(o.m_EncTopcKey);
    o.m_EncTopcKeyIsSet = true;
  }
  if (j.find("vectorGenerationInHss") != j.end()) {
    j.at("vectorGenerationInHss").get_to(o.m_VectorGenerationInHss);
    o.m_VectorGenerationInHssIsSet = true;
  }
  if (j.find("n5gcAuthMethod") != j.end()) {
    j.at("n5gcAuthMethod").get_to(o.m_N5gcAuthMethod);
    o.m_N5gcAuthMethodIsSet = true;
  }
  if (j.find("rgAuthenticationInd") != j.end()) {
    j.at("rgAuthenticationInd").get_to(o.m_RgAuthenticationInd);
    o.m_RgAuthenticationIndIsSet = true;
  }
  if (j.find("supi") != j.end()) {
    j.at("supi").get_to(o.m_Supi);
    o.m_SupiIsSet = true;
  }
}

AuthMethod AuthenticationSubscription::getAuthenticationMethod() const {
  return m_AuthenticationMethod;
}
void AuthenticationSubscription::setAuthenticationMethod(
    AuthMethod const &value) {
  m_AuthenticationMethod = value;
}
std::string AuthenticationSubscription::getEncPermanentKey() const {
  return m_EncPermanentKey;
}
void AuthenticationSubscription::setEncPermanentKey(std::string const &value) {
  m_EncPermanentKey = value;
  m_EncPermanentKeyIsSet = true;
}
bool AuthenticationSubscription::encPermanentKeyIsSet() const {
  return m_EncPermanentKeyIsSet;
}
void AuthenticationSubscription::unsetEncPermanentKey() {
  m_EncPermanentKeyIsSet = false;
}
std::string AuthenticationSubscription::getProtectionParameterId() const {
  return m_ProtectionParameterId;
}
void AuthenticationSubscription::setProtectionParameterId(
    std::string const &value) {
  m_ProtectionParameterId = value;
  m_ProtectionParameterIdIsSet = true;
}
bool AuthenticationSubscription::protectionParameterIdIsSet() const {
  return m_ProtectionParameterIdIsSet;
}
void AuthenticationSubscription::unsetProtectionParameterId() {
  m_ProtectionParameterIdIsSet = false;
}
SequenceNumber AuthenticationSubscription::getSequenceNumber() const {
  return m_SequenceNumber;
}
void AuthenticationSubscription::setSequenceNumber(
    SequenceNumber const &value) {
  m_SequenceNumber = value;
  m_SequenceNumberIsSet = true;
}
bool AuthenticationSubscription::sequenceNumberIsSet() const {
  return m_SequenceNumberIsSet;
}
void AuthenticationSubscription::unsetSequenceNumber() {
  m_SequenceNumberIsSet = false;
}
std::string
AuthenticationSubscription::getAuthenticationManagementField() const {
  return m_AuthenticationManagementField;
}
void AuthenticationSubscription::setAuthenticationManagementField(
    std::string const &value) {
  m_AuthenticationManagementField = value;
  m_AuthenticationManagementFieldIsSet = true;
}
bool AuthenticationSubscription::authenticationManagementFieldIsSet() const {
  return m_AuthenticationManagementFieldIsSet;
}
void AuthenticationSubscription::unsetAuthenticationManagementField() {
  m_AuthenticationManagementFieldIsSet = false;
}
std::string AuthenticationSubscription::getAlgorithmId() const {
  return m_AlgorithmId;
}
void AuthenticationSubscription::setAlgorithmId(std::string const &value) {
  m_AlgorithmId = value;
  m_AlgorithmIdIsSet = true;
}
bool AuthenticationSubscription::algorithmIdIsSet() const {
  return m_AlgorithmIdIsSet;
}
void AuthenticationSubscription::unsetAlgorithmId() {
  m_AlgorithmIdIsSet = false;
}
std::string AuthenticationSubscription::getEncOpcKey() const {
  return m_EncOpcKey;
}
void AuthenticationSubscription::setEncOpcKey(std::string const &value) {
  m_EncOpcKey = value;
  m_EncOpcKeyIsSet = true;
}
bool AuthenticationSubscription::encOpcKeyIsSet() const {
  return m_EncOpcKeyIsSet;
}
void AuthenticationSubscription::unsetEncOpcKey() { m_EncOpcKeyIsSet = false; }
std::string AuthenticationSubscription::getEncTopcKey() const {
  return m_EncTopcKey;
}
void AuthenticationSubscription::setEncTopcKey(std::string const &value) {
  m_EncTopcKey = value;
  m_EncTopcKeyIsSet = true;
}
bool AuthenticationSubscription::encTopcKeyIsSet() const {
  return m_EncTopcKeyIsSet;
}
void AuthenticationSubscription::unsetEncTopcKey() {
  m_EncTopcKeyIsSet = false;
}
bool AuthenticationSubscription::isVectorGenerationInHss() const {
  return m_VectorGenerationInHss;
}
void AuthenticationSubscription::setVectorGenerationInHss(bool const value) {
  m_VectorGenerationInHss = value;
  m_VectorGenerationInHssIsSet = true;
}
bool AuthenticationSubscription::vectorGenerationInHssIsSet() const {
  return m_VectorGenerationInHssIsSet;
}
void AuthenticationSubscription::unsetVectorGenerationInHss() {
  m_VectorGenerationInHssIsSet = false;
}
AuthMethod AuthenticationSubscription::getN5gcAuthMethod() const {
  return m_N5gcAuthMethod;
}
void AuthenticationSubscription::setN5gcAuthMethod(AuthMethod const &value) {
  m_N5gcAuthMethod = value;
  m_N5gcAuthMethodIsSet = true;
}
bool AuthenticationSubscription::n5gcAuthMethodIsSet() const {
  return m_N5gcAuthMethodIsSet;
}
void AuthenticationSubscription::unsetN5gcAuthMethod() {
  m_N5gcAuthMethodIsSet = false;
}
bool AuthenticationSubscription::isRgAuthenticationInd() const {
  return m_RgAuthenticationInd;
}
void AuthenticationSubscription::setRgAuthenticationInd(bool const value) {
  m_RgAuthenticationInd = value;
  m_RgAuthenticationIndIsSet = true;
}
bool AuthenticationSubscription::rgAuthenticationIndIsSet() const {
  return m_RgAuthenticationIndIsSet;
}
void AuthenticationSubscription::unsetRgAuthenticationInd() {
  m_RgAuthenticationIndIsSet = false;
}
std::string AuthenticationSubscription::getSupi() const { return m_Supi; }
void AuthenticationSubscription::setSupi(std::string const &value) {
  m_Supi = value;
  m_SupiIsSet = true;
}
bool AuthenticationSubscription::supiIsSet() const { return m_SupiIsSet; }
void AuthenticationSubscription::unsetSupi() { m_SupiIsSet = false; }

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