modelgbp Generated OpFlex Model 1.7.0
IndirectEpgMappingFromMappingRuleSetRTgt.hpp
1
10#pragma once
11#ifndef GI_GBPE_INDIRECTEPGMAPPINGFROMMAPPINGRULESETRTGT_HPP
12#define GI_GBPE_INDIRECTEPGMAPPINGFROMMAPPINGRULESETRTGT_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 gbpe {
20
22 : public opflex::modb::mointernal::MO
23{
24public:
25
29 static const opflex::modb::class_id_t CLASS_ID = 19;
30
35 bool isRoleSet()
36 {
37 return getObjectInstance().isSet(622594ul, opflex::modb::PropertyInfo::ENUM8);
38 }
39
44 boost::optional<const uint8_t> getRole()
45 {
46 if (isRoleSet())
47 return (const uint8_t)getObjectInstance().getUInt64(622594ul);
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(622594ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(622594ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
92 {
93 return getObjectInstance().isSet(622595ul, opflex::modb::PropertyInfo::STRING);
94 }
95
100 boost::optional<const std::string&> getSource()
101 {
102 if (isSourceSet())
103 return getObjectInstance().getString(622595ul);
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(622595ul, newValue);
128 return *this;
129 }
130
138 {
139 getTLMutator().modify(getClassId(), getURI())->unset(622595ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
140 return *this;
141 }
142
148 {
149 return getObjectInstance().isSet(622593ul, opflex::modb::PropertyInfo::ENUM8);
150 }
151
156 boost::optional<const uint8_t> getType()
157 {
158 if (isTypeSet())
159 return (const uint8_t)getObjectInstance().getUInt64(622593ul);
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(622593ul, newValue);
184 return *this;
185 }
186
194 {
195 getTLMutator().modify(getClassId(), getURI())->unset(622593ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
196 return *this;
197 }
198
210 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> > resolve(
211 opflex::ofcore::OFFramework& framework,
212 const opflex::modb::URI& uri)
213 {
214 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt>(framework, CLASS_ID, uri);
215 }
216
228 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> > resolve(
229 const opflex::modb::URI& uri)
230 {
231 return opflex::modb::mointernal::MO::resolve<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
232 }
233
252 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> > resolve(
253 opflex::ofcore::OFFramework& framework,
254 const std::string& gbpeMappingRuleSetName,
255 const std::string& gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
256 {
257 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeMappingRuleSet").addElement(gbpeMappingRuleSetName).addElement("GbpeIndirectEpgMappingFromMappingRuleSetRTgt").addElement(gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource).build());
258 }
259
277 static boost::optional<OF_SHARED_PTR<modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt> > resolve(
278 const std::string& gbpeMappingRuleSetName,
279 const std::string& gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
280 {
281 return resolve(opflex::ofcore::OFFramework::defaultInstance(),gbpeMappingRuleSetName,gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource);
282 }
283
292 void remove()
293 {
294 getTLMutator().remove(CLASS_ID, getURI());
295 }
296
307 static void remove(opflex::ofcore::OFFramework& framework,
308 const opflex::modb::URI& uri)
309 {
310 MO::remove(framework, CLASS_ID, uri);
311 }
312
323 static void remove(const opflex::modb::URI& uri)
324 {
325 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
326 }
327
344 static void remove(
345 opflex::ofcore::OFFramework& framework,
346 const std::string& gbpeMappingRuleSetName,
347 const std::string& gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
348 {
349 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("GbpeMappingRuleSet").addElement(gbpeMappingRuleSetName).addElement("GbpeIndirectEpgMappingFromMappingRuleSetRTgt").addElement(gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource).build());
350 }
351
368 static void remove(
369 const std::string& gbpeMappingRuleSetName,
370 const std::string& gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
371 {
372 remove(opflex::ofcore::OFFramework::defaultInstance(),gbpeMappingRuleSetName,gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource);
373 }
374
386 static void registerListener(
387 opflex::ofcore::OFFramework& framework,
388 opflex::modb::ObjectListener* listener)
389 {
390 opflex::modb::mointernal
391 ::MO::registerListener(framework, listener, CLASS_ID);
392 }
393
405 static void registerListener(
406 opflex::modb::ObjectListener* listener)
407 {
408 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
409 }
410
418 opflex::ofcore::OFFramework& framework,
419 opflex::modb::ObjectListener* listener)
420 {
421 opflex::modb::mointernal
422 ::MO::unregisterListener(framework, listener, CLASS_ID);
423 }
424
432 opflex::modb::ObjectListener* listener)
433 {
434 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
435 }
436
442 opflex::ofcore::OFFramework& framework,
443 const opflex::modb::URI& uri,
444 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
445 : MO(framework, CLASS_ID, uri, oi) { }
446}; // class IndirectEpgMappingFromMappingRuleSetRTgt
447
448} // namespace gbpe
449} // namespace modelgbp
450#endif // GI_GBPE_INDIRECTEPGMAPPINGFROMMAPPINGRULESETRTGT_HPP
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:23
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the IndirectEpgMappingFromMappingRuleSetRTgt object with the specified URI using the currently...
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:307
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for IndirectEpgMappingFromMappingRuleSetRTgt.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of IndirectEpgMappingFromMappingRuleSetRTgt from the managed object store.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:210
boost::optional< const std::string & > getSource()
Get the value of source if it has been set.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:100
IndirectEpgMappingFromMappingRuleSetRTgt(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of IndirectEpgMappingFromMappingRuleSetRTgt.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:441
void remove()
Remove this instance using the currently-active mutator.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:292
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 IndirectEpgMappingFromMappingRuleSetRTgt.hpp:386
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt > > resolve(opflex::ofcore::OFFramework &framework, const std::string &gbpeMappingRuleSetName, const std::string &gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
Retrieve an instance of IndirectEpgMappingFromMappingRuleSetRTgt from the managed object store by con...
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:252
bool isTypeSet()
Check whether type has been set.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:147
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:156
modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt & unsetRole()
Unset role in the currently-active mutator.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.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 IndirectEpgMappingFromMappingRuleSetRTgt.hpp:405
static void remove(opflex::ofcore::OFFramework &framework, const std::string &gbpeMappingRuleSetName, const std::string &gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
Remove the IndirectEpgMappingFromMappingRuleSetRTgt object with the specified path elements from the ...
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:344
bool isRoleSet()
Check whether role has been set.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:35
bool isSourceSet()
Check whether source has been set.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:91
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:44
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:168
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:56
modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt & setSource(const std::string &newValue)
Set source to the specified value in the currently-active mutator.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:125
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.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 IndirectEpgMappingFromMappingRuleSetRTgt.hpp:112
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:431
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt > > resolve(const std::string &gbpeMappingRuleSetName, const std::string &gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
Retrieve an instance of IndirectEpgMappingFromMappingRuleSetRTgt from the default managed object stor...
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:277
modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt & unsetType()
Unset type in the currently-active mutator.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:193
modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:181
static void remove(const opflex::modb::URI &uri)
Remove the IndirectEpgMappingFromMappingRuleSetRTgt object with the specified URI using the currently...
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:323
modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt & unsetSource()
Unset source in the currently-active mutator.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:137
static void remove(const std::string &gbpeMappingRuleSetName, const std::string &gbpeIndirectEpgMappingFromMappingRuleSetRTgtSource)
Remove the IndirectEpgMappingFromMappingRuleSetRTgt object with the specified path elements from the ...
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:368
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of IndirectEpgMappingFromMappingRuleSetRTgt from the managed object store using ...
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:228
modelgbp::gbpe::IndirectEpgMappingFromMappingRuleSetRTgt & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition IndirectEpgMappingFromMappingRuleSetRTgt.hpp:69
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12