11 #ifndef GI_INV_DNSSERVER_HPP
12 #define GI_INV_DNSSERVER_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
22 :
public opflex::modb::mointernal::MO
29 static const opflex::modb::class_id_t
CLASS_ID = 131;
37 return getObjectInstance().isSet(4292609ul, opflex::modb::PropertyInfo::STRING);
44 boost::optional<const std::string&>
getName()
47 return getObjectInstance().getString(4292609ul);
56 const std::string&
getName(
const std::string& defaultValue)
58 return getName().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setString(4292609ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(4292609ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
98 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> >
resolve(
99 opflex::ofcore::OFFramework& framework,
100 const opflex::modb::URI& uri)
102 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::DNSServer>(framework,
CLASS_ID, uri);
116 static boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> >
resolve(
117 const opflex::modb::URI& uri)
119 return opflex::modb::mointernal::MO::resolve<modelgbp::inv::DNSServer>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
143 opflex::ofcore::OFFramework& framework,
144 const std::string& invLocalEndpointInventoryName,
145 const std::string& invLocalInventoryEpUuid,
146 const std::string& invDNSServerName)
148 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvDHCPv4Config").addElement(
"InvDNSServer").addElement(invDNSServerName).build());
171 const std::string& invLocalEndpointInventoryName,
172 const std::string& invLocalInventoryEpUuid,
173 const std::string& invDNSServerName)
199 opflex::ofcore::OFFramework& framework,
200 const std::string& invLocalEndpointInventoryName,
201 const std::string& invLocalInventoryEpUuid,
202 const std::string& invDNSServerName)
204 return resolve(framework,opflex::modb::URIBuilder().addElement(
"InvUniverse").addElement(
"InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement(
"InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement(
"InvDHCPv6Config").addElement(
"InvDNSServer").addElement(invDNSServerName).build());
227 const std::string& invLocalEndpointInventoryName,
228 const std::string& invLocalInventoryEpUuid,
229 const std::string& invDNSServerName)
244 getTLMutator().remove(
CLASS_ID, getURI());
257 static void remove(opflex::ofcore::OFFramework& framework,
258 const opflex::modb::URI& uri)
260 MO::remove(framework,
CLASS_ID, uri);
273 static void remove(
const opflex::modb::URI& uri)
275 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
297 opflex::ofcore::OFFramework& framework,
298 const std::string& invLocalEndpointInventoryName,
299 const std::string& invLocalInventoryEpUuid,
300 const std::string& invDNSServerName)
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());
324 const std::string& invLocalEndpointInventoryName,
325 const std::string& invLocalInventoryEpUuid,
326 const std::string& invDNSServerName)
350 opflex::ofcore::OFFramework& framework,
351 const std::string& invLocalEndpointInventoryName,
352 const std::string& invLocalInventoryEpUuid,
353 const std::string& invDNSServerName)
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());
377 const std::string& invLocalEndpointInventoryName,
378 const std::string& invLocalInventoryEpUuid,
379 const std::string& invDNSServerName)
396 opflex::ofcore::OFFramework& framework,
397 opflex::modb::ObjectListener* listener)
399 opflex::modb::mointernal
400 ::MO::registerListener(framework, listener,
CLASS_ID);
415 opflex::modb::ObjectListener* listener)
427 opflex::ofcore::OFFramework& framework,
428 opflex::modb::ObjectListener* listener)
430 opflex::modb::mointernal
431 ::MO::unregisterListener(framework, listener,
CLASS_ID);
441 opflex::modb::ObjectListener* listener)
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) { }
459 #endif // GI_INV_DNSSERVER_HPP
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
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for DNSServer.
Definition: DNSServer.hpp:29
Definition: DNSServer.hpp:21
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(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
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: DNSServer.hpp:44
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 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
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 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
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
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: DNSServer.hpp:440
modelgbp::inv::DNSServer & unsetName()
Unset name in the currently-active mutator.
Definition: DNSServer.hpp:81
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 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
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
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 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 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
modelgbp::inv::DNSServer & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: DNSServer.hpp:69
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
bool isNameSet()
Check whether name has been set.
Definition: DNSServer.hpp:35