modelgbp Generated OpFlex Model 1.7.0
RouteTargetDef.hpp
1
10#pragma once
11#ifndef GI_DCI_ROUTETARGETDEF_HPP
12#define GI_DCI_ROUTETARGETDEF_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 = 92;
30
35 bool isNameSet()
36 {
37 return getObjectInstance().isSet(3014657ul, opflex::modb::PropertyInfo::STRING);
38 }
39
44 boost::optional<const std::string&> getName()
45 {
46 if (isNameSet())
47 return getObjectInstance().getString(3014657ul);
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::dci::RouteTargetDef& setName(const std::string& newValue)
70 {
71 getTLMutator().modify(getClassId(), getURI())->setString(3014657ul, newValue);
72 return *this;
73 }
74
82 {
83 getTLMutator().modify(getClassId(), getURI())->unset(3014657ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
84 return *this;
85 }
86
91 bool isRtASSet()
92 {
93 return getObjectInstance().isSet(3014660ul, opflex::modb::PropertyInfo::U64);
94 }
95
100 boost::optional<uint32_t> getRtAS()
101 {
102 if (isRtASSet())
103 return (uint32_t)getObjectInstance().getUInt64(3014660ul);
104 return boost::none;
105 }
106
112 uint32_t getRtAS(uint32_t defaultValue)
113 {
114 return getRtAS().get_value_or(defaultValue);
115 }
116
126 {
127 getTLMutator().modify(getClassId(), getURI())->setUInt64(3014660ul, newValue);
128 return *this;
129 }
130
138 {
139 getTLMutator().modify(getClassId(), getURI())->unset(3014660ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
140 return *this;
141 }
142
148 {
149 return getObjectInstance().isSet(3014661ul, opflex::modb::PropertyInfo::STRING);
150 }
151
156 boost::optional<const std::string&> getRtIP()
157 {
158 if (isRtIPSet())
159 return getObjectInstance().getString(3014661ul);
160 return boost::none;
161 }
162
168 const std::string& getRtIP(const std::string& defaultValue)
169 {
170 return getRtIP().get_value_or(defaultValue);
171 }
172
181 modelgbp::dci::RouteTargetDef& setRtIP(const std::string& newValue)
182 {
183 getTLMutator().modify(getClassId(), getURI())->setString(3014661ul, newValue);
184 return *this;
185 }
186
194 {
195 getTLMutator().modify(getClassId(), getURI())->unset(3014661ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
196 return *this;
197 }
198
204 {
205 return getObjectInstance().isSet(3014662ul, opflex::modb::PropertyInfo::U64);
206 }
207
212 boost::optional<uint32_t> getRtNN()
213 {
214 if (isRtNNSet())
215 return (uint32_t)getObjectInstance().getUInt64(3014662ul);
216 return boost::none;
217 }
218
224 uint32_t getRtNN(uint32_t defaultValue)
225 {
226 return getRtNN().get_value_or(defaultValue);
227 }
228
238 {
239 getTLMutator().modify(getClassId(), getURI())->setUInt64(3014662ul, newValue);
240 return *this;
241 }
242
250 {
251 getTLMutator().modify(getClassId(), getURI())->unset(3014662ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
252 return *this;
253 }
254
260 {
261 return getObjectInstance().isSet(3014658ul, opflex::modb::PropertyInfo::ENUM8);
262 }
263
268 boost::optional<const uint8_t> getTargetAf()
269 {
270 if (isTargetAfSet())
271 return (const uint8_t)getObjectInstance().getUInt64(3014658ul);
272 return boost::none;
273 }
274
280 const uint8_t getTargetAf(const uint8_t defaultValue)
281 {
282 return getTargetAf().get_value_or(defaultValue);
283 }
284
294 {
295 getTLMutator().modify(getClassId(), getURI())->setUInt64(3014658ul, newValue);
296 return *this;
297 }
298
306 {
307 getTLMutator().modify(getClassId(), getURI())->unset(3014658ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
308 return *this;
309 }
310
316 {
317 return getObjectInstance().isSet(3014659ul, opflex::modb::PropertyInfo::ENUM8);
318 }
319
324 boost::optional<const uint8_t> getType()
325 {
326 if (isTypeSet())
327 return (const uint8_t)getObjectInstance().getUInt64(3014659ul);
328 return boost::none;
329 }
330
336 const uint8_t getType(const uint8_t defaultValue)
337 {
338 return getType().get_value_or(defaultValue);
339 }
340
349 modelgbp::dci::RouteTargetDef& setType(const uint8_t newValue)
350 {
351 getTLMutator().modify(getClassId(), getURI())->setUInt64(3014659ul, newValue);
352 return *this;
353 }
354
362 {
363 getTLMutator().modify(getClassId(), getURI())->unset(3014659ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
364 return *this;
365 }
366
378 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetDef> > resolve(
379 opflex::ofcore::OFFramework& framework,
380 const opflex::modb::URI& uri)
381 {
382 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetDef>(framework, CLASS_ID, uri);
383 }
384
396 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetDef> > resolve(
397 const opflex::modb::URI& uri)
398 {
399 return opflex::modb::mointernal::MO::resolve<modelgbp::dci::RouteTargetDef>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
400 }
401
424 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetDef> > resolve(
425 opflex::ofcore::OFFramework& framework,
426 const std::string& policySpaceName,
427 const std::string& gbpRoutingDomainName,
428 const std::string& dciRouteTargetPdefName,
429 const std::string& dciRouteTargetDefName)
430 {
431 return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("DciRouteTargetPdef").addElement(dciRouteTargetPdefName).addElement("DciRouteTargetDef").addElement(dciRouteTargetDefName).build());
432 }
433
455 static boost::optional<OF_SHARED_PTR<modelgbp::dci::RouteTargetDef> > resolve(
456 const std::string& policySpaceName,
457 const std::string& gbpRoutingDomainName,
458 const std::string& dciRouteTargetPdefName,
459 const std::string& dciRouteTargetDefName)
460 {
461 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName,dciRouteTargetDefName);
462 }
463
472 void remove()
473 {
474 getTLMutator().remove(CLASS_ID, getURI());
475 }
476
487 static void remove(opflex::ofcore::OFFramework& framework,
488 const opflex::modb::URI& uri)
489 {
490 MO::remove(framework, CLASS_ID, uri);
491 }
492
503 static void remove(const opflex::modb::URI& uri)
504 {
505 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
506 }
507
528 static void remove(
529 opflex::ofcore::OFFramework& framework,
530 const std::string& policySpaceName,
531 const std::string& gbpRoutingDomainName,
532 const std::string& dciRouteTargetPdefName,
533 const std::string& dciRouteTargetDefName)
534 {
535 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("DciRouteTargetPdef").addElement(dciRouteTargetPdefName).addElement("DciRouteTargetDef").addElement(dciRouteTargetDefName).build());
536 }
537
558 static void remove(
559 const std::string& policySpaceName,
560 const std::string& gbpRoutingDomainName,
561 const std::string& dciRouteTargetPdefName,
562 const std::string& dciRouteTargetDefName)
563 {
564 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName,dciRouteTargetPdefName,dciRouteTargetDefName);
565 }
566
578 static void registerListener(
579 opflex::ofcore::OFFramework& framework,
580 opflex::modb::ObjectListener* listener)
581 {
582 opflex::modb::mointernal
583 ::MO::registerListener(framework, listener, CLASS_ID);
584 }
585
597 static void registerListener(
598 opflex::modb::ObjectListener* listener)
599 {
600 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
601 }
602
610 opflex::ofcore::OFFramework& framework,
611 opflex::modb::ObjectListener* listener)
612 {
613 opflex::modb::mointernal
614 ::MO::unregisterListener(framework, listener, CLASS_ID);
615 }
616
624 opflex::modb::ObjectListener* listener)
625 {
626 unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
627 }
628
634 opflex::ofcore::OFFramework& framework,
635 const opflex::modb::URI& uri,
636 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
637 : MO(framework, CLASS_ID, uri, oi) { }
638}; // class RouteTargetDef
639
640} // namespace dci
641} // namespace modelgbp
642#endif // GI_DCI_ROUTETARGETDEF_HPP
Definition RouteTargetDef.hpp:23
const uint8_t getTargetAf(const uint8_t defaultValue)
Get the value of targetAf if set, otherwise the value of default passed in.
Definition RouteTargetDef.hpp:280
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetDef > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RouteTargetDef from the managed object store.
Definition RouteTargetDef.hpp:378
const std::string & getRtIP(const std::string &defaultValue)
Get the value of rtIP if set, otherwise the value of default passed in.
Definition RouteTargetDef.hpp:168
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 RouteTargetDef.hpp:578
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition RouteTargetDef.hpp:336
boost::optional< const uint8_t > getTargetAf()
Get the value of targetAf if it has been set.
Definition RouteTargetDef.hpp:268
boost::optional< uint32_t > getRtNN()
Get the value of rtNN if it has been set.
Definition RouteTargetDef.hpp:212
modelgbp::dci::RouteTargetDef & setTargetAf(const uint8_t newValue)
Set targetAf to the specified value in the currently-active mutator.
Definition RouteTargetDef.hpp:293
modelgbp::dci::RouteTargetDef & setRtIP(const std::string &newValue)
Set rtIP to the specified value in the currently-active mutator.
Definition RouteTargetDef.hpp:181
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition RouteTargetDef.hpp:44
uint32_t getRtAS(uint32_t defaultValue)
Get the value of rtAS if set, otherwise the value of default passed in.
Definition RouteTargetDef.hpp:112
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for RouteTargetDef.
Definition RouteTargetDef.hpp:29
bool isTypeSet()
Check whether type has been set.
Definition RouteTargetDef.hpp:315
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetDef > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of RouteTargetDef from the managed object store using the default framework inst...
Definition RouteTargetDef.hpp:396
modelgbp::dci::RouteTargetDef & unsetRtIP()
Unset rtIP in the currently-active mutator.
Definition RouteTargetDef.hpp:193
bool isRtIPSet()
Check whether rtIP has been set.
Definition RouteTargetDef.hpp:147
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition RouteTargetDef.hpp:56
static void remove(const opflex::modb::URI &uri)
Remove the RouteTargetDef object with the specified URI using the currently-active mutator and the de...
Definition RouteTargetDef.hpp:503
modelgbp::dci::RouteTargetDef & unsetName()
Unset name in the currently-active mutator.
Definition RouteTargetDef.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 RouteTargetDef.hpp:597
modelgbp::dci::RouteTargetDef & unsetRtAS()
Unset rtAS in the currently-active mutator.
Definition RouteTargetDef.hpp:137
modelgbp::dci::RouteTargetDef & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition RouteTargetDef.hpp:349
modelgbp::dci::RouteTargetDef & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition RouteTargetDef.hpp:69
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition RouteTargetDef.hpp:324
boost::optional< const std::string & > getRtIP()
Get the value of rtIP if it has been set.
Definition RouteTargetDef.hpp:156
boost::optional< uint32_t > getRtAS()
Get the value of rtAS if it has been set.
Definition RouteTargetDef.hpp:100
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition RouteTargetDef.hpp:623
static void remove(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName, const std::string &dciRouteTargetDefName)
Remove the RouteTargetDef object with the specified path elements from the managed object store.
Definition RouteTargetDef.hpp:528
bool isNameSet()
Check whether name has been set.
Definition RouteTargetDef.hpp:35
modelgbp::dci::RouteTargetDef & setRtNN(uint32_t newValue)
Set rtNN to the specified value in the currently-active mutator.
Definition RouteTargetDef.hpp:237
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition RouteTargetDef.hpp:609
modelgbp::dci::RouteTargetDef & unsetTargetAf()
Unset targetAf in the currently-active mutator.
Definition RouteTargetDef.hpp:305
uint32_t getRtNN(uint32_t defaultValue)
Get the value of rtNN if set, otherwise the value of default passed in.
Definition RouteTargetDef.hpp:224
RouteTargetDef(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of RouteTargetDef.
Definition RouteTargetDef.hpp:633
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetDef > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName, const std::string &dciRouteTargetDefName)
Retrieve an instance of RouteTargetDef from the managed object store by constructing its URI from the...
Definition RouteTargetDef.hpp:424
bool isRtNNSet()
Check whether rtNN has been set.
Definition RouteTargetDef.hpp:203
void remove()
Remove this instance using the currently-active mutator.
Definition RouteTargetDef.hpp:472
static boost::optional< OF_SHARED_PTR< modelgbp::dci::RouteTargetDef > > resolve(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName, const std::string &dciRouteTargetDefName)
Retrieve an instance of RouteTargetDef from the default managed object store by constructing its URI ...
Definition RouteTargetDef.hpp:455
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the RouteTargetDef object with the specified URI using the currently-active mutator.
Definition RouteTargetDef.hpp:487
bool isTargetAfSet()
Check whether targetAf has been set.
Definition RouteTargetDef.hpp:259
static void remove(const std::string &policySpaceName, const std::string &gbpRoutingDomainName, const std::string &dciRouteTargetPdefName, const std::string &dciRouteTargetDefName)
Remove the RouteTargetDef object with the specified path elements from the managed object store using...
Definition RouteTargetDef.hpp:558
bool isRtASSet()
Check whether rtAS has been set.
Definition RouteTargetDef.hpp:91
modelgbp::dci::RouteTargetDef & unsetRtNN()
Unset rtNN in the currently-active mutator.
Definition RouteTargetDef.hpp:249
modelgbp::dci::RouteTargetDef & setRtAS(uint32_t newValue)
Set rtAS to the specified value in the currently-active mutator.
Definition RouteTargetDef.hpp:125
modelgbp::dci::RouteTargetDef & unsetType()
Unset type in the currently-active mutator.
Definition RouteTargetDef.hpp:361
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12