modelgbp Generated OpFlex Model 1.7.0
DNSServer.hpp
1
10#pragma once
11#ifndef GI_INV_DNSSERVER_HPP
12#define GI_INV_DNSSERVER_HPP
13
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
17
18namespace modelgbp {
19namespace inv {
20
22 : public opflex::modb::mointernal::MO
23{
24public:
25
29 static const opflex::modb::class_id_t CLASS_ID = 131;
30
35 bool isNameSet()
36 {
37 return getObjectInstance().isSet(4292609ul, opflex::modb::PropertyInfo::STRING);
38 }
39
44 boost::optional<const std::string&> getName()
45 {
46 if (isNameSet())
47 return getObjectInstance().getString(4292609ul);
48 return boost::none;
49 }
50
56 const std::string& getName(const std::string& defaultValue)
57 {
58 return getName().get_value_or(defaultValue);
59 }
60
69 modelgbp::inv::DNSServer& setName(const std::string& newValue)
70 {
71 getTLMutator().modify(getClassId(), getURI())->setString(4292609ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(4292609ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
98 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> > resolve(
99 opflex::ofcore::OFFramework& framework,
100 const opflex::modb::URI& uri)
101 {
102 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::DNSServer>(framework, CLASS_ID, uri);
103 }
104
116 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> > resolve(
117 const opflex::modb::URI& uri)
118 {
119 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::DNSServer>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
120 }
121
142 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(
143 opflex::ofcore::OFFramework& framework,
144 const std::string& invLocalEndpointInventoryName,
145 const std::string& invLocalInventoryEpUuid,
146 const std::string& invDNSServerName)
147 {
148 return resolve(framework,opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvDHCPv4Config").addElement("InvDNSServer").addElement(invDNSServerName).build());
149 }
150
170 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(
171 const std::string& invLocalEndpointInventoryName,
172 const std::string& invLocalInventoryEpUuid,
173 const std::string& invDNSServerName)
174 {
175 return resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invDNSServerName);
176 }
177
198 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(
199 opflex::ofcore::OFFramework& framework,
200 const std::string& invLocalEndpointInventoryName,
201 const std::string& invLocalInventoryEpUuid,
202 const std::string& invDNSServerName)
203 {
204 return resolve(framework,opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvDHCPv6Config").addElement("InvDNSServer").addElement(invDNSServerName).build());
205 }
206
226 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(
227 const std::string& invLocalEndpointInventoryName,
228 const std::string& invLocalInventoryEpUuid,
229 const std::string& invDNSServerName)
230 {
231 return resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invDNSServerName);
232 }
233
242 void remove()
243 {
244 getTLMutator().remove(CLASS_ID, getURI());
245 }
246
257 static void remove(opflex::ofcore::OFFramework& framework,
258 const opflex::modb::URI& uri)
259 {
260 MO::remove(framework, CLASS_ID, uri);
261 }
262
273 static void remove(const opflex::modb::URI& uri)
274 {
275 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
276 }
277
297 opflex::ofcore::OFFramework& framework,
298 const std::string& invLocalEndpointInventoryName,
299 const std::string& invLocalInventoryEpUuid,
300 const std::string& invDNSServerName)
301 {
302 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvDHCPv4Config").addElement("InvDNSServer").addElement(invDNSServerName).build());
303 }
304
324 const std::string& invLocalEndpointInventoryName,
325 const std::string& invLocalInventoryEpUuid,
326 const std::string& invDNSServerName)
327 {
328 removeUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invDNSServerName);
329 }
330
350 opflex::ofcore::OFFramework& framework,
351 const std::string& invLocalEndpointInventoryName,
352 const std::string& invLocalInventoryEpUuid,
353 const std::string& invDNSServerName)
354 {
355 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvDHCPv6Config").addElement("InvDNSServer").addElement(invDNSServerName).build());
356 }
357
377 const std::string& invLocalEndpointInventoryName,
378 const std::string& invLocalInventoryEpUuid,
379 const std::string& invDNSServerName)
380 {
381 removeUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid,invDNSServerName);
382 }
383
395 static void registerListener(
396 opflex::ofcore::OFFramework& framework,
397 opflex::modb::ObjectListener* listener)
398 {
399 opflex::modb::mointernal
400 ::MO::registerListener(framework, listener, CLASS_ID);
401 }
402
414 static void registerListener(
415 opflex::modb::ObjectListener* listener)
416 {
417 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
418 }
419
427 opflex::ofcore::OFFramework& framework,
428 opflex::modb::ObjectListener* listener)
429 {
430 opflex::modb::mointernal
431 ::MO::unregisterListener(framework, listener, CLASS_ID);
432 }
433
441 opflex::modb::ObjectListener* listener)
442 {
443 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
444 }
445
451 opflex::ofcore::OFFramework& framework,
452 const opflex::modb::URI& uri,
453 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
454 : MO(framework, CLASS_ID, uri, oi) { }
455}; // class DNSServer
456
457} // namespace inv
458} // namespace modelgbp
459#endif // GI_INV_DNSSERVER_HPP
Definition DNSServer.hpp:23
modelgbp::inv::DNSServer & unsetName()
Unset name in the currently-active mutator.
Definition DNSServer.hpp:81
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for DNSServer.
Definition DNSServer.hpp:29
DNSServer(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of DNSServer.
Definition DNSServer.hpp:450
static void removeUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Remove the DNSServer object with the specified path elements from the managed object store using the ...
Definition DNSServer.hpp:323
void remove()
Remove this instance using the currently-active mutator.
Definition DNSServer.hpp:242
static void remove(const opflex::modb::URI &uri)
Remove the DNSServer object with the specified URI using the currently-active mutator and the default...
Definition DNSServer.hpp:273
static void removeUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Remove the DNSServer object with the specified path elements from the managed object store.
Definition DNSServer.hpp:349
static void registerListener(opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class with the default framework...
Definition DNSServer.hpp:414
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition DNSServer.hpp:440
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DNSServer > > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Retrieve an instance of DNSServer from the managed object store by constructing its URI from the path...
Definition DNSServer.hpp:198
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DNSServer > > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Retrieve an instance of DNSServer from the default managed object store by constructing its URI from ...
Definition DNSServer.hpp:170
static void removeUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Remove the DNSServer object with the specified path elements from the managed object store.
Definition DNSServer.hpp:296
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the DNSServer object with the specified URI using the currently-active mutator.
Definition DNSServer.hpp:257
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition DNSServer.hpp:426
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DNSServer > > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Retrieve an instance of DNSServer from the default managed object store by constructing its URI from ...
Definition DNSServer.hpp:226
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition DNSServer.hpp:44
static void removeUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv6Config(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Remove the DNSServer object with the specified path elements from the managed object store using the ...
Definition DNSServer.hpp:376
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DNSServer > > resolveUnderInvUniverseInvLocalEndpointInventoryInvLocalInventoryEpInvDHCPv4Config(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid, const std::string &invDNSServerName)
Retrieve an instance of DNSServer from the managed object store by constructing its URI from the path...
Definition DNSServer.hpp:142
bool isNameSet()
Check whether name has been set.
Definition DNSServer.hpp:35
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition DNSServer.hpp:56
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DNSServer > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of DNSServer from the managed object store.
Definition DNSServer.hpp:98
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DNSServer > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of DNSServer from the managed object store using the default framework instance.
Definition DNSServer.hpp:116
static void registerListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class.
Definition DNSServer.hpp:395
modelgbp::inv::DNSServer & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition DNSServer.hpp:69
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12