modelgbp Generated OpFlex Model  1.7.0
DHCPv6Config.hpp
1 
10 #pragma once
11 #ifndef GI_INV_DHCPV6CONFIG_HPP
12 #define GI_INV_DHCPV6CONFIG_HPP
13 
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
17 /*
18  * contains: item:mclass(inv/DNSServer)
19  */
20 #include "modelgbp/inv/DNSServer.hpp"
21 /*
22  * contains: item:mclass(inv/SearchListEntry)
23  */
24 #include "modelgbp/inv/SearchListEntry.hpp"
25 
26 namespace modelgbp {
27 namespace inv {
28 
30  : public opflex::modb::mointernal::MO
31 {
32 public:
33 
37  static const opflex::modb::class_id_t CLASS_ID = 134;
38 
44  {
45  return getObjectInstance().isSet(4390916ul, opflex::modb::PropertyInfo::U64);
46  }
47 
52  boost::optional<uint32_t> getPreferredLifetime()
53  {
55  return (uint32_t)getObjectInstance().getUInt64(4390916ul);
56  return boost::none;
57  }
58 
64  uint32_t getPreferredLifetime(uint32_t defaultValue)
65  {
66  return getPreferredLifetime().get_value_or(defaultValue);
67  }
68 
78  {
79  getTLMutator().modify(getClassId(), getURI())->setUInt64(4390916ul, newValue);
80  return *this;
81  }
82 
90  {
91  getTLMutator().modify(getClassId(), getURI())->unset(4390916ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
92  return *this;
93  }
94 
99  bool isT1Set()
100  {
101  return getObjectInstance().isSet(4390913ul, opflex::modb::PropertyInfo::U64);
102  }
103 
108  boost::optional<uint32_t> getT1()
109  {
110  if (isT1Set())
111  return (uint32_t)getObjectInstance().getUInt64(4390913ul);
112  return boost::none;
113  }
114 
120  uint32_t getT1(uint32_t defaultValue)
121  {
122  return getT1().get_value_or(defaultValue);
123  }
124 
133  modelgbp::inv::DHCPv6Config& setT1(uint32_t newValue)
134  {
135  getTLMutator().modify(getClassId(), getURI())->setUInt64(4390913ul, newValue);
136  return *this;
137  }
138 
146  {
147  getTLMutator().modify(getClassId(), getURI())->unset(4390913ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
148  return *this;
149  }
150 
155  bool isT2Set()
156  {
157  return getObjectInstance().isSet(4390914ul, opflex::modb::PropertyInfo::U64);
158  }
159 
164  boost::optional<uint32_t> getT2()
165  {
166  if (isT2Set())
167  return (uint32_t)getObjectInstance().getUInt64(4390914ul);
168  return boost::none;
169  }
170 
176  uint32_t getT2(uint32_t defaultValue)
177  {
178  return getT2().get_value_or(defaultValue);
179  }
180 
189  modelgbp::inv::DHCPv6Config& setT2(uint32_t newValue)
190  {
191  getTLMutator().modify(getClassId(), getURI())->setUInt64(4390914ul, newValue);
192  return *this;
193  }
194 
202  {
203  getTLMutator().modify(getClassId(), getURI())->unset(4390914ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
204  return *this;
205  }
206 
212  {
213  return getObjectInstance().isSet(4390915ul, opflex::modb::PropertyInfo::U64);
214  }
215 
220  boost::optional<uint32_t> getValidLifetime()
221  {
222  if (isValidLifetimeSet())
223  return (uint32_t)getObjectInstance().getUInt64(4390915ul);
224  return boost::none;
225  }
226 
232  uint32_t getValidLifetime(uint32_t defaultValue)
233  {
234  return getValidLifetime().get_value_or(defaultValue);
235  }
236 
246  {
247  getTLMutator().modify(getClassId(), getURI())->setUInt64(4390915ul, newValue);
248  return *this;
249  }
250 
258  {
259  getTLMutator().modify(getClassId(), getURI())->unset(4390915ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
260  return *this;
261  }
262 
274  static boost::optional<OF_SHARED_PTR<modelgbp::inv::DHCPv6Config> > resolve(
275  opflex::ofcore::OFFramework& framework,
276  const opflex::modb::URI& uri)
277  {
278  return opflex::modb::mointernal::MO::resolve<modelgbp::inv::DHCPv6Config>(framework, CLASS_ID, uri);
279  }
280 
292  static boost::optional<OF_SHARED_PTR<modelgbp::inv::DHCPv6Config> > resolve(
293  const opflex::modb::URI& uri)
294  {
295  return opflex::modb::mointernal::MO::resolve<modelgbp::inv::DHCPv6Config>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
296  }
297 
316  static boost::optional<OF_SHARED_PTR<modelgbp::inv::DHCPv6Config> > resolve(
317  opflex::ofcore::OFFramework& framework,
318  const std::string& invLocalEndpointInventoryName,
319  const std::string& invLocalInventoryEpUuid)
320  {
321  return resolve(framework,opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvDHCPv6Config").build());
322  }
323 
341  static boost::optional<OF_SHARED_PTR<modelgbp::inv::DHCPv6Config> > resolve(
342  const std::string& invLocalEndpointInventoryName,
343  const std::string& invLocalInventoryEpUuid)
344  {
345  return resolve(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid);
346  }
347 
359  boost::optional<OF_SHARED_PTR<modelgbp::inv::DNSServer> > resolveInvDNSServer(
360  const std::string& invDNSServerName)
361  {
362  return modelgbp::inv::DNSServer::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("InvDNSServer").addElement(invDNSServerName).build());
363  }
364 
377  OF_SHARED_PTR<modelgbp::inv::DNSServer> addInvDNSServer(
378  const std::string& invDNSServerName)
379  {
380  OF_SHARED_PTR<modelgbp::inv::DNSServer> result = addChild<modelgbp::inv::DNSServer>(
381  CLASS_ID, getURI(), 2151874691ul, 131,
382  opflex::modb::URIBuilder(getURI()).addElement("InvDNSServer").addElement(invDNSServerName).build()
383  );
384  result->setName(invDNSServerName);
385  return result;
386  }
387 
402  void resolveInvDNSServer(/* out */ std::vector<OF_SHARED_PTR<modelgbp::inv::DNSServer> >& out)
403  {
404  opflex::modb::mointernal::MO::resolveChildren<modelgbp::inv::DNSServer>(
405  getFramework(), CLASS_ID, getURI(), 2151874691ul, 131, out);
406  }
407 
419  boost::optional<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> > resolveInvSearchListEntry(
420  const std::string& invSearchListEntryName)
421  {
422  return modelgbp::inv::SearchListEntry::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement("InvSearchListEntry").addElement(invSearchListEntryName).build());
423  }
424 
437  OF_SHARED_PTR<modelgbp::inv::SearchListEntry> addInvSearchListEntry(
438  const std::string& invSearchListEntryName)
439  {
440  OF_SHARED_PTR<modelgbp::inv::SearchListEntry> result = addChild<modelgbp::inv::SearchListEntry>(
441  CLASS_ID, getURI(), 2151874695ul, 135,
442  opflex::modb::URIBuilder(getURI()).addElement("InvSearchListEntry").addElement(invSearchListEntryName).build()
443  );
444  result->setName(invSearchListEntryName);
445  return result;
446  }
447 
462  void resolveInvSearchListEntry(/* out */ std::vector<OF_SHARED_PTR<modelgbp::inv::SearchListEntry> >& out)
463  {
464  opflex::modb::mointernal::MO::resolveChildren<modelgbp::inv::SearchListEntry>(
465  getFramework(), CLASS_ID, getURI(), 2151874695ul, 135, out);
466  }
467 
476  void remove()
477  {
478  getTLMutator().remove(CLASS_ID, getURI());
479  }
480 
491  static void remove(opflex::ofcore::OFFramework& framework,
492  const opflex::modb::URI& uri)
493  {
494  MO::remove(framework, CLASS_ID, uri);
495  }
496 
507  static void remove(const opflex::modb::URI& uri)
508  {
509  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
510  }
511 
528  static void remove(
529  opflex::ofcore::OFFramework& framework,
530  const std::string& invLocalEndpointInventoryName,
531  const std::string& invLocalInventoryEpUuid)
532  {
533  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("InvUniverse").addElement("InvLocalEndpointInventory").addElement(invLocalEndpointInventoryName).addElement("InvLocalInventoryEp").addElement(invLocalInventoryEpUuid).addElement("InvDHCPv6Config").build());
534  }
535 
552  static void remove(
553  const std::string& invLocalEndpointInventoryName,
554  const std::string& invLocalInventoryEpUuid)
555  {
556  remove(opflex::ofcore::OFFramework::defaultInstance(),invLocalEndpointInventoryName,invLocalInventoryEpUuid);
557  }
558 
570  static void registerListener(
571  opflex::ofcore::OFFramework& framework,
572  opflex::modb::ObjectListener* listener)
573  {
574  opflex::modb::mointernal
575  ::MO::registerListener(framework, listener, CLASS_ID);
576  }
577 
589  static void registerListener(
590  opflex::modb::ObjectListener* listener)
591  {
592  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
593  }
594 
601  static void unregisterListener(
602  opflex::ofcore::OFFramework& framework,
603  opflex::modb::ObjectListener* listener)
604  {
605  opflex::modb::mointernal
606  ::MO::unregisterListener(framework, listener, CLASS_ID);
607  }
608 
615  static void unregisterListener(
616  opflex::modb::ObjectListener* listener)
617  {
618  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
619  }
620 
626  opflex::ofcore::OFFramework& framework,
627  const opflex::modb::URI& uri,
628  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
629  : MO(framework, CLASS_ID, uri, oi) { }
630 }; // class DHCPv6Config
631 
632 } // namespace inv
633 } // namespace modelgbp
634 #endif // GI_INV_DHCPV6CONFIG_HPP
boost::optional< OF_SHARED_PTR< modelgbp::inv::DNSServer > > resolveInvDNSServer(const std::string &invDNSServerName)
Retrieve the child object with the specified naming properties.
Definition: DHCPv6Config.hpp:359
bool isT1Set()
Check whether t1 has been set.
Definition: DHCPv6Config.hpp:99
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DHCPv6Config > > resolve(opflex::ofcore::OFFramework &framework, const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid)
Retrieve an instance of DHCPv6Config from the managed object store by constructing its URI from the p...
Definition: DHCPv6Config.hpp:316
uint32_t getPreferredLifetime(uint32_t defaultValue)
Get the value of preferredLifetime if set, otherwise the value of default passed in.
Definition: DHCPv6Config.hpp:64
static boost::optional< OF_SHARED_PTR< modelgbp::inv::SearchListEntry > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SearchListEntry from the managed object store.
Definition: SearchListEntry.hpp:98
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: DHCPv6Config.hpp:615
modelgbp::inv::DHCPv6Config & unsetT2()
Unset t2 in the currently-active mutator.
Definition: DHCPv6Config.hpp:201
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: DHCPv6Config.hpp:589
bool isT2Set()
Check whether t2 has been set.
Definition: DHCPv6Config.hpp:155
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for DHCPv6Config.
Definition: DHCPv6Config.hpp:37
modelgbp::inv::DHCPv6Config & unsetPreferredLifetime()
Unset preferredLifetime in the currently-active mutator.
Definition: DHCPv6Config.hpp:89
modelgbp::inv::DHCPv6Config & unsetValidLifetime()
Unset validLifetime in the currently-active mutator.
Definition: DHCPv6Config.hpp:257
boost::optional< OF_SHARED_PTR< modelgbp::inv::SearchListEntry > > resolveInvSearchListEntry(const std::string &invSearchListEntryName)
Retrieve the child object with the specified naming properties.
Definition: DHCPv6Config.hpp:419
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: DHCPv6Config.hpp:570
modelgbp::inv::DHCPv6Config & setPreferredLifetime(uint32_t newValue)
Set preferredLifetime to the specified value in the currently-active mutator.
Definition: DHCPv6Config.hpp:77
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DHCPv6Config > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of DHCPv6Config from the managed object store using the default framework instan...
Definition: DHCPv6Config.hpp:292
uint32_t getT1(uint32_t defaultValue)
Get the value of t1 if set, otherwise the value of default passed in.
Definition: DHCPv6Config.hpp:120
modelgbp::inv::DHCPv6Config & setValidLifetime(uint32_t newValue)
Set validLifetime to the specified value in the currently-active mutator.
Definition: DHCPv6Config.hpp:245
bool isPreferredLifetimeSet()
Check whether preferredLifetime has been set.
Definition: DHCPv6Config.hpp:43
uint32_t getValidLifetime(uint32_t defaultValue)
Get the value of validLifetime if set, otherwise the value of default passed in.
Definition: DHCPv6Config.hpp:232
Definition: DHCPv6Config.hpp:29
boost::optional< uint32_t > getPreferredLifetime()
Get the value of preferredLifetime if it has been set.
Definition: DHCPv6Config.hpp:52
void resolveInvSearchListEntry(std::vector< OF_SHARED_PTR< modelgbp::inv::SearchListEntry > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::inv::SearchListEntry.
Definition: DHCPv6Config.hpp:462
OF_SHARED_PTR< modelgbp::inv::DNSServer > addInvDNSServer(const std::string &invDNSServerName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: DHCPv6Config.hpp:377
DHCPv6Config(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of DHCPv6Config.
Definition: DHCPv6Config.hpp:625
bool isValidLifetimeSet()
Check whether validLifetime has been set.
Definition: DHCPv6Config.hpp:211
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DHCPv6Config > > resolve(const std::string &invLocalEndpointInventoryName, const std::string &invLocalInventoryEpUuid)
Retrieve an instance of DHCPv6Config from the default managed object store by constructing its URI fr...
Definition: DHCPv6Config.hpp:341
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: DHCPv6Config.hpp:601
OF_SHARED_PTR< modelgbp::inv::SearchListEntry > addInvSearchListEntry(const std::string &invSearchListEntryName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: DHCPv6Config.hpp:437
modelgbp::inv::DHCPv6Config & unsetT1()
Unset t1 in the currently-active mutator.
Definition: DHCPv6Config.hpp:145
void resolveInvDNSServer(std::vector< OF_SHARED_PTR< modelgbp::inv::DNSServer > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::inv::DNSServer.
Definition: DHCPv6Config.hpp:402
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
uint32_t getT2(uint32_t defaultValue)
Get the value of t2 if set, otherwise the value of default passed in.
Definition: DHCPv6Config.hpp:176
boost::optional< uint32_t > getT1()
Get the value of t1 if it has been set.
Definition: DHCPv6Config.hpp:108
static boost::optional< OF_SHARED_PTR< modelgbp::inv::DHCPv6Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of DHCPv6Config from the managed object store.
Definition: DHCPv6Config.hpp:274
boost::optional< uint32_t > getValidLifetime()
Get the value of validLifetime if it has been set.
Definition: DHCPv6Config.hpp:220
modelgbp::inv::DHCPv6Config & setT1(uint32_t newValue)
Set t1 to the specified value in the currently-active mutator.
Definition: DHCPv6Config.hpp:133
boost::optional< uint32_t > getT2()
Get the value of t2 if it has been set.
Definition: DHCPv6Config.hpp:164
modelgbp::inv::DHCPv6Config & setT2(uint32_t newValue)
Set t2 to the specified value in the currently-active mutator.
Definition: DHCPv6Config.hpp:189