modelgbp Generated OpFlex Model 1.7.0
DomainFromGbpRoutingDomainRTgt.hpp
1
10#pragma once
11#ifndef GI_DCI_DOMAINFROMGBPROUTINGDOMAINRTGT_HPP
12#define GI_DCI_DOMAINFROMGBPROUTINGDOMAINRTGT_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 dci {
20
22 : public opflex::modb::mointernal::MO
23{
24public:
25
29 static const opflex::modb::class_id_t CLASS_ID = 89;
30
35 bool isRoleSet()
36 {
37 return getObjectInstance().isSet(2916354ul, opflex::modb::PropertyInfo::ENUM8);
38 }
39
44 boost::optional<const uint8_t> getRole()
45 {
46 if (isRoleSet())
47 return (const uint8_t)getObjectInstance().getUInt64(2916354ul);
48 return boost::none;
49 }
50
56 const uint8_t getRole(const uint8_t defaultValue)
57 {
58 return getRole().get_value_or(defaultValue);
59 }
60
70 {
71 getTLMutator().modify(getClassId(), getURI())->setUInt64(2916354ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(2916354ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
92 {
93 return getObjectInstance().isSet(2916355ul, opflex::modb::PropertyInfo::STRING);
94 }
95
100 boost::optional<const std::string&> getSource()
101 {
102 if (isSourceSet())
103 return getObjectInstance().getString(2916355ul);
104 return boost::none;
105 }
106
112 const std::string& getSource(const std::string& defaultValue)
113 {
114 return getSource().get_value_or(defaultValue);
115 }
116
126 {
127 getTLMutator().modify(getClassId(), getURI())->setString(2916355ul, newValue);
128 return *this;
129 }
130
138 {
139 getTLMutator().modify(getClassId(), getURI())->unset(2916355ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
140 return *this;
141 }
142
148 {
149 return getObjectInstance().isSet(2916353ul, opflex::modb::PropertyInfo::ENUM8);
150 }
151
156 boost::optional<const uint8_t> getType()
157 {
158 if (isTypeSet())
159 return (const uint8_t)getObjectInstance().getUInt64(2916353ul);
160 return boost::none;
161 }
162
168 const uint8_t getType(const uint8_t defaultValue)
169 {
170 return getType().get_value_or(defaultValue);
171 }
172
182 {
183 getTLMutator().modify(getClassId(), getURI())->setUInt64(2916353ul, newValue);
184 return *this;
185 }
186
194 {
195 getTLMutator().modify(getClassId(), getURI())->unset(2916353ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
196 return *this;
197 }
198
210 static boost::optional<OF_SHARED_PTR<modelgbp::dci::DomainFromGbpRoutingDomainRTgt> > resolve(
211 opflex::ofcore::OFFramework& framework,
212 const opflex::modb::URI& uri)
213 {
214 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::DomainFromGbpRoutingDomainRTgt>(framework, CLASS_ID, uri);
215 }
216
228 static boost::optional<OF_SHARED_PTR<modelgbp::dci::DomainFromGbpRoutingDomainRTgt> > resolve(
229 const opflex::modb::URI& uri)
230 {
231 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::DomainFromGbpRoutingDomainRTgt>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
232 }
233
254 static boost::optional<OF_SHARED_PTR<modelgbp::dci::DomainFromGbpRoutingDomainRTgt> > resolve(
255 opflex::ofcore::OFFramework& framework,
256 const std::string& policySpaceName,
257 const std::string& gbpRoutingDomainName,
258 const std::string& dciDomainFromGbpRoutingDomainRTgtSource)
259 {
260 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("DciDomainFromGbpRoutingDomainRTgt").addElement(dciDomainFromGbpRoutingDomainRTgtSource).build());
261 }
262
282 static boost::optional<OF_SHARED_PTR<modelgbp::dci::DomainFromGbpRoutingDomainRTgt> > resolve(
283 const std::string& policySpaceName,
284 const std::string& gbpRoutingDomainName,
285 const std::string& dciDomainFromGbpRoutingDomainRTgtSource)
286 {
287 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciDomainFromGbpRoutingDomainRTgtSource);
288 }
289
298 void remove()
299 {
300 getTLMutator().remove(CLASS_ID, getURI());
301 }
302
313 static void remove(opflex::ofcore::OFFramework& framework,
314 const opflex::modb::URI& uri)
315 {
316 MO::remove(framework, CLASS_ID, uri);
317 }
318
329 static void remove(const opflex::modb::URI& uri)
330 {
331 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
332 }
333
352 static void remove(
353 opflex::ofcore::OFFramework& framework,
354 const std::string& policySpaceName,
355 const std::string& gbpRoutingDomainName,
356 const std::string& dciDomainFromGbpRoutingDomainRTgtSource)
357 {
358 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("DciDomainFromGbpRoutingDomainRTgt").addElement(dciDomainFromGbpRoutingDomainRTgtSource).build());
359 }
360
379 static void remove(
380 const std::string& policySpaceName,
381 const std::string& gbpRoutingDomainName,
382 const std::string& dciDomainFromGbpRoutingDomainRTgtSource)
383 {
384 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciDomainFromGbpRoutingDomainRTgtSource);
385 }
386
398 static void registerListener(
399 opflex::ofcore::OFFramework& framework,
400 opflex::modb::ObjectListener* listener)
401 {
402 opflex::modb::mointernal
403 ::MO::registerListener(framework, listener, CLASS_ID);
404 }
405
417 static void registerListener(
418 opflex::modb::ObjectListener* listener)
419 {
420 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
421 }
422
430 opflex::ofcore::OFFramework& framework,
431 opflex::modb::ObjectListener* listener)
432 {
433 opflex::modb::mointernal
434 ::MO::unregisterListener(framework, listener, CLASS_ID);
435 }
436
444 opflex::modb::ObjectListener* listener)
445 {
446 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
447 }
448
454 opflex::ofcore::OFFramework& framework,
455 const opflex::modb::URI& uri,
456 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
457 : MO(framework, CLASS_ID, uri, oi) { }
458}; // class DomainFromGbpRoutingDomainRTgt
459
460} // namespace dci
461} // namespace modelgbp
462#endif // GI_DCI_DOMAINFROMGBPROUTINGDOMAINRTGT_HPP
Definition DomainFromGbpRoutingDomainRTgt.hpp:23
modelgbp::dci::DomainFromGbpRoutingDomainRTgt & setSource(const std::string &newValue)
Set source to the specified value in the currently-active mutator.
Definition DomainFromGbpRoutingDomainRTgt.hpp:125
bool isRoleSet()
Check whether role has been set.
Definition DomainFromGbpRoutingDomainRTgt.hpp:35
bool isTypeSet()
Check whether type has been set.
Definition DomainFromGbpRoutingDomainRTgt.hpp:147
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 DomainFromGbpRoutingDomainRTgt.hpp:417
const std::string & getSource(const std::string &defaultValue)
Get the value of source if set, otherwise the value of default passed in.
Definition DomainFromGbpRoutingDomainRTgt.hpp:112
modelgbp::dci::DomainFromGbpRoutingDomainRTgt & unsetSource()
Unset source in the currently-active mutator.
Definition DomainFromGbpRoutingDomainRTgt.hpp:137
static void remove(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciDomainFromGbpRoutingDomainRTgtSource)
Remove the DomainFromGbpRoutingDomainRTgt object with the specified path elements from the managed ob...
Definition DomainFromGbpRoutingDomainRTgt.hpp:352
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition DomainFromGbpRoutingDomainRTgt.hpp:443
DomainFromGbpRoutingDomainRTgt(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of DomainFromGbpRoutingDomainRTgt.
Definition DomainFromGbpRoutingDomainRTgt.hpp:453
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the DomainFromGbpRoutingDomainRTgt object with the specified URI using the currently-active mu...
Definition DomainFromGbpRoutingDomainRTgt.hpp:313
modelgbp::dci::DomainFromGbpRoutingDomainRTgt & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition DomainFromGbpRoutingDomainRTgt.hpp:181
modelgbp::dci::DomainFromGbpRoutingDomainRTgt & unsetRole()
Unset role in the currently-active mutator.
Definition DomainFromGbpRoutingDomainRTgt.hpp:81
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition DomainFromGbpRoutingDomainRTgt.hpp:168
void remove()
Remove this instance using the currently-active mutator.
Definition DomainFromGbpRoutingDomainRTgt.hpp:298
static boost::optional< OF_SHARED_PTR< modelgbp::dci::DomainFromGbpRoutingDomainRTgt > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of DomainFromGbpRoutingDomainRTgt from the managed object store using the defaul...
Definition DomainFromGbpRoutingDomainRTgt.hpp:228
bool isSourceSet()
Check whether source has been set.
Definition DomainFromGbpRoutingDomainRTgt.hpp:91
static boost::optional< OF_SHARED_PTR< modelgbp::dci::DomainFromGbpRoutingDomainRTgt > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciDomainFromGbpRoutingDomainRTgtSource)
Retrieve an instance of DomainFromGbpRoutingDomainRTgt from the managed object store by constructing ...
Definition DomainFromGbpRoutingDomainRTgt.hpp:254
static void remove(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciDomainFromGbpRoutingDomainRTgtSource)
Remove the DomainFromGbpRoutingDomainRTgt object with the specified path elements from the managed ob...
Definition DomainFromGbpRoutingDomainRTgt.hpp:379
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for DomainFromGbpRoutingDomainRTgt.
Definition DomainFromGbpRoutingDomainRTgt.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::dci::DomainFromGbpRoutingDomainRTgt > > resolve(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciDomainFromGbpRoutingDomainRTgtSource)
Retrieve an instance of DomainFromGbpRoutingDomainRTgt from the default managed object store by const...
Definition DomainFromGbpRoutingDomainRTgt.hpp:282
boost::optional< const std::string & > getSource()
Get the value of source if it has been set.
Definition DomainFromGbpRoutingDomainRTgt.hpp:100
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition DomainFromGbpRoutingDomainRTgt.hpp:156
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 DomainFromGbpRoutingDomainRTgt.hpp:398
static boost::optional< OF_SHARED_PTR< modelgbp::dci::DomainFromGbpRoutingDomainRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of DomainFromGbpRoutingDomainRTgt from the managed object store.
Definition DomainFromGbpRoutingDomainRTgt.hpp:210
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition DomainFromGbpRoutingDomainRTgt.hpp:44
static void remove(const opflex::modb::URI &uri)
Remove the DomainFromGbpRoutingDomainRTgt object with the specified URI using the currently-active mu...
Definition DomainFromGbpRoutingDomainRTgt.hpp:329
modelgbp::dci::DomainFromGbpRoutingDomainRTgt & unsetType()
Unset type in the currently-active mutator.
Definition DomainFromGbpRoutingDomainRTgt.hpp:193
modelgbp::dci::DomainFromGbpRoutingDomainRTgt & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition DomainFromGbpRoutingDomainRTgt.hpp:69
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition DomainFromGbpRoutingDomainRTgt.hpp:56
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition DomainFromGbpRoutingDomainRTgt.hpp:429
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12