InterfaceUpfInfoItem.cpp 4.14 KB
Newer Older
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
1
/**
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
2
 * NRF NFManagement Service
Raphael Defosseux's avatar
Raphael Defosseux committed
3
4
 * NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS,
 * CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
5
6
7
 *
 * The version of the OpenAPI document: 1.1.0.alpha-1
 *
Raphael Defosseux's avatar
Raphael Defosseux committed
8
9
10
11
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
12
 */
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
13
14
15
16
17
18
19

#include "InterfaceUpfInfoItem.h"

namespace oai {
namespace nrf {
namespace model {

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
20
21
22
InterfaceUpfInfoItem::InterfaceUpfInfoItem() {
  m_Ipv4EndpointAddressesIsSet = false;
  m_Ipv6EndpointAddressesIsSet = false;
Raphael Defosseux's avatar
Raphael Defosseux committed
23
24
25
26
  m_EndpointFqdn               = "";
  m_EndpointFqdnIsSet          = false;
  m_NetworkInstance            = "";
  m_NetworkInstanceIsSet       = false;
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
27
28
}

Raphael Defosseux's avatar
Raphael Defosseux committed
29
InterfaceUpfInfoItem::~InterfaceUpfInfoItem() {}
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
30

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
31
32
void InterfaceUpfInfoItem::validate() {
  // TODO: implement validation
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
33
34
}

Raphael Defosseux's avatar
Raphael Defosseux committed
35
36
void to_json(nlohmann::json& j, const InterfaceUpfInfoItem& o) {
  j                  = nlohmann::json();
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
37
38
39
40
41
  j["interfaceType"] = o.m_InterfaceType;
  if (o.ipv4EndpointAddressesIsSet() || !o.m_Ipv4EndpointAddresses.empty())
    j["ipv4EndpointAddresses"] = o.m_Ipv4EndpointAddresses;
  if (o.ipv6EndpointAddressesIsSet() || !o.m_Ipv6EndpointAddresses.empty())
    j["ipv6EndpointAddresses"] = o.m_Ipv6EndpointAddresses;
Raphael Defosseux's avatar
Raphael Defosseux committed
42
43
  if (o.endpointFqdnIsSet()) j["endpointFqdn"] = o.m_EndpointFqdn;
  if (o.networkInstanceIsSet()) j["networkInstance"] = o.m_NetworkInstance;
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
44
45
}

Raphael Defosseux's avatar
Raphael Defosseux committed
46
void from_json(const nlohmann::json& j, InterfaceUpfInfoItem& o) {
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
  j.at("interfaceType").get_to(o.m_InterfaceType);
  if (j.find("ipv4EndpointAddresses") != j.end()) {
    j.at("ipv4EndpointAddresses").get_to(o.m_Ipv4EndpointAddresses);
    o.m_Ipv4EndpointAddressesIsSet = true;
  }
  if (j.find("ipv6EndpointAddresses") != j.end()) {
    j.at("ipv6EndpointAddresses").get_to(o.m_Ipv6EndpointAddresses);
    o.m_Ipv6EndpointAddressesIsSet = true;
  }
  if (j.find("endpointFqdn") != j.end()) {
    j.at("endpointFqdn").get_to(o.m_EndpointFqdn);
    o.m_EndpointFqdnIsSet = true;
  }
  if (j.find("networkInstance") != j.end()) {
    j.at("networkInstance").get_to(o.m_NetworkInstance);
    o.m_NetworkInstanceIsSet = true;
  }
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
64
65
}

Rohan's avatar
Rohan committed
66
std::string InterfaceUpfInfoItem::getInterfaceType() const {
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
67
68
  return m_InterfaceType;
}
69
void InterfaceUpfInfoItem::setInterfaceType(std::string const& value) {
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
70
71
72
73
74
75
  m_InterfaceType = value;
}
std::vector<std::string>& InterfaceUpfInfoItem::getIpv4EndpointAddresses() {
  return m_Ipv4EndpointAddresses;
}
void InterfaceUpfInfoItem::setIpv4EndpointAddresses(
Raphael Defosseux's avatar
Raphael Defosseux committed
76
77
    std::vector<std::string> const& value) {
  m_Ipv4EndpointAddresses      = value;
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
78
79
80
81
82
83
84
85
86
87
88
89
  m_Ipv4EndpointAddressesIsSet = true;
}
bool InterfaceUpfInfoItem::ipv4EndpointAddressesIsSet() const {
  return m_Ipv4EndpointAddressesIsSet;
}
void InterfaceUpfInfoItem::unsetIpv4EndpointAddresses() {
  m_Ipv4EndpointAddressesIsSet = false;
}
std::vector<Ipv6Addr>& InterfaceUpfInfoItem::getIpv6EndpointAddresses() {
  return m_Ipv6EndpointAddresses;
}
void InterfaceUpfInfoItem::setIpv6EndpointAddresses(
Raphael Defosseux's avatar
Raphael Defosseux committed
90
91
    std::vector<Ipv6Addr> const& value) {
  m_Ipv6EndpointAddresses      = value;
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
92
93
94
95
96
97
98
99
100
101
102
  m_Ipv6EndpointAddressesIsSet = true;
}
bool InterfaceUpfInfoItem::ipv6EndpointAddressesIsSet() const {
  return m_Ipv6EndpointAddressesIsSet;
}
void InterfaceUpfInfoItem::unsetIpv6EndpointAddresses() {
  m_Ipv6EndpointAddressesIsSet = false;
}
std::string InterfaceUpfInfoItem::getEndpointFqdn() const {
  return m_EndpointFqdn;
}
Raphael Defosseux's avatar
Raphael Defosseux committed
103
104
void InterfaceUpfInfoItem::setEndpointFqdn(std::string const& value) {
  m_EndpointFqdn      = value;
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
105
106
107
108
109
110
111
112
113
114
115
  m_EndpointFqdnIsSet = true;
}
bool InterfaceUpfInfoItem::endpointFqdnIsSet() const {
  return m_EndpointFqdnIsSet;
}
void InterfaceUpfInfoItem::unsetEndpointFqdn() {
  m_EndpointFqdnIsSet = false;
}
std::string InterfaceUpfInfoItem::getNetworkInstance() const {
  return m_NetworkInstance;
}
Raphael Defosseux's avatar
Raphael Defosseux committed
116
117
void InterfaceUpfInfoItem::setNetworkInstance(std::string const& value) {
  m_NetworkInstance      = value;
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
118
119
120
121
122
123
124
  m_NetworkInstanceIsSet = true;
}
bool InterfaceUpfInfoItem::networkInstanceIsSet() const {
  return m_NetworkInstanceIsSet;
}
void InterfaceUpfInfoItem::unsetNetworkInstance() {
  m_NetworkInstanceIsSet = false;
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
125
126
}

Raphael Defosseux's avatar
Raphael Defosseux committed
127
128
129
}  // namespace model
}  // namespace nrf
}  // namespace oai