Skip to content
Snippets Groups Projects
Select Git revision
  • 72167b50da14ee18d2fe80c61140b31d311205d7
  • master default
  • NR_RRC_harq_hacks
  • NR_RRC_harq
  • OpInConnect_ISIP
  • NR_RRC_harq_b
  • nr_pucch2
  • develop_integration_2020_w17
  • new_rlc_2020
  • NR_RRC_PRACH_procedures
  • develop_integration_2020_w15
  • doc-nfapi-l2-update
  • NR_RRC_PDCP
  • NR_RRC_X2AP_RemoveHardcodings_GlobalEdge
  • ue_nfapi_mch
  • fapi_for_dmrs_and_ptrs
  • split73
  • develop
  • NR_TRX_on_single_port2
  • nr_pucch
  • NCTU_OpinConnect_LDPC
  • NR_TRX_on_single_port
  • 2020.w16
  • 2020.w15
  • 2020.w11
  • 2020.w09
  • 2020.w06
  • v1.2.1
  • 2020.w05
  • 2020.w04
  • 2020.w03
  • v1.2.0
  • develop-nr-2020w03
  • develop-nr-2020w02
  • 2019.w51
  • develop-nr-2019w51
  • develop-nr-2019w50
  • develop-nr-2019w48
  • nr-ip-over-lte-v.1.5
  • 2019.w44
  • nr-ip-over-lte-v.1.4
  • nr-ip-over-lte-v.1.3
42 results

pre-commit

Blame
  • Forked from oai / openairinterface5G
    Source project has a limited visibility.
    LoggingIntervalNrMdt_anyOf.cpp 4.78 KiB
    /**
     * Common Data Types
     * Common Data Types for Service Based Interfaces. © 2022, 3GPP Organizational
     * Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
     *
     * The version of the OpenAPI document: 1.2.7
     *
     *
     * NOTE: This class is auto generated by OpenAPI Generator
     * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
     * the class manually.
     */
    
    #include "LoggingIntervalNrMdt_anyOf.h"
    #include "Helpers.h"
    #include <stdexcept>
    #include <sstream>
    
    namespace oai::model::common {
    
    LoggingIntervalNrMdt_anyOf::LoggingIntervalNrMdt_anyOf() {}
    
    void LoggingIntervalNrMdt_anyOf::validate() const {
      std::stringstream msg;
      if (!validate(msg)) {
        throw oai::model::common::helpers::ValidationException(msg.str());
      }
    }
    
    bool LoggingIntervalNrMdt_anyOf::validate(std::stringstream& msg) const {
      return validate(msg, "");
    }
    
    bool LoggingIntervalNrMdt_anyOf::validate(
        std::stringstream& msg, const std::string& pathPrefix) const {
      bool success = true;
      const std::string _pathPrefix =
          pathPrefix.empty() ? "LoggingIntervalNrMdt_anyOf" : pathPrefix;
    
      if (m_value == LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::
                         INVALID_VALUE_OPENAPI_GENERATED) {
        success = false;
        msg << _pathPrefix << ": has no value;";
      }
    
      return success;
    }
    
    bool LoggingIntervalNrMdt_anyOf::operator==(
        const LoggingIntervalNrMdt_anyOf& rhs) const {
      return getValue() == rhs.getValue()
    
          ;
    }
    
    bool LoggingIntervalNrMdt_anyOf::operator!=(
        const LoggingIntervalNrMdt_anyOf& rhs) const {
      return !(*this == rhs);
    }
    
    void to_json(nlohmann::json& j, const LoggingIntervalNrMdt_anyOf& o) {
      j = nlohmann::json();
    
      switch (o.getValue()) {
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::
            INVALID_VALUE_OPENAPI_GENERATED:
          j = "INVALID_VALUE_OPENAPI_GENERATED";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_128:
          j = "128";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_256:
          j = "256";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_512:
          j = "512";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_1024:
          j = "1024";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_2048:
          j = "2048";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_3072:
          j = "3072";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_4096:
          j = "4096";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_6144:
          j = "6144";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_320:
          j = "320";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_640:
          j = "640";
          break;
        case LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_INFINITY:
          j = "infinity";
          break;
      }
    }
    
    void from_json(const nlohmann::json& j, LoggingIntervalNrMdt_anyOf& o) {
      auto s = j.get<std::string>();
      if (s == "128") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_128);
      } else if (s == "256") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_256);
      } else if (s == "512") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_512);
      } else if (s == "1024") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_1024);
      } else if (s == "2048") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_2048);
      } else if (s == "3072") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_3072);
      } else if (s == "4096") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_4096);
      } else if (s == "6144") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_6144);
      } else if (s == "320") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_320);
      } else if (s == "640") {
        o.setValue(LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_640);
      } else if (s == "infinity") {
        o.setValue(
            LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf::_INFINITY);
      } else {
        std::stringstream ss;
        ss << "Unexpected value " << s << " in json"
           << " cannot be converted to enum of type"
           << " LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf";
        throw std::invalid_argument(ss.str());
      }
    }
    
    LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf
    LoggingIntervalNrMdt_anyOf::getValue() const {
      return m_value;
    }
    void LoggingIntervalNrMdt_anyOf::setValue(
        LoggingIntervalNrMdt_anyOf::eLoggingIntervalNrMdt_anyOf value) {
      m_value = value;
    }
    
    }  // namespace oai::model::common