modelgbp Generated OpFlex Model  1.7.0
ForwardingBehavioralGroupToSubnetsRSrc.hpp
1 
10 #pragma once
11 #ifndef GI_GBP_FORWARDINGBEHAVIORALGROUPTOSUBNETSRSRC_HPP
12 #define GI_GBP_FORWARDINGBEHAVIORALGROUPTOSUBNETSRSRC_HPP
13 
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
17 
18 namespace modelgbp {
19 namespace gbp {
20 
22  : public opflex::modb::mointernal::MO
23 {
24 public:
25 
29  static const opflex::modb::class_id_t CLASS_ID = 199;
30 
35  bool isRoleSet()
36  {
37  return getObjectInstance().isSet(6520834ul, opflex::modb::PropertyInfo::ENUM8);
38  }
39 
44  boost::optional<const uint8_t> getRole()
45  {
46  if (isRoleSet())
47  return (const uint8_t)getObjectInstance().getUInt64(6520834ul);
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(6520834ul, newValue);
72  return *this;
73  }
74 
82  {
83  getTLMutator().modify(getClassId(), getURI())->unset(6520834ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
84  return *this;
85  }
86 
91  bool isTargetSet()
92  {
93  return getObjectInstance().isSet(6520835ul, opflex::modb::PropertyInfo::REFERENCE);
94  }
95 
100  boost::optional<opflex::modb::class_id_t> getTargetClass()
101  {
102  if (isTargetSet())
103  return getObjectInstance().getReference(6520835ul).first;
104  return boost::none;
105  }
106 
111  boost::optional<opflex::modb::URI> getTargetURI()
112  {
113  if (isTargetSet())
114  return getObjectInstance().getReference(6520835ul).second;
115  return boost::none;
116  }
117 
123  opflex::modb::class_id_t getTargetClass(opflex::modb::class_id_t defaultValue)
124  {
125  return getTargetClass().get_value_or(defaultValue);
126  }
127 
133  opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
134  {
135  return getTargetURI().get_value_or(defaultValue);
136  }
137 
148  {
149  getTLMutator().modify(getClassId(), getURI())->setReference(6520835ul, 196, uri);
150  return *this;
151  }
152 
171  const std::string& policySpaceName,
172  const std::string& gbpSubnetsName)
173  {
174  getTLMutator().modify(getClassId(), getURI())->setReference(6520835ul, 196, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpSubnets").addElement(gbpSubnetsName).build());
175  return *this;
176  }
177 
185  {
186  getTLMutator().modify(getClassId(), getURI())->unset(6520835ul, opflex::modb::PropertyInfo::REFERENCE, opflex::modb::PropertyInfo::SCALAR);
187  return *this;
188  }
189 
194  bool isTypeSet()
195  {
196  return getObjectInstance().isSet(6520833ul, opflex::modb::PropertyInfo::ENUM8);
197  }
198 
203  boost::optional<const uint8_t> getType()
204  {
205  if (isTypeSet())
206  return (const uint8_t)getObjectInstance().getUInt64(6520833ul);
207  return boost::none;
208  }
209 
215  const uint8_t getType(const uint8_t defaultValue)
216  {
217  return getType().get_value_or(defaultValue);
218  }
219 
229  {
230  getTLMutator().modify(getClassId(), getURI())->setUInt64(6520833ul, newValue);
231  return *this;
232  }
233 
241  {
242  getTLMutator().modify(getClassId(), getURI())->unset(6520833ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
243  return *this;
244  }
245 
257  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolve(
258  opflex::ofcore::OFFramework& framework,
259  const opflex::modb::URI& uri)
260  {
261  return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc>(framework, CLASS_ID, uri);
262  }
263 
275  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolve(
276  const opflex::modb::URI& uri)
277  {
278  return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc>(opflex::ofcore::OFFramework::defaultInstance(), CLASS_ID, uri);
279  }
280 
299  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolveUnderPolicyUniversePolicySpaceGbpBridgeDomain(
300  opflex::ofcore::OFFramework& framework,
301  const std::string& policySpaceName,
302  const std::string& gbpBridgeDomainName)
303  {
304  return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpBridgeDomain").addElement(gbpBridgeDomainName).addElement("GbpForwardingBehavioralGroupToSubnetsRSrc").build());
305  }
306 
324  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolveUnderPolicyUniversePolicySpaceGbpBridgeDomain(
325  const std::string& policySpaceName,
326  const std::string& gbpBridgeDomainName)
327  {
328  return resolveUnderPolicyUniversePolicySpaceGbpBridgeDomain(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpBridgeDomainName);
329  }
330 
349  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolveUnderPolicyUniversePolicySpaceGbpFloodDomain(
350  opflex::ofcore::OFFramework& framework,
351  const std::string& policySpaceName,
352  const std::string& gbpFloodDomainName)
353  {
354  return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpFloodDomain").addElement(gbpFloodDomainName).addElement("GbpForwardingBehavioralGroupToSubnetsRSrc").build());
355  }
356 
374  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolveUnderPolicyUniversePolicySpaceGbpFloodDomain(
375  const std::string& policySpaceName,
376  const std::string& gbpFloodDomainName)
377  {
378  return resolveUnderPolicyUniversePolicySpaceGbpFloodDomain(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpFloodDomainName);
379  }
380 
399  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolveUnderPolicyUniversePolicySpaceGbpRoutingDomain(
400  opflex::ofcore::OFFramework& framework,
401  const std::string& policySpaceName,
402  const std::string& gbpRoutingDomainName)
403  {
404  return resolve(framework,opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("GbpForwardingBehavioralGroupToSubnetsRSrc").build());
405  }
406 
424  static boost::optional<OF_SHARED_PTR<modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc> > resolveUnderPolicyUniversePolicySpaceGbpRoutingDomain(
425  const std::string& policySpaceName,
426  const std::string& gbpRoutingDomainName)
427  {
428  return resolveUnderPolicyUniversePolicySpaceGbpRoutingDomain(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName);
429  }
430 
439  void remove()
440  {
441  getTLMutator().remove(CLASS_ID, getURI());
442  }
443 
454  static void remove(opflex::ofcore::OFFramework& framework,
455  const opflex::modb::URI& uri)
456  {
457  MO::remove(framework, CLASS_ID, uri);
458  }
459 
470  static void remove(const opflex::modb::URI& uri)
471  {
472  remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
473  }
474 
492  opflex::ofcore::OFFramework& framework,
493  const std::string& policySpaceName,
494  const std::string& gbpBridgeDomainName)
495  {
496  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpBridgeDomain").addElement(gbpBridgeDomainName).addElement("GbpForwardingBehavioralGroupToSubnetsRSrc").build());
497  }
498 
516  const std::string& policySpaceName,
517  const std::string& gbpBridgeDomainName)
518  {
519  removeUnderPolicyUniversePolicySpaceGbpBridgeDomain(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpBridgeDomainName);
520  }
521 
539  opflex::ofcore::OFFramework& framework,
540  const std::string& policySpaceName,
541  const std::string& gbpFloodDomainName)
542  {
543  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpFloodDomain").addElement(gbpFloodDomainName).addElement("GbpForwardingBehavioralGroupToSubnetsRSrc").build());
544  }
545 
563  const std::string& policySpaceName,
564  const std::string& gbpFloodDomainName)
565  {
566  removeUnderPolicyUniversePolicySpaceGbpFloodDomain(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpFloodDomainName);
567  }
568 
586  opflex::ofcore::OFFramework& framework,
587  const std::string& policySpaceName,
588  const std::string& gbpRoutingDomainName)
589  {
590  MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement("PolicyUniverse").addElement("PolicySpace").addElement(policySpaceName).addElement("GbpRoutingDomain").addElement(gbpRoutingDomainName).addElement("GbpForwardingBehavioralGroupToSubnetsRSrc").build());
591  }
592 
610  const std::string& policySpaceName,
611  const std::string& gbpRoutingDomainName)
612  {
613  removeUnderPolicyUniversePolicySpaceGbpRoutingDomain(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpRoutingDomainName);
614  }
615 
627  static void registerListener(
628  opflex::ofcore::OFFramework& framework,
629  opflex::modb::ObjectListener* listener)
630  {
631  opflex::modb::mointernal
632  ::MO::registerListener(framework, listener, CLASS_ID);
633  }
634 
646  static void registerListener(
647  opflex::modb::ObjectListener* listener)
648  {
649  registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
650  }
651 
658  static void unregisterListener(
659  opflex::ofcore::OFFramework& framework,
660  opflex::modb::ObjectListener* listener)
661  {
662  opflex::modb::mointernal
663  ::MO::unregisterListener(framework, listener, CLASS_ID);
664  }
665 
672  static void unregisterListener(
673  opflex::modb::ObjectListener* listener)
674  {
675  unregisterListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
676  }
677 
683  opflex::ofcore::OFFramework& framework,
684  const opflex::modb::URI& uri,
685  const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
686  : MO(framework, CLASS_ID, uri, oi) { }
687 }; // class ForwardingBehavioralGroupToSubnetsRSrc
688 
689 } // namespace gbp
690 } // namespace modelgbp
691 #endif // GI_GBP_FORWARDINGBEHAVIORALGROUPTOSUBNETSRSRC_HPP
bool isRoleSet()
Check whether role has been set.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:35
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for ForwardingBehavioralGroupToSubnetsRSrc.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:29
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the managed object store...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:257
bool isTargetSet()
Check whether target has been set.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:91
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolveUnderPolicyUniversePolicySpaceGbpBridgeDomain(const std::string &policySpaceName, const std::string &gbpBridgeDomainName)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the default managed object store ...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:324
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: ForwardingBehavioralGroupToSubnetsRSrc.hpp:627
boost::optional< opflex::modb::URI > getTargetURI()
Get the value of targetURI if it has been set.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:111
modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc & setTargetSubnets(const std::string &policySpaceName, const std::string &gbpSubnetsName)
Set the reference to point to an instance of Subnets in the currently-active mutator by constructing ...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:170
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:658
static void removeUnderPolicyUniversePolicySpaceGbpRoutingDomain(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName)
Remove the ForwardingBehavioralGroupToSubnetsRSrc object with the specified path elements from the ma...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:585
modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc & unsetTarget()
Unset target in the currently-active mutator.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:184
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolveUnderPolicyUniversePolicySpaceGbpRoutingDomain(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpRoutingDomainName)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the managed object store by const...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:399
static void removeUnderPolicyUniversePolicySpaceGbpRoutingDomain(const std::string &policySpaceName, const std::string &gbpRoutingDomainName)
Remove the ForwardingBehavioralGroupToSubnetsRSrc object with the specified path elements from the ma...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:609
modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:228
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: ForwardingBehavioralGroupToSubnetsRSrc.hpp:646
ForwardingBehavioralGroupToSubnetsRSrc(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of ForwardingBehavioralGroupToSubnetsRSrc.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:682
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.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: ForwardingBehavioralGroupToSubnetsRSrc.hpp:215
modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc & unsetRole()
Unset role in the currently-active mutator.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:81
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:203
static void removeUnderPolicyUniversePolicySpaceGbpFloodDomain(const std::string &policySpaceName, const std::string &gbpFloodDomainName)
Remove the ForwardingBehavioralGroupToSubnetsRSrc object with the specified path elements from the ma...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:562
boost::optional< opflex::modb::class_id_t > getTargetClass()
Get the value of targetClass if it has been set.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:100
static void removeUnderPolicyUniversePolicySpaceGbpFloodDomain(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpFloodDomainName)
Remove the ForwardingBehavioralGroupToSubnetsRSrc object with the specified path elements from the ma...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:538
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:21
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolveUnderPolicyUniversePolicySpaceGbpRoutingDomain(const std::string &policySpaceName, const std::string &gbpRoutingDomainName)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the default managed object store ...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:424
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolveUnderPolicyUniversePolicySpaceGbpBridgeDomain(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpBridgeDomainName)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the managed object store by const...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:299
static void removeUnderPolicyUniversePolicySpaceGbpBridgeDomain(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpBridgeDomainName)
Remove the ForwardingBehavioralGroupToSubnetsRSrc object with the specified path elements from the ma...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:491
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolveUnderPolicyUniversePolicySpaceGbpFloodDomain(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpFloodDomainName)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the managed object store by const...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:349
opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
Get the value of targetURI if set, otherwise the value of default passed in.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:133
modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc & setTargetSubnets(const opflex::modb::URI &uri)
Set the reference to point to an instance of Subnets with the specified URI.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:147
bool isTypeSet()
Check whether type has been set.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:194
opflex::modb::class_id_t getTargetClass(opflex::modb::class_id_t defaultValue)
Get the value of targetClass if set, otherwise the value of default passed in.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:123
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolveUnderPolicyUniversePolicySpaceGbpFloodDomain(const std::string &policySpaceName, const std::string &gbpFloodDomainName)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the default managed object store ...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:374
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:56
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:672
modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc & unsetType()
Unset type in the currently-active mutator.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:240
static void removeUnderPolicyUniversePolicySpaceGbpBridgeDomain(const std::string &policySpaceName, const std::string &gbpBridgeDomainName)
Remove the ForwardingBehavioralGroupToSubnetsRSrc object with the specified path elements from the ma...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:515
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of ForwardingBehavioralGroupToSubnetsRSrc from the managed object store using th...
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:275
modelgbp::gbp::ForwardingBehavioralGroupToSubnetsRSrc & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition: ForwardingBehavioralGroupToSubnetsRSrc.hpp:69