11#ifndef GI_GBP_SECGROUPRULE_HPP
12#define GI_GBP_SECGROUPRULE_HPP
14#include <boost/optional.hpp>
15#include "opflex/modb/URIBuilder.h"
16#include "opflex/modb/mo-internal/MO.h"
20#include "modelgbp/gbp/RuleToClassifierRSrc.hpp"
24#include "modelgbp/gbp/RuleToActionRSrc.hpp"
28#include "modelgbp/gbp/SecGroupRuleToRemoteAddressRSrc.hpp"
34 :
public opflex::modb::mointernal::MO
41 static const opflex::modb::class_id_t
CLASS_ID = 205;
49 return getObjectInstance().isSet(6717443ul, opflex::modb::PropertyInfo::ENUM8);
59 return (
const uint8_t)getObjectInstance().getUInt64(6717443ul);
83 getTLMutator().modify(getClassId(), getURI())->setUInt64(6717443ul, newValue);
95 getTLMutator().modify(getClassId(), getURI())->unset(6717443ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
105 return getObjectInstance().isSet(6717441ul, opflex::modb::PropertyInfo::STRING);
115 return getObjectInstance().getString(6717441ul);
124 const std::string&
getName(
const std::string& defaultValue)
126 return getName().get_value_or(defaultValue);
139 getTLMutator().modify(getClassId(), getURI())->setString(6717441ul, newValue);
151 getTLMutator().modify(getClassId(), getURI())->unset(6717441ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
161 return getObjectInstance().isSet(6717442ul, opflex::modb::PropertyInfo::U64);
171 return (uint32_t)getObjectInstance().getUInt64(6717442ul);
182 return getOrder().get_value_or(defaultValue);
195 getTLMutator().modify(getClassId(), getURI())->setUInt64(6717442ul, newValue);
207 getTLMutator().modify(getClassId(), getURI())->unset(6717442ul, opflex::modb::PropertyInfo::U64, opflex::modb::PropertyInfo::SCALAR);
222 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroupRule> >
resolve(
223 opflex::ofcore::OFFramework& framework,
224 const opflex::modb::URI& uri)
226 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroupRule>(framework,
CLASS_ID, uri);
240 static boost::optional<OF_SHARED_PTR<modelgbp::gbp::SecGroupRule> >
resolve(
241 const opflex::modb::URI& uri)
243 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::SecGroupRule>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
269 opflex::ofcore::OFFramework& framework,
270 const std::string& policySpaceName,
271 const std::string& gbpContractName,
272 const std::string& gbpSubjectName,
273 const std::string& gbpSecGroupRuleName)
275 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpContract").addElement(gbpContractName).addElement(
"GbpSubject").addElement(gbpSubjectName).addElement(
"GbpSecGroupRule").addElement(gbpSecGroupRuleName).build());
300 const std::string& policySpaceName,
301 const std::string& gbpContractName,
302 const std::string& gbpSubjectName,
303 const std::string& gbpSecGroupRuleName)
331 opflex::ofcore::OFFramework& framework,
332 const std::string& policySpaceName,
333 const std::string& gbpSecGroupName,
334 const std::string& gbpSecGroupSubjectName,
335 const std::string& gbpSecGroupRuleName)
337 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSecGroup").addElement(gbpSecGroupName).addElement(
"GbpSecGroupSubject").addElement(gbpSecGroupSubjectName).addElement(
"GbpSecGroupRule").addElement(gbpSecGroupRuleName).build());
362 const std::string& policySpaceName,
363 const std::string& gbpSecGroupName,
364 const std::string& gbpSecGroupSubjectName,
365 const std::string& gbpSecGroupRuleName)
384 const std::string& gbpRuleToClassifierRSrcTargetName)
386 opflex::modb::class_id_t gbpRuleToClassifierRSrcTargetClass = 42;
387 return modelgbp::gbp::RuleToClassifierRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"GbpRuleToClassifierRSrc").addElement(gbpRuleToClassifierRSrcTargetClass).addElement(gbpRuleToClassifierRSrcTargetName).build());
405 const std::string& gbpRuleToClassifierRSrcTargetName)
407 opflex::modb::class_id_t gbpRuleToClassifierRSrcTargetClass = 42;
408 OF_SHARED_PTR<modelgbp::gbp::RuleToClassifierRSrc> result = addChild<modelgbp::gbp::RuleToClassifierRSrc>(
409 CLASS_ID, getURI(), 2154201234ul, 146,
410 opflex::modb::URIBuilder(getURI()).addElement(
"GbpRuleToClassifierRSrc").addElement(gbpRuleToClassifierRSrcTargetClass).addElement(gbpRuleToClassifierRSrcTargetName).build()
412 result->setTargetL24Classifier(opflex::modb::URI(gbpRuleToClassifierRSrcTargetName));
432 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RuleToClassifierRSrc>(
433 getFramework(),
CLASS_ID, getURI(), 2154201234ul, 146, out);
450 const std::string& gbpRuleToActionRSrcTargetName)
452 opflex::modb::class_id_t gbpRuleToActionRSrcTargetClass = 141;
453 return modelgbp::gbp::RuleToActionRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"GbpRuleToActionRSrc").addElement(gbpRuleToActionRSrcTargetClass).addElement(gbpRuleToActionRSrcTargetName).build());
471 const std::string& gbpRuleToActionRSrcTargetName)
473 opflex::modb::class_id_t gbpRuleToActionRSrcTargetClass = 141;
474 OF_SHARED_PTR<modelgbp::gbp::RuleToActionRSrc> result = addChild<modelgbp::gbp::RuleToActionRSrc>(
475 CLASS_ID, getURI(), 2154201237ul, 149,
476 opflex::modb::URIBuilder(getURI()).addElement(
"GbpRuleToActionRSrc").addElement(gbpRuleToActionRSrcTargetClass).addElement(gbpRuleToActionRSrcTargetName).build()
478 result->setTargetAllowDenyAction(opflex::modb::URI(gbpRuleToActionRSrcTargetName));
498 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RuleToActionRSrc>(
499 getFramework(),
CLASS_ID, getURI(), 2154201237ul, 149, out);
516 const std::string& gbpSecGroupRuleToRemoteAddressRSrcTargetName)
518 opflex::modb::class_id_t gbpSecGroupRuleToRemoteAddressRSrcTargetClass = 196;
519 return modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"GbpSecGroupRuleToRemoteAddressRSrc").addElement(gbpSecGroupRuleToRemoteAddressRSrcTargetClass).addElement(gbpSecGroupRuleToRemoteAddressRSrcTargetName).build());
537 const std::string& gbpSecGroupRuleToRemoteAddressRSrcTargetName)
539 opflex::modb::class_id_t gbpSecGroupRuleToRemoteAddressRSrcTargetClass = 196;
540 OF_SHARED_PTR<modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc> result = addChild<modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc>(
541 CLASS_ID, getURI(), 2154201294ul, 206,
542 opflex::modb::URIBuilder(getURI()).addElement(
"GbpSecGroupRuleToRemoteAddressRSrc").addElement(gbpSecGroupRuleToRemoteAddressRSrcTargetClass).addElement(gbpSecGroupRuleToRemoteAddressRSrcTargetName).build()
544 result->setTargetSubnets(opflex::modb::URI(gbpSecGroupRuleToRemoteAddressRSrcTargetName));
564 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc>(
565 getFramework(),
CLASS_ID, getURI(), 2154201294ul, 206, out);
578 getTLMutator().remove(
CLASS_ID, getURI());
591 static void remove(opflex::ofcore::OFFramework& framework,
592 const opflex::modb::URI& uri)
594 MO::remove(framework,
CLASS_ID, uri);
607 static void remove(
const opflex::modb::URI& uri)
609 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
633 opflex::ofcore::OFFramework& framework,
634 const std::string& policySpaceName,
635 const std::string& gbpContractName,
636 const std::string& gbpSubjectName,
637 const std::string& gbpSecGroupRuleName)
639 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpContract").addElement(gbpContractName).addElement(
"GbpSubject").addElement(gbpSubjectName).addElement(
"GbpSecGroupRule").addElement(gbpSecGroupRuleName).build());
663 const std::string& policySpaceName,
664 const std::string& gbpContractName,
665 const std::string& gbpSubjectName,
666 const std::string& gbpSecGroupRuleName)
692 opflex::ofcore::OFFramework& framework,
693 const std::string& policySpaceName,
694 const std::string& gbpSecGroupName,
695 const std::string& gbpSecGroupSubjectName,
696 const std::string& gbpSecGroupRuleName)
698 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSecGroup").addElement(gbpSecGroupName).addElement(
"GbpSecGroupSubject").addElement(gbpSecGroupSubjectName).addElement(
"GbpSecGroupRule").addElement(gbpSecGroupRuleName).build());
722 const std::string& policySpaceName,
723 const std::string& gbpSecGroupName,
724 const std::string& gbpSecGroupSubjectName,
725 const std::string& gbpSecGroupRuleName)
742 opflex::ofcore::OFFramework& framework,
743 opflex::modb::ObjectListener* listener)
745 opflex::modb::mointernal
746 ::MO::registerListener(framework, listener,
CLASS_ID);
761 opflex::modb::ObjectListener* listener)
773 opflex::ofcore::OFFramework& framework,
774 opflex::modb::ObjectListener* listener)
776 opflex::modb::mointernal
777 ::MO::unregisterListener(framework, listener,
CLASS_ID);
787 opflex::modb::ObjectListener* listener)
797 opflex::ofcore::OFFramework& framework,
798 const opflex::modb::URI& uri,
799 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
800 : MO(framework,
CLASS_ID, uri, oi) { }
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RuleToActionRSrc from the managed object store.
Definition RuleToActionRSrc.hpp:257
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RuleToClassifierRSrc from the managed object store.
Definition RuleToClassifierRSrc.hpp:257
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecGroupRuleToRemoteAddressRSrc from the managed object store.
Definition SecGroupRuleToRemoteAddressRSrc.hpp:257
Definition SecGroupRule.hpp:35
modelgbp::gbp::SecGroupRule & unsetDirection()
Unset direction in the currently-active mutator.
Definition SecGroupRule.hpp:93
boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc > > resolveGbpSecGroupRuleToRemoteAddressRSrc(const std::string &gbpSecGroupRuleToRemoteAddressRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition SecGroupRule.hpp:515
OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc > addGbpSecGroupRuleToRemoteAddressRSrc(const std::string &gbpSecGroupRuleToRemoteAddressRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition SecGroupRule.hpp:536
modelgbp::gbp::SecGroupRule & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition SecGroupRule.hpp:137
static void remove(const opflex::modb::URI &uri)
Remove the SecGroupRule object with the specified URI using the currently-active mutator and the defa...
Definition SecGroupRule.hpp:607
static void remove(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Remove the SecGroupRule object with the specified URI using the currently-active mutator.
Definition SecGroupRule.hpp:591
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition SecGroupRule.hpp:112
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRule > > resolveUnderPolicyUniversePolicySpaceGbpContractGbpSubject(const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpSecGroupRuleName)
Retrieve an instance of SecGroupRule from the default managed object store by constructing its URI fr...
Definition SecGroupRule.hpp:299
static void removeUnderPolicyUniversePolicySpaceGbpContractGbpSubject(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpSecGroupRuleName)
Remove the SecGroupRule object with the specified path elements from the managed object store.
Definition SecGroupRule.hpp:632
bool isOrderSet()
Check whether order has been set.
Definition SecGroupRule.hpp:159
boost::optional< uint32_t > getOrder()
Get the value of order if it has been set.
Definition SecGroupRule.hpp:168
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition SecGroupRule.hpp:124
boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > > resolveGbpRuleToActionRSrc(const std::string &gbpRuleToActionRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition SecGroupRule.hpp:449
static void removeUnderPolicyUniversePolicySpaceGbpSecGroupGbpSecGroupSubject(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpSecGroupName, const std::string &gbpSecGroupSubjectName, const std::string &gbpSecGroupRuleName)
Remove the SecGroupRule object with the specified path elements from the managed object store.
Definition SecGroupRule.hpp:691
modelgbp::gbp::SecGroupRule & unsetName()
Unset name in the currently-active mutator.
Definition SecGroupRule.hpp:149
void resolveGbpSecGroupRuleToRemoteAddressRSrc(std::vector< OF_SHARED_PTR< modelgbp::gbp::SecGroupRuleToRemoteAddressRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::SecGroupRuleToRemoteAddress...
Definition SecGroupRule.hpp:562
OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > addGbpRuleToClassifierRSrc(const std::string &gbpRuleToClassifierRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition SecGroupRule.hpp:404
void remove()
Remove this instance using the currently-active mutator.
Definition SecGroupRule.hpp:576
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 SecGroupRule.hpp:760
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRule > > resolveUnderPolicyUniversePolicySpaceGbpSecGroupGbpSecGroupSubject(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpSecGroupName, const std::string &gbpSecGroupSubjectName, const std::string &gbpSecGroupRuleName)
Retrieve an instance of SecGroupRule from the managed object store by constructing its URI from the p...
Definition SecGroupRule.hpp:330
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRule > > resolveUnderPolicyUniversePolicySpaceGbpContractGbpSubject(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpSecGroupRuleName)
Retrieve an instance of SecGroupRule from the managed object store by constructing its URI from the p...
Definition SecGroupRule.hpp:268
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRule > > resolveUnderPolicyUniversePolicySpaceGbpSecGroupGbpSecGroupSubject(const std::string &policySpaceName, const std::string &gbpSecGroupName, const std::string &gbpSecGroupSubjectName, const std::string &gbpSecGroupRuleName)
Retrieve an instance of SecGroupRule from the default managed object store by constructing its URI fr...
Definition SecGroupRule.hpp:361
static void removeUnderPolicyUniversePolicySpaceGbpSecGroupGbpSecGroupSubject(const std::string &policySpaceName, const std::string &gbpSecGroupName, const std::string &gbpSecGroupSubjectName, const std::string &gbpSecGroupRuleName)
Remove the SecGroupRule object with the specified path elements from the managed object store using t...
Definition SecGroupRule.hpp:721
bool isDirectionSet()
Check whether direction has been set.
Definition SecGroupRule.hpp:47
modelgbp::gbp::SecGroupRule & setOrder(uint32_t newValue)
Set order to the specified value in the currently-active mutator.
Definition SecGroupRule.hpp:193
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRule > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecGroupRule from the managed object store.
Definition SecGroupRule.hpp:222
const uint8_t getDirection(const uint8_t defaultValue)
Get the value of direction if set, otherwise the value of default passed in.
Definition SecGroupRule.hpp:68
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition SecGroupRule.hpp:786
static boost::optional< OF_SHARED_PTR< modelgbp::gbp::SecGroupRule > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of SecGroupRule from the managed object store using the default framework instan...
Definition SecGroupRule.hpp:240
bool isNameSet()
Check whether name has been set.
Definition SecGroupRule.hpp:103
static void removeUnderPolicyUniversePolicySpaceGbpContractGbpSubject(const std::string &policySpaceName, const std::string &gbpContractName, const std::string &gbpSubjectName, const std::string &gbpSecGroupRuleName)
Remove the SecGroupRule object with the specified path elements from the managed object store using t...
Definition SecGroupRule.hpp:662
void resolveGbpRuleToClassifierRSrc(std::vector< OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::RuleToClassifierRSrc.
Definition SecGroupRule.hpp:430
boost::optional< OF_SHARED_PTR< modelgbp::gbp::RuleToClassifierRSrc > > resolveGbpRuleToClassifierRSrc(const std::string &gbpRuleToClassifierRSrcTargetName)
Retrieve the child object with the specified naming properties.
Definition SecGroupRule.hpp:383
void resolveGbpRuleToActionRSrc(std::vector< OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::RuleToActionRSrc.
Definition SecGroupRule.hpp:496
SecGroupRule(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const OF_SHARED_PTR< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of SecGroupRule.
Definition SecGroupRule.hpp:796
uint32_t getOrder(uint32_t defaultValue)
Get the value of order if set, otherwise the value of default passed in.
Definition SecGroupRule.hpp:180
OF_SHARED_PTR< modelgbp::gbp::RuleToActionRSrc > addGbpRuleToActionRSrc(const std::string &gbpRuleToActionRSrcTargetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition SecGroupRule.hpp:470
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for SecGroupRule.
Definition SecGroupRule.hpp:41
boost::optional< const uint8_t > getDirection()
Get the value of direction if it has been set.
Definition SecGroupRule.hpp:56
modelgbp::gbp::SecGroupRule & unsetOrder()
Unset order in the currently-active mutator.
Definition SecGroupRule.hpp:205
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 SecGroupRule.hpp:741
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition SecGroupRule.hpp:772
modelgbp::gbp::SecGroupRule & setDirection(const uint8_t newValue)
Set direction to the specified value in the currently-active mutator.
Definition SecGroupRule.hpp:81
SOME COPYRIGHT.
Definition OpcodeEnumT.hpp:12